66#define MODULE_ID "XSH_COMPUTE_SHIFT_IFU"
81 puts(
"Unitary test of xsh_compute_shift_ifu");
82 puts(
"Usage: test_xsh_localize_ifu [options] OBJPOS_TAB SHIFTIFU_TAB");
85 puts(
" --help : What you see" ) ;
86 puts(
" --wave-ref= : Wavelength reference");
87 puts(
" --wave-ref-hsize= : Half size in nm for estimate wavelength reference [2.5]");
88 puts(
"\nInput Files" ) ;
89 puts(
"OBJPOS_TAB : OBJPOS frame");
90 puts(
"SHIFTIFU_TAB : [OPTIONAL] SHIFTIFU_TAB frame");
96 double *waveref,
double *waveref_hsize)
101 while (( opt = getopt_long (argc, argv,
107 *waveref = atof(optarg);
110 *waveref_hsize = atof(optarg);
122int main(
int argc,
char **argv)
126 double waveref = 700;
127 double waveref_hsize = 2.5;
128 const char *objpos_name = NULL;
129 const char *shiftifu_name = NULL;
130 cpl_frame *objpos_frame = NULL;
131 cpl_frame *shiftifu_frame = NULL;
132 cpl_frame *result = NULL;
137 cpl_msg_set_level(CPL_MSG_DEBUG);
143 if ( (argc - optind) > 0 ) {
144 objpos_name = argv[optind];
145 if ( (argc - optind) > 1 ) {
146 shiftifu_name = argv[optind+1];
155 xsh_msg(
"Objpos : %s ", objpos_name);
156 xsh_msg(
"Shiftifu: %s ", shiftifu_name);
158 xsh_msg(
"Waveref : %f ", waveref);
159 xsh_msg(
"Waveref_hsize : %f ", waveref_hsize);
163 if ( shiftifu_name != NULL){
168 shiftifu_frame, waveref_hsize,
"shift.fits"));
171 if (cpl_error_get_code() != CPL_ERROR_NONE) {
int main()
Unit test of xsh_bspline_interpol.
static struct option long_options[]
static void HandleOptions(int argc, char **argv, double *waveref, double *waveref_hsize)
cpl_frame * xsh_compute_shift_ifu_slitlet(double lambda_ref, cpl_frame *objpos_frame, cpl_frame *shiftifu_frame, double lambdaref_hsize, const char *resname)
Compute the shift in slit between reference wavelength and others.
#define xsh_error_dump(level)
#define xsh_msg(...)
Print a message on info level.
void xsh_free_frame(cpl_frame **f)
Deallocate a frame and set the pointer to NULL.
int xsh_debug_level_set(int level)
set debug level
#define TESTS_XSH_FRAME_CREATE(frame, tag, name)
#define TESTS_INIT(DRL_ID)