82 cpl_frameset * sky_raws,
86 cpl_frameset *result = NULL;
88 cpl_frameset * objects = NULL, * skys = NULL ;
99 check( result = cpl_frameset_new());
103 for( i = 0 ; i<nraws ; i ++ ) {
105 cpl_frame *a = NULL, *b = NULL;
106 cpl_frame *a_b = NULL ;
108 check(a = cpl_frameset_get_frame( objects, i));
109 check(b = cpl_frameset_get_frame( skys, i));
111 xsh_msg(
"1-st pair: OBJECT='%s'", cpl_frame_get_filename( a));
112 xsh_msg(
" SKY ='%s'", cpl_frame_get_filename( b));
114 sprintf( a_b_name ,
"SKY_SUBTRACTED_OFFSET_%s_%d.fits",
125 check( cpl_frameset_insert( result, a_b));
static xsh_instrument * instrument
cpl_frame * xsh_pre_frame_subtract(cpl_frame *one, cpl_frame *two, const char *filename, xsh_instrument *instr, const int clean_tmp)
Subtract 2 frames (in XSH_PRE format) Just loads the 2 frames, subtract (xsh_pre_subtract) and save r...
#define XSH_ASSURE_NOT_NULL(pointer)
const char * xsh_instrument_arm_tostring(xsh_instrument *i)
Get the string associated with an arm.
#define xsh_msg(...)
Print a message on info level.
#define xsh_msg_dbg_high(...)
cpl_frameset * xsh_subtract_sky_offset(cpl_frameset *object_raws, cpl_frameset *sky_raws, int nraws, xsh_instrument *instrument)
void xsh_free_frameset(cpl_frameset **f)
Deallocate a frame set and set the pointer to NULL.
cpl_frameset * xsh_order_frameset_by_date(cpl_frameset *frameset)
Order frameset by date.