58#define MODULE_ID "XSH_SUBTRACT_SKY_NOD"
60#define SYNTAX "Test xsh_subtract_sky_nod\n"\
61 "usage : ./test_xsh_subtract_sky_nod [<o[tions>] <raw_file1> <raw_file2> ... \n"\
62 " Subtract noded files 2 by 2).\n"\
63 "<raw_files> the list of raw files, 2 by 2\n"\
66static const char *
Options =
"?" ;
73 {
"point", required_argument, 0,
POINT_OPT},
74 {
"size", required_argument, 0,
SIZE_OPT},
75 {
"step", required_argument, 0,
STEP_OPT},
100 while( (opt = getopt_long( argc, argv,
Options,
135 cpl_frameset *set = NULL;
136 cpl_frameset *ord_set = NULL;
137 int nb_raw_frames , raw_modulo;
138 cpl_frameset * pairs = NULL ;
140 const int decode_bp=2147483647;
144 cpl_msg_set_level(CPL_MSG_DEBUG);
160 check( set = cpl_frameset_new() ) ;
163 for( iarg = 1 ; iarg < argc ; iarg++ ) {
164 cpl_frame * input_frame = NULL ;
166 check( input_frame = cpl_frame_new() ) ;
167 check(cpl_frame_set_filename( input_frame, argv[iarg] ) );
168 check(cpl_frame_set_tag(input_frame,
"OBJECT_SLIT_NOD_VIS" ) ) ;
169 check(cpl_frame_set_group( input_frame, CPL_FRAME_GROUP_RAW ) ) ;
170 check(cpl_frameset_insert( set, input_frame ) ) ;
174 xsh_msg(
"Nb of frames: %d", nb_raw_frames ) ;
185 raw_modulo = nb_raw_frames % 2;
190 xsh_msg(
"Now call xsh_subtract_sky_nod with %d raw frames",
203 if ( cpl_error_get_code() != CPL_ERROR_NONE){
int main()
Unit test of xsh_bspline_interpol.
static const char * Options
static void HandleOptions(int argc, char **argv, int *nscales)
static xsh_instrument * instrument
static struct option LongOptions[]
static char CentralColor[32]
static char PointType[16]
void xsh_prepare(cpl_frameset *frames, cpl_frame *bpmap, cpl_frame *mbias, const char *prefix, xsh_instrument *instr, const int pre_overscan_corr, const bool flag_neg_and_thresh_pix)
This function transform RAW frames dataset in PRE frames dataset attaching the default bad pixel map ...
#define XSH_ASSURE_NOT_ILLEGAL(cond)
#define XSH_ASSURE_NOT_NULL(pointer)
void xsh_instrument_set_mode(xsh_instrument *i, XSH_MODE mode)
Set a mode on instrument structure.
void xsh_instrument_set_arm(xsh_instrument *i, XSH_ARM arm)
Set an arm on instrument structure.
void xsh_instrument_free(xsh_instrument **instrument)
free an instrument structure
xsh_instrument * xsh_instrument_new(void)
create new instrument structure
void xsh_instrument_set_decode_bp(xsh_instrument *i, const int decode_bp)
Set bad pixel code.
#define xsh_msg(...)
Print a message on info level.
cpl_frameset * xsh_subtract_sky_nod(cpl_frameset *raws, xsh_instrument *instrument, int mode_fast)
void xsh_free_frameset(cpl_frameset **f)
Deallocate a frame set and set the pointer to NULL.
int xsh_debug_level_set(int level)
set debug level
#define TESTS_INIT(DRL_ID)
#define XSH_OBJECT_SLIT_NOD