00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef XSH_UTILS_IFU_H
00028 #define XSH_UTILS_IFU_H
00029
00030
00031
00032 #include <cpl.h>
00033 #include <xsh_parameters.h>
00034
00035
00036 void
00037 xsh_edge_check(const int px,const int nx,const int rad_x,
00038 int* llx,int* urx);
00039 void
00040 xsh_convert_xy_to_ws(double x_centroid,
00041 double* p_obj_cen,
00042 double* p_slit,
00043 double* p_wave,
00044 const int lly,
00045 const int nx,
00046 const int row,
00047 double* p_obj_cen_s,
00048 double* p_obj_cen_w);
00049
00050 cpl_error_code
00051 xsh_table_edges_swap_low_upp(cpl_table** tab);
00052
00053 cpl_table*
00054 xsh_table_edge_prepare(const char* name);
00055 cpl_error_code
00056 xsh_ifu_trace_object_calibrate(const char* ifu_object_ff_name,
00057 const char* order_tab_edges_ifu_name,
00058 const char* slit_map_name,
00059 const char* wave_map_name);
00060
00061
00062 cpl_error_code
00063 xsh_build_ifu_cube(cpl_frame* div_frame,
00064 cpl_frame* ifu_config_frame,
00065 cpl_frame* spectral_format_frame,
00066 cpl_frame* model_config_frame,
00067 cpl_frame* wavesol_frame,
00068 xsh_instrument* instrument,
00069 cpl_frameset* frameset,
00070 cpl_parameterlist* parameters,
00071 xsh_rectify_param * rectify_par,
00072 const char* recipe_id,
00073 const char* rec_prefix,
00074 const int frame_is_object);
00075 cpl_error_code
00076 xsh_frame_check_model_cfg_is_proper_for_sci(cpl_frame* model_config_frame,
00077 cpl_frame* sci_frame,
00078 xsh_instrument* instrument);
00079
00080 cpl_error_code
00081 xsh_frame_check_model_cfg_is_afc_corrected(cpl_frame* model_config_frame);
00082
00083 cpl_error_code
00084 xsh_cube_set_wcs(cpl_propertylist * plist,
00085 float cenLambda,
00086 float dispersion,
00087 int center_z,
00088 float center_x,
00089 float center_y );
00090 #endif