65#define MODULE_ID "XSH_THE_MAP"
66#define SYNTAX "Test the theoretical map\n"\
67 "use : ./the_xsh_themap THE_MAP PRE_FRAME\n"\
68 "THE_MAP => the theoretical map table\n"
82int main(
int argc,
char **argv)
86 char* the_name = NULL;
87 cpl_frame* the_frame = NULL;
91 FILE* themap_file = NULL;
96 cpl_msg_set_level(CPL_MSG_DEBUG);
111 the_frame = cpl_frame_new();
112 cpl_frame_set_filename( the_frame, the_name) ;
113 cpl_frame_set_level( the_frame, CPL_FRAME_LEVEL_TEMPORARY);
114 cpl_frame_set_group( the_frame, CPL_FRAME_GROUP_RAW ) ;
120 themap_file = fopen(
"THEMAP.reg",
"w");
121 fprintf( themap_file,
"# Region file format: DS9 version 4.0\n\
122 global color=red font=\"helvetica 4 normal\"\
123 select=1 highlite=1 edit=1 move=1 delete=1 include=1 fixed=0 source \nimage\n");
125 for( i=0; i<themap_size; i++){
126 float lambdaTHE = 0.0;
135 fprintf( themap_file,
"point(%f,%f) #point=cross color=yellow "\
136 "font=\"helvetica 10 normal\" text={THE %.3f}\n", xd, yd, lambdaTHE);
139 fprintf( themap_file,
"point(%f,%f) #point=cross color=yellow "\
140 "font=\"helvetica 10 normal\" text={slit %f}\n", xd, yd, slit);
148 if(themap_file != NULL) {
149 fclose( themap_file);
151 if (cpl_error_get_code() != CPL_ERROR_NONE) {
int main()
Unit test of xsh_bspline_interpol.
void xsh_the_map_free(xsh_the_map **list)
free memory associated to a the_map
double xsh_the_map_get_detx(xsh_the_map *list, int idx)
get detx of the map list
float xsh_the_map_get_slit_position(xsh_the_map *list, int idx)
get slit position of the map list
double xsh_the_map_get_dety(xsh_the_map *list, int idx)
get dety of the map list
int xsh_the_map_get_size(xsh_the_map *list)
get size of the map list
float xsh_the_map_get_wavelength(xsh_the_map *list, int idx)
get wavelength of the map list
xsh_the_map * xsh_the_map_load(cpl_frame *frame)
load a theoretical map frame in the_map structure. Suppress spurious entries in the THE MAP (marked w...
#define xsh_error_dump(level)
#define XSH_ASSURE_NOT_NULL(pointer)
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_INIT(DRL_ID)