60#define MODULE_ID "PRODUCT_XSH_MASTER_BIAS"
61#define SYNTAX "Test the MASTER_BIAS\n"\
62 "use : ./test-product_xsh_master_bias MASTER_BIAS\n"\
63 "MASTER_BIAS => the master bias frame\n"
77int main(
int argc,
char** argv)
80 char* master_bias_name = NULL;
81 const char* master_bias_pcatg = NULL;
82 cpl_propertylist* master_bias_header = NULL;
83 cpl_frame* master_bias_frame = NULL;
84 xsh_pre* master_bias_pre = NULL;
86 double mean =0.0, median=0.0, stdev=0.0, ron=0.0;
87 double structx=0.0, structy=0.0;
92 cpl_msg_set_level(CPL_MSG_DEBUG);
97 master_bias_name = argv[1];
106 check( master_bias_header = cpl_propertylist_load( master_bias_name, 0 ));
111 master_bias_frame = cpl_frame_new();
112 cpl_frame_set_filename( master_bias_frame, master_bias_name);
114 if ( strstr(master_bias_pcatg,
"MASTER_BIAS_UVB") != NULL){
116 cpl_frame_set_tag( master_bias_frame,
"MASTER_BIAS_UVB");
118 else if ( strstr(master_bias_pcatg,
"MASTER_BIAS_VIS") != NULL){
120 cpl_frame_set_tag( master_bias_frame,
"MASTER_BIAS_VIS");
123 xsh_msg(
"Invalid pcatg %s", master_bias_pcatg);
138 xsh_msg(
" Given ron %f Compute ron %f",master_bias_pre->
ron, ron);
139 xsh_msg(
" structx %f structy %f",structx, structy);
140 xsh_msg(
" stdev %f median %f mean %f",stdev, median, mean);
143 if (cpl_error_get_code() != CPL_ERROR_NONE) {
int main()
Unit test of xsh_bspline_interpol.
static xsh_instrument * instrument
xsh_pre * xsh_pre_load(cpl_frame *frame, xsh_instrument *instr)
Load a xsh_pre structure from a frame.
void xsh_pre_free(xsh_pre **pre)
Free a xsh_pre structure.
#define XSH_ASSURE_NOT_ILLEGAL(cond)
#define xsh_error_dump(level)
#define XSH_ASSURE_NOT_NULL(pointer)
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
#define xsh_msg(...)
Print a message on info level.
const char * xsh_pfits_get_pcatg(const cpl_propertylist *plist)
find out the pcatg
double xsh_pfits_get_qc_structy(const cpl_propertylist *plist)
double xsh_pfits_get_qc_mbiasavg(const cpl_propertylist *plist)
find out the QC.MBIASAVG value
double xsh_pfits_get_qc_mbiasrms(const cpl_propertylist *plist)
find out the QC.MBIASRMS value
double xsh_pfits_get_qc_ron(const cpl_propertylist *plist)
double xsh_pfits_get_qc_mbiasmed(const cpl_propertylist *plist)
find out the QC.MBIASMED value
double xsh_pfits_get_qc_structx(const cpl_propertylist *plist)
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
cpl_propertylist * data_header
#define TESTS_INIT(DRL_ID)