X-shooter Pipeline Reference Manual 3.8.15
xsh_data_instrument.c
Go to the documentation of this file.
1/* *
2 * This file is part of the ESO X-shooter Pipeline *
3 * Copyright (C) 2006 European Southern Observatory *
4 * *
5 * This library is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the Free Software *
17 * Foundation, 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA *
18 * */
19
20/*
21 * $Author: amodigli $
22 * $Date: 2013-10-02 15:48:05 $
23 * $Revision: 1.44 $
24 * $Name: not supported by cvs2svn $
25 */
26
27#ifdef HAVE_CONFIG_H
28# include <config.h>
29#endif
30
31/*--------------------------------------------------------------------------*/
37/*--------------------------------------------------------------------------*/
40/*---------------------------------------------------------------------------
41 Includes
42 ---------------------------------------------------------------------------*/
43#include <xsh_data_instrument.h>
44#include <xsh_data_order.h>
45#include <xsh_pfits.h>
47#include <xsh_msg.h>
48#include <xsh_dfs.h>
49#include <xsh_error.h>
50#include <string.h>
51/*---------------------------------------------------------------------------
52 Functions prototypes
53 ---------------------------------------------------------------------------*/
54
55
56/*---------------------------------------------------------------------------
57 Implementation
58 ---------------------------------------------------------------------------*/
59
60/*--------------------------------------------------------------------------*/
67/*--------------------------------------------------------------------------*/
69{
71 instrument = (xsh_instrument*)cpl_malloc(sizeof(xsh_instrument));
72 assure (instrument != NULL, CPL_ERROR_ILLEGAL_OUTPUT,
73 "Memory allocation failed!");
74 /* init */
78 instrument->config = NULL;
79 instrument->pipeline_id = PACKAGE "/" PACKAGE_VERSION;
80 instrument->dictionary = "PRO-1.15";
81 instrument->recipe_id = NULL;
82 instrument->update = 0;
94 instrument->binx = 1;
95 instrument->biny = 1;
96
97 cleanup:
98 return instrument;
99}
100
102{
103 xsh_instrument * new = NULL ;
104
105 check( new = xsh_instrument_new() ) ;
106
107 memcpy( new, old, sizeof( xsh_instrument ) ) ;
108 new->config = malloc( sizeof( XSH_INSTRCONFIG ) ) ;
109 memcpy( new->config, old->config, sizeof( XSH_INSTRCONFIG ) ) ;
110
111 cleanup:
112 return new ;
113}
114
115/*--------------------------------------------------------------------------*/
121/*--------------------------------------------------------------------------*/
123 if(instrument && *instrument){
124 if((*instrument)->config != NULL){
125 cpl_free((*instrument)->config);
126 (*instrument)->config = NULL;
127 }
128 cpl_free(*instrument);
129 *instrument = NULL;
130 }
131}
132
133/*--------------------------------------------------------------------------*/
139/*--------------------------------------------------------------------------*/
140XSH_ARM xsh_arm_get(const char* tag){
141 return
142 (strstr(tag,"UVB") != NULL)? XSH_ARM_UVB :
143 (strstr(tag,"VIS") != NULL)? XSH_ARM_VIS :
144 (strstr(tag,"NIR") != NULL)? XSH_ARM_NIR :
145 (strstr(tag,"AGC") != NULL)? XSH_ARM_AGC : XSH_ARM_UNDEFINED;
146}
147
148/*--------------------------------------------------------------------------*/
154/*--------------------------------------------------------------------------*/
155XSH_MODE xsh_mode_get(const char* tag){
156 return
157 (strstr(tag,"IFU") != NULL)? XSH_MODE_IFU :
158 (strstr(tag,"SLIT") != NULL)? XSH_MODE_SLIT : XSH_MODE_UNDEFINED;
159}
160
161/*--------------------------------------------------------------------------*/
168/*--------------------------------------------------------------------------*/
169void
172 return;
173}
174
175
176/*--------------------------------------------------------------------------*/
183/*--------------------------------------------------------------------------*/
184void
186 instrument->decode_bp = decode_bp;
187 return;
188}
189
190/*--------------------------------------------------------------------------*/
196/*--------------------------------------------------------------------------*/
197XSH_LAMP xsh_lamp_get(const char* tag){
198 return
199 (strstr(tag,"QTH") != NULL)? XSH_LAMP_QTH :
200 (strstr(tag,"D2") != NULL)? XSH_LAMP_D2 :
201 (strstr(tag,"THAR") != NULL)? XSH_LAMP_THAR : XSH_LAMP_UNDEFINED;
202}
203
204
205/*--------------------------------------------------------------------------*/
211/*--------------------------------------------------------------------------*/
212void xsh_instrument_parse_tag(xsh_instrument* inst,const char* tag){
213 XSH_ARM arm = xsh_arm_get(tag);
215 XSH_LAMP lamp = xsh_lamp_get(tag);
216
217 xsh_instrument_set_arm(inst,arm);
219 xsh_instrument_set_lamp(inst,lamp);
220
221}
222
223/*--------------------------------------------------------------------------*/
229/*--------------------------------------------------------------------------*/
230void xsh_instrument_set_decode_bp(xsh_instrument* i,const int decode_bp){
231
232 i->decode_bp = decode_bp;
233 return;
234}
235
236
237/*--------------------------------------------------------------------------*/
244/*--------------------------------------------------------------------------*/
246 if (mode != XSH_MODE_UNDEFINED){
247 if ( (i->mode == XSH_MODE_UNDEFINED)|| (mode == i->mode) ){
248 i->mode = mode;
249 }
250 else {
251 /* report the error */
252/*
253 assure(0,CPL_ERROR_ILLEGAL_INPUT,
254 "Mode %s already set for the instrument; could'nt update with %s",
255 xsh_instrument_mode_tostring(i),xsh_mode_tostring(mode));
256*/
257 }
258 }
259
260 return;
261}
262
263/*--------------------------------------------------------------------------*/
270/*--------------------------------------------------------------------------*/
272 if (arm == XSH_ARM_UNDEFINED) {
273 /* report the error */
274 assure(0,CPL_ERROR_ILLEGAL_INPUT,"arm must be UVB, VIS or NIR");
275 }
276 else {
277 if( (i->arm == XSH_ARM_UNDEFINED) || (arm == i->arm) ){
278 i->update = 1;
279 i->arm = arm;
280 }
281 else {
282 /* report the error */
283 assure(0,CPL_ERROR_ILLEGAL_INPUT,
284 "Arm %s already set for the instrument; could'nt update with %s",
286 }
287 }
288 cleanup:
289 return;
290}
291
292/*--------------------------------------------------------------------------*/
299/*--------------------------------------------------------------------------*/
301 if (lamp != XSH_LAMP_UNDEFINED) {
302 if( (i->lamp == XSH_LAMP_UNDEFINED) || (i->lamp == lamp) ){
303 i->lamp = lamp;
304 }
305 else {
306 if ( (i->arm == XSH_ARM_UVB) && ( ( lamp == XSH_LAMP_QTH)||
307 ( lamp == XSH_LAMP_D2))){
309 }
310 else{
311 /* report the error */
312 assure(0,CPL_ERROR_ILLEGAL_INPUT,
313 "Lamp %s already set for the instrument; could not update with %s",
315 }
316 }
317 }
318 cleanup:
319 return;
320}
321
323{
325 i->lamp = lamp;
326 i->update = 1;
327
328 cleanup:
329 return;
330}
331
333 cpl_frame* spectralformat_frame)
334{
335 xsh_spectralformat_list *spec_list = NULL;
336 int max_order, min_order;
337 int nb_qth, nb_d2, nb_total;
338 int j;
339
340 /* Check parameters */
342
343 if (spectralformat_frame != NULL){
344 check( spec_list = xsh_spectralformat_list_load( spectralformat_frame,
345 i));
346
347 nb_total = spec_list->size;
348 nb_qth = 0;
349 nb_d2 = 0;
350 XSH_ASSURE_NOT_ILLEGAL( nb_total > 0);
351
352 max_order = spec_list->list[0].absorder;
353 min_order = spec_list->list[0].absorder;
354
355 for(j=0; j< spec_list->size; j++){
356 int absorder;
357 const char* lamp = NULL;
358
359 absorder= spec_list->list[j].absorder;
360 lamp = spec_list->list[j].lamp;
361
362 if ( absorder > max_order){
363 max_order = absorder;
364 }
365 if ( absorder < min_order ){
366 min_order = absorder;
367 }
368 if (lamp != NULL){
369 if ( strcmp(lamp,"QTH")== 0){
370 nb_qth++;
371 }
372 else if ( strcmp(lamp,"D2") == 0){
373 nb_d2++;
374 }
375 }
376 }
377 assure(i->arm != XSH_ARM_UNDEFINED,CPL_ERROR_ILLEGAL_INPUT,
378 "config is defined only for valid arm");
379 switch (i->arm){
380 case XSH_ARM_UVB:
381 i->uvb_orders_nb = nb_total ;
382 i->uvb_orders_qth_nb = nb_qth;
383 i->uvb_orders_d2_nb = nb_d2;
384 i->uvb_orders_min = min_order;
385 i->uvb_orders_max = max_order;
386 break;
387 case XSH_ARM_VIS:
388 i->vis_orders_nb = nb_total;
389 i->vis_orders_min = min_order;
390 i->vis_orders_max = max_order;
391 break;
392 case XSH_ARM_NIR:
393 i->nir_orders_nb = nb_total;
394 i->nir_orders_min = min_order;
395 i->nir_orders_max = max_order;
396 break;
397 default:
398 break;
399 }
400 i->update = 1;
401 xsh_msg_dbg_low("Orders config updated for arm %s", xsh_arm_tostring( i->arm));
402 xsh_msg_dbg_low(" Nb orders %d (qth %d, d2 %d) : from %d to %d",
403 nb_total, nb_qth, nb_d2, min_order, max_order);
404 }
405 else{
406 xsh_msg(" No spectralformat : Get default config");
407 }
408
409 cleanup:
410 xsh_spectralformat_list_free( &spec_list);
411 return;
412}
413
414/*--------------------------------------------------------------------------*/
420/*--------------------------------------------------------------------------*/
422 const char *recipe_id)
423{
424 if (recipe_id != NULL) {
425 instrument->recipe_id = recipe_id;
426 }
427 else {
428 /* report the error */
429 instrument->recipe_id = "unknown";
430 }
431
432 return;
433}
434
435/*--------------------------------------------------------------------------*/
440/*--------------------------------------------------------------------------*/
442 return i->mode;
443}
444
445/*--------------------------------------------------------------------------*/
450/*--------------------------------------------------------------------------*/
452 return i->arm;
453}
454
455/*--------------------------------------------------------------------------*/
461/*--------------------------------------------------------------------------*/
463 return i->lamp;
464}
465
466/*--------------------------------------------------------------------------*/
472/*--------------------------------------------------------------------------*/
474{
475 return
479}
480
481
482/*--------------------------------------------------------------------------*/
490/*--------------------------------------------------------------------------*/
492{
493 double resolution = 0.0;
494
495 if ( (instrument->arm == XSH_ARM_UVB) && (instrument->mode == XSH_MODE_SLIT) && ( slit == 0.5)){
496 resolution = 9100;
497 }
498 else if ((instrument->arm == XSH_ARM_UVB) && (instrument->mode == XSH_MODE_SLIT) && ( slit == 0.8)){
499 resolution = 6200;
500 }
501 else if ((instrument->arm == XSH_ARM_UVB) && (instrument->mode == XSH_MODE_SLIT) && ( slit == 1.0)){
502 resolution = 5100;
503 }
504 else if ((instrument->arm == XSH_ARM_UVB) && (instrument->mode == XSH_MODE_SLIT) && ( slit == 1.3)){
505 resolution = 4000;
506 }
507 else if ((instrument->arm == XSH_ARM_UVB) && (instrument->mode == XSH_MODE_SLIT) && ( slit == 1.6)){
508 resolution = 3300;
509 }
510 else if ((instrument->arm == XSH_ARM_UVB) && (instrument->mode == XSH_MODE_IFU)){
511 resolution = 7900;
512 }
513 else if ( (instrument->arm == XSH_ARM_VIS) && (instrument->mode == XSH_MODE_SLIT) && ( slit == 0.4)){
514 resolution = 17400;
515 }
516 else if ((instrument->arm == XSH_ARM_VIS) && (instrument->mode == XSH_MODE_SLIT) && ( slit == 0.7)){
517 resolution = 11000;
518 }
519 else if ((instrument->arm == XSH_ARM_VIS) && (instrument->mode == XSH_MODE_SLIT) && ( slit == 0.9)){
520 resolution = 8800;
521 }
522 else if ((instrument->arm == XSH_ARM_VIS) && (instrument->mode == XSH_MODE_SLIT) && ( slit == 1.2)){
523 resolution = 6700;
524 }
525 else if ((instrument->arm == XSH_ARM_VIS) && (instrument->mode == XSH_MODE_SLIT) && ( slit == 1.5)){
526 resolution = 5400;
527 }
528 else if ((instrument->arm == XSH_ARM_VIS) && (instrument->mode == XSH_MODE_IFU)){
529 resolution = 12600;
530 }
531 else if ( (instrument->arm == XSH_ARM_NIR) && (instrument->mode == XSH_MODE_SLIT) && ( slit == 0.4)){
532 resolution = 11300;
533 }
534 else if ((instrument->arm == XSH_ARM_NIR) && (instrument->mode == XSH_MODE_SLIT) && ( slit == 0.6)){
535 resolution = 8100;
536 }
537 else if ((instrument->arm == XSH_ARM_NIR) && (instrument->mode == XSH_MODE_SLIT) && ( slit == 0.9)){
538 resolution = 5600;
539 }
540 else if ((instrument->arm == XSH_ARM_NIR) && (instrument->mode == XSH_MODE_SLIT) && ( slit == 1.2)){
541 resolution = 4300;
542 }
543 else if ((instrument->arm == XSH_ARM_NIR) && (instrument->mode == XSH_MODE_SLIT) && ( slit == 1.5)){
544 resolution = 3500;
545 }
546 else if ((instrument->arm == XSH_ARM_NIR) && (instrument->mode == XSH_MODE_IFU)){
547 resolution = 8100;
548 }
549 else{
550 resolution = 0.0;
551 }
552 return resolution;
553}
554
555/*--------------------------------------------------------------------------*/
561/*--------------------------------------------------------------------------*/
563{
564 assure(i->arm != XSH_ARM_UNDEFINED,CPL_ERROR_ILLEGAL_INPUT,
565 "config is defined only for valid arm");
566 /* allocate the config */
567 if ( (i->config != NULL) && (i->update == 1)) {
568 XSH_FREE( i->config);
569 i->update = 0;
570 }
571 if (i->config == NULL){
572 i->update=0;
574
575 /* init common */
576 i->config->naxis = 2;
577
578 switch (i->arm){
579 case XSH_ARM_UVB:
580 i->config->bitpix = 16;
581 i->config->nx = 2048;
582 i->config->ny = 3000;
583 i->config->prscx = 0;
584 i->config->prscy = 0;
585 i->config->ovscx = 0;
586 i->config->ovscy = 0;
587 i->config->ron = 9.0; /* 0.6 */
588 i->config->conad = 1.9;
589 if (i->lamp == XSH_LAMP_D2){
591 }
592 else if (i->lamp == XSH_LAMP_QTH){
594 }
595 else{
596 i->config->orders = i->uvb_orders_nb;
597 }
600 break;
601 case XSH_ARM_VIS:
602 i->config->bitpix = 16;
603 i->config->nx = 2048;
604 i->config->ny = 4000;
605 i->config->prscx = 0;
606 i->config->prscy = 0;
607 i->config->ovscx = 0;
608 i->config->ovscy = 0;
609 i->config->ron = 0.6;
610 i->config->conad = 1.9;
611 i->config->orders = i->vis_orders_nb;
614 break;
615 default:
616 i->config->bitpix = 32;
617 i->config->nx = 1020;
618 i->config->ny = 2040;
619 i->config->prscx = 0;
620 i->config->prscy = 0;
621 i->config->ovscx = 0;
622 i->config->ovscy = 0;
623 i->config->ron = 0.6;
624 i->config->conad = 1.9;
625 i->config->pxspace = 1.8E-05 ;
626 i->config->orders = i->nir_orders_nb;
629 break;
630 }
631 i->config->naxis1 = (i->config->nx + i->config->prscx + i->config->ovscx)
632 / i->binx;
633 i->config->naxis2 = (i->config->ny + i->config->prscy + i->config->ovscy)
634 / i->biny;
635 }
636 cleanup:
637 return i->config;
638
639}
640
642{
643 int res = 1 ;
644
646 res = instrument->binx ;
647
648 cleanup:
649 return res ;
650}
651
653{
654 int res = 1 ;
655
657 res = instrument->biny ;
658
659 cleanup:
660 return res ;
661}
662
664{
665
668
669 cleanup:
670 return ;
671}
672
674{
675
678
679 cleanup:
680 return ;
681}
682
683/*--------------------------------------------------------------------------*/
689/*--------------------------------------------------------------------------*/
691 return xsh_mode_tostring(i->mode);
692}
693
694/*--------------------------------------------------------------------------*/
700/*--------------------------------------------------------------------------*/
702 return xsh_arm_tostring(i->arm);
703}
704
705/*--------------------------------------------------------------------------*/
711/*--------------------------------------------------------------------------*/
713 return xsh_lamp_tostring(i->lamp);
714}
715
716
717/*--------------------------------------------------------------------------*/
723/*--------------------------------------------------------------------------*/
725 return
726 (mode == XSH_MODE_IFU) ? "IFU" :
727 (mode == XSH_MODE_SLIT) ? "SLIT" : "UNDEFINED";
728}
729
730/*--------------------------------------------------------------------------*/
736/*--------------------------------------------------------------------------*/
737const char* xsh_arm_tostring(XSH_ARM arm){
738 return
739 (arm == XSH_ARM_UVB) ? "UVB" :
740 (arm == XSH_ARM_VIS) ? "VIS" :
741 (arm == XSH_ARM_NIR) ? "NIR" :
742 (arm == XSH_ARM_AGC) ? "AGC" : "UNDEFINED";
743}
744
745/*--------------------------------------------------------------------------*/
751/*--------------------------------------------------------------------------*/
752const char* xsh_lamp_tostring(XSH_LAMP lamp){
753 return
754 (lamp == XSH_LAMP_QTH) ? "QTH" :
755 (lamp == XSH_LAMP_D2) ? "D2" :
756 (lamp == XSH_LAMP_THAR) ? "THAR" : "UNDEFINED";
757}
758
759int
761{
762
763 int result=0;
764 cpl_propertylist* plist=NULL;
765 const char* name=NULL;
766 const char* slit=NULL;
767 name=cpl_frame_get_filename(frame);
768 plist=cpl_propertylist_load(name,0);
769 if(cpl_propertylist_has(plist,XSH_SLIT_NIR)) {
770 slit=xsh_pfits_get_slit_value(plist,instr);
771 if(strstr(slit,"JH")!=NULL) {
772 xsh_msg_warning("JH band, special case");
773 result=1;
774 }
775 }
776 xsh_free_propertylist(&plist);
777 return result;
778}
779
780cpl_error_code
782{
783 cpl_frame* frame=NULL;
784
785 frame=cpl_frameset_get_frame(raws,0);
786
787 if(instr->arm == XSH_ARM_NIR) {
788
789 if(xsh_instrument_nir_is_JH(frame,instr)) {
790 instr->config->order_min=13;
791 instr->config->order_max=26;
792 instr->config->orders=14;
793 }
794
795 }
796
797 return cpl_error_get_code();
798}
799
800
801cpl_error_code
803{
804 cpl_frame* frame=NULL;
805
806 if(instr->arm == XSH_ARM_NIR) {
807 frame=xsh_find_spectral_format( calib, instr);
808 XSH_ASSURE_NOT_NULL_MSG(frame,"Null input SPECTRAL_FORMAT_TAB");
809 if(xsh_instrument_nir_is_JH(frame,instr)) {
810 instr->config->order_min=13;
811 instr->config->order_max=26;
812 instr->config->orders=14;
813 }
814
815 }
816 cleanup:
817
818 return cpl_error_get_code();
819}
static char mode[32]
static xsh_instrument * instrument
int binx
int biny
xsh_spectralformat_list * xsh_spectralformat_list_load(cpl_frame *frame, xsh_instrument *instr)
Load a spectralformat list from a frame.
void xsh_spectralformat_list_free(xsh_spectralformat_list **list)
Free memory associated to an spactralformat_list.
#define XSH_ASSURE_NOT_NULL_MSG(pointer, msg)
Definition: xsh_error.h:103
#define XSH_ASSURE_NOT_ILLEGAL(cond)
Definition: xsh_error.h:107
#define assure(CONDITION, ERROR_CODE,...)
Definition: xsh_error.h:54
#define check(COMMAND)
Definition: xsh_error.h:71
#define XSH_ASSURE_NOT_NULL(pointer)
Definition: xsh_error.h:99
const char * xsh_instrument_mode_tostring(xsh_instrument *i)
Get the string associated with a mode.
const char * xsh_lamp_tostring(XSH_LAMP lamp)
Get the string associated with a lamp.
cpl_error_code xsh_instrument_nir_corr_if_spectral_format_is_JH(cpl_frameset *calib, xsh_instrument *instr)
cpl_error_code xsh_instrument_nir_corr_if_JH(cpl_frameset *raws, xsh_instrument *instr)
void xsh_instrument_set_mode(xsh_instrument *i, XSH_MODE mode)
Set a mode on instrument structure.
void xsh_instrument_update_from_spectralformat(xsh_instrument *i, cpl_frame *spectralformat_frame)
const char * xsh_instrument_arm_tostring(xsh_instrument *i)
Get the string associated with an arm.
void xsh_instrument_update_lamp(xsh_instrument *i, XSH_LAMP lamp)
void xsh_instrument_set_recipe_id(xsh_instrument *instrument, const char *recipe_id)
Set the recipe_id into the instrument structure.
double xsh_arcsec_get(xsh_instrument *instrument)
Get the Arc seconds per pixel for this Arm.
XSH_LAMP xsh_instrument_get_lamp(xsh_instrument *i)
Get a lamp on instrument structure.
void xsh_mode_set(xsh_instrument *instrument, XSH_MODE mode)
set the instrument mode as user specifies
int xsh_instrument_get_binx(xsh_instrument *instrument)
void xsh_instrument_set_arm(xsh_instrument *i, XSH_ARM arm)
Set an arm on instrument structure.
XSH_MODE xsh_instrument_get_mode(xsh_instrument *i)
Get a mode on instrument structure.
double xsh_resolution_get(xsh_instrument *instrument, double slit)
Get the resoltion.
const char * xsh_instrument_lamp_tostring(xsh_instrument *i)
Get the string associated with a lamp.
void xsh_instrument_set_biny(xsh_instrument *instrument, const int biny)
int xsh_instrument_nir_is_JH(cpl_frame *frame, xsh_instrument *instr)
const char * xsh_arm_tostring(XSH_ARM arm)
Get the string associated with an arm.
void xsh_instrument_set_binx(xsh_instrument *instrument, const int binx)
XSH_INSTRCONFIG * xsh_instrument_get_config(xsh_instrument *i)
Get the instrument default set of keywords.
xsh_instrument * xsh_instrument_duplicate(xsh_instrument *old)
int xsh_instrument_get_biny(xsh_instrument *instrument)
XSH_LAMP xsh_lamp_get(const char *tag)
get the lamp from the frame tag
XSH_ARM xsh_arm_get(const char *tag)
get the arm from the frame tag
void xsh_decode_bp_set(xsh_instrument *instrument, const int decode_bp)
set the instrument mode as user specifies
XSH_ARM xsh_instrument_get_arm(xsh_instrument *i)
Get an arm on instrument structure.
XSH_MODE xsh_mode_get(const char *tag)
get the mode from the frame tag
void xsh_instrument_set_lamp(xsh_instrument *i, XSH_LAMP lamp)
Set a lamp on instrument structure.
void xsh_instrument_parse_tag(xsh_instrument *inst, const char *tag)
analyse a frame tag to set data in 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.
const char * xsh_mode_tostring(XSH_MODE mode)
Get the string associated with a mode.
#define xsh_msg_warning(...)
Print an warning message.
Definition: xsh_msg.h:88
#define xsh_msg(...)
Print a message on info level.
Definition: xsh_msg.h:121
#define xsh_msg_dbg_low(...)
Definition: xsh_msg.h:48
char * xsh_pfits_get_slit_value(const cpl_propertylist *plist, xsh_instrument *instrument)
find out the INS OPTIx NAME value (the width of the slit)
Definition: xsh_pfits.c:619
void xsh_free_propertylist(cpl_propertylist **p)
Deallocate a property list and set the pointer to NULL.
Definition: xsh_utils.c:2179
const char * pipeline_id
const char * recipe_id
const char * dictionary
XSH_INSTRCONFIG * config
#define XSH_ORDER_MIN_VIS
#define XSH_ORDER_MAX_UVB
#define XSH_ORDERS_NIR
#define XSH_ORDER_MIN_UVB
#define XSH_ARCSEC_UVB
#define XSH_ORDERS_VIS
#define XSH_ORDER_MAX_VIS
#define XSH_ORDER_MAX_NIR
@ XSH_LAMP_UNDEFINED
@ XSH_LAMP_D2
@ XSH_LAMP_QTH
@ XSH_LAMP_THAR
@ XSH_LAMP_QTH_D2
@ XSH_ARM_AGC
@ XSH_ARM_UNDEFINED
@ XSH_ARM_UVB
@ XSH_ARM_NIR
@ XSH_ARM_VIS
#define XSH_ORDERS_UVB_D2
#define XSH_ORDERS_UVB_QTH
#define XSH_ORDERS_UVB
@ XSH_MODE_SLIT
@ XSH_MODE_IFU
@ XSH_MODE_UNDEFINED
#define XSH_ARCSEC_NIR
#define XSH_ORDER_MIN_NIR
#define XSH_ARCSEC_VIS
cpl_frame * xsh_find_spectral_format(cpl_frameset *frames, xsh_instrument *instr)
Find spectral format frame.
Definition: xsh_dfs.c:4318
#define XSH_SLIT_NIR
Definition: xsh_pfits.h:138
#define XSH_FREE(POINTER)
Definition: xsh_utils.h:92
#define XSH_MALLOC(POINTER, TYPE, SIZE)
Definition: xsh_utils.h:49