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 cpl_frame*
00062 xsh_build_ifu_map(cpl_frame* div_frame,
00063 cpl_frame* wavemap_frame,
00064 cpl_frame* slitmap_frame,
00065 cpl_frame* model_config_frame,
00066 xsh_instrument* instrument);
00067
00068 cpl_error_code
00069 xsh_build_ifu_cube(cpl_frame* div_frame,
00070 cpl_frame* ifu_cfg_tab_frame,
00071 cpl_frame* ifu_cfg_cor_frame,
00072 cpl_frame* spectral_format_frame,
00073 cpl_frame* model_config_frame,
00074 cpl_frame* wavesol_frame,
00075 xsh_instrument* instrument,
00076 cpl_frameset* frameset,
00077 cpl_parameterlist* parameters,
00078 xsh_rectify_param * rectify_par,
00079 const char* recipe_id,
00080 const char* rec_prefix,
00081 const int frame_is_object);
00082 cpl_error_code
00083 xsh_frame_check_model_cfg_is_proper_for_sci(cpl_frame* model_config_frame,
00084 cpl_frame* sci_frame,
00085 xsh_instrument* instrument);
00086
00087 cpl_error_code
00088 xsh_frame_check_model_cfg_is_afc_corrected(cpl_frame* model_config_frame);
00089
00090 cpl_error_code
00091 xsh_cube_set_wcs(cpl_propertylist * plist,
00092 float cenLambda,
00093 float disp_x,
00094 float disp_y,
00095 float disp_z,
00096 float center_x,
00097 float center_y,
00098 int center_z);
00099
00100 cpl_matrix * xsh_atrous( cpl_vector *spec, int nscales);
00101
00102 cpl_frameset * xsh_shift_offsettab( cpl_frameset *shift_ifu_frameset,
00103 double offset_low, double offset_up);
00104
00105 #endif