20#ifndef MOO_FIBRES_TABLE_H
21#define MOO_FIBRES_TABLE_H
29#include <moo_detector.h>
38#define MOO_FIBRES_TABLE_EXTNAME "FIBRE_TABLE"
39#define MOO_FIBRES_TABLE_INDEX "INDEX"
40#define MOO_FIBRES_TABLE_INDEXEXT "INDEXEXT"
41#define MOO_FIBRES_TABLE_INDEXRBN "INDEXRBN"
43#define MOO_FIBRES_TABLE_FIBRE "FIBRE"
44#define MOO_FIBRES_TABLE_PAIREDFIBRE "PAIREDINDEX"
45#define MOO_FIBRES_TABLE_HEALTH "HEALTH"
46#define MOO_FIBRES_TABLE_HEALTH_BROKEN 0
47#define MOO_FIBRES_TABLE_HEALTH_GOOD 1
48#define MOO_FIBRES_TABLE_HEALTH_NEWLY_BROKEN 2
49#define MOO_FIBRES_TABLE_SPECTRO "SPECTRO"
50#define MOO_FIBRES_TABLE_SLITLET "SLITLET"
51#define MOO_FIBRES_TABLE_TARGNAME "TARGNAME"
52#define MOO_FIBRES_TABLE_TARGALPHA "TARGALPHA"
53#define MOO_FIBRES_TABLE_TARGDELTA "TARGDELTA"
54#define MOO_FIBRES_TABLE_TYPE "TYPE"
66#define MOO_FIBRES_TABLE_TYPE_CHECKOBJ "Q"
67#define MOO_FIBRES_TABLE_TYPE_SCIENCE "T"
68#define MOO_FIBRES_TABLE_TYPE_SKY "S"
69#define MOO_FIBRES_TABLE_TYPE_BLANK "V"
70#define MOO_FIBRES_TABLE_TYPE_SKYCONTAM "C"
71#define MOO_FIBRES_TABLE_TYPE_STD_FLUX "P"
72#define MOO_FIBRES_TABLE_TYPE_STD_TELL "K"
74#define MOO_FIBRES_TABLE_SPECTRO_1 1
75#define MOO_FIBRES_TABLE_SPECTRO_2 2
77#define MOO_FIBRES_TABLE_TYPE_NOD "TYPE_NOD"
78#define MOO_FIBRES_TABLE_TRANS_RI "TRANS_RI"
79#define MOO_FIBRES_TABLE_TRANS_YJ "TRANS_YJ"
80#define MOO_FIBRES_TABLE_TRANS_H "TRANS_H"
82#define MOO_FIBRES_TABLE_GOODPTSFRAC_RI "GOODPTSFRAC_RI"
83#define MOO_FIBRES_TABLE_GOODPTSFRAC_YJ "GOODPTSFRAC_YJ"
84#define MOO_FIBRES_TABLE_GOODPTSFRAC_H "GOODPTSFRAC_H"
86#define MOO_FIBRES_TABLE_MEDSNR_RI_EXT "MEDIAN_SNR_RI_EXT"
87#define MOO_FIBRES_TABLE_MEDSNR_YJ_EXT "MEDIAN_SNR_YJ_EXT"
88#define MOO_FIBRES_TABLE_MEDSNR_H_EXT "MEDIAN_SNR_H_EXT"
90#define MOO_FIBRES_TABLE_DERSNR_RI_EXT "DERSNR_RI_EXT"
91#define MOO_FIBRES_TABLE_DERSNR_YJ_EXT "DERSNR_YJ_EXT"
92#define MOO_FIBRES_TABLE_DERSNR_H_EXT "DERSNR_H_EXT"
94#define MOO_FIBRES_TABLE_MEDSNR_RI_RBN "MEDIAN_SNR_RI_RBN"
95#define MOO_FIBRES_TABLE_MEDSNR_YJ_RBN "MEDIAN_SNR_YJ_RBN"
96#define MOO_FIBRES_TABLE_MEDSNR_H_RBN "MEDIAN_SNR_H_RBN"
98#define MOO_FIBRES_TABLE_DETECTLINE_RI "DETECTLINE_RI"
99#define MOO_FIBRES_TABLE_DETECTLINE_YJ "DETECTLINE_YJ"
100#define MOO_FIBRES_TABLE_DETECTLINE_H "DETECTLINE_H"
102#define MOO_FIBRES_TABLE_FAILEDFIT_RI "FAILEDFIT_RI"
103#define MOO_FIBRES_TABLE_FAILEDFIT_YJ "FAILEDFIT_YJ"
104#define MOO_FIBRES_TABLE_FAILEDFIT_H "FAILEDFIT_H"
106#define MOO_FIBRES_TABLE_FITLINE_RI "FITLINE_RI"
107#define MOO_FIBRES_TABLE_FITLINE_YJ "FITLINE_YJ"
108#define MOO_FIBRES_TABLE_FITLINE_H "FITLINE_H"
110#define MOO_FIBRES_TABLE_MATCHLINE_RI "MATCHLINE_RI"
111#define MOO_FIBRES_TABLE_MATCHLINE_YJ "MATCHLINE_YJ"
112#define MOO_FIBRES_TABLE_MATCHLINE_H "MATCHLINE_H"
114#define MOO_FIBRES_TABLE_MODELLINE_RI "MODELLINE_RI"
115#define MOO_FIBRES_TABLE_MODELLINE_YJ "MODELLINE_YJ"
116#define MOO_FIBRES_TABLE_MODELLINE_H "MODELLINE_H"
118#define MOO_FIBRES_TABLE_REJECTLINE_RI "REJECTLINE_RI"
119#define MOO_FIBRES_TABLE_REJECTLINE_YJ "REJECTLINE_YJ"
120#define MOO_FIBRES_TABLE_REJECTLINE_H "REJECTLINE_H"
122#define MOO_FIBRES_TABLE_XDIFF_MEDIAN_RI "XDIFF_MEDIAN_RI"
123#define MOO_FIBRES_TABLE_XDIFF_MEDIAN_YJ "XDIFF_MEDIAN_YJ"
124#define MOO_FIBRES_TABLE_XDIFF_MEDIAN_H "XDIFF_MEDIAN_H"
126#define MOO_FIBRES_TABLE_MONOTONOUS_RI "MONOTONOUS_RI"
127#define MOO_FIBRES_TABLE_MONOTONOUS_YJ "MONOTONOUS_YJ"
128#define MOO_FIBRES_TABLE_MONOTONOUS_H "MONOTONOUS_H"
130#define MOO_FIBRES_TABLE_MAG "MAG"
202int moo_fibres_table_get_spectro(
int num);
enum _moo_detector_type_ moo_detector_type
The type code type.
int moo_fibres_table_filter_health(cpl_table *table)
Filter bad health data in fibre table.
cpl_error_code moo_fibres_table_add_wavecalguess_cols(cpl_table *table)
add wavecal additional columns
cpl_table * moo_fibre_table_load(cpl_frame *frame)
Load a fibre table from a file.
cpl_error_code moo_fibres_table_by_index(cpl_table *table)
Order fibres table by INDEX (ASC)
cpl_error_code moo_fibres_table_add_wavecal_cols(cpl_table *table, cpl_table *guess, const char *model)
add wavecal additional columns
cpl_error_code moo_fibres_table_set_matchline(cpl_table *table, moo_detector_type type, cpl_size row, int value)
set the number of match lines for the given detector type
int moo_fibres_table_get_spectro_nrow(cpl_table *table, int num)
get the number of rows of a spectro in the fibre table
cpl_error_code moo_fibres_table_set_failedfit(cpl_table *table, moo_detector_type type, cpl_size row, int value)
set the number od failedfit lines for the given detector type
float * moo_fibres_table_get_median_snr(cpl_table *table, moo_detector_type type)
get the data of median_snr for the given detector type
cpl_array * moo_fibres_table_get_spectro_indexext(cpl_table *table, int num)
get the index of a spectro in the fibre table sort by spetcro,indexext
cpl_error_code moo_fibres_table_set_fitline(cpl_table *table, moo_detector_type type, cpl_size row, int value)
set the number of fit lines for the given detector type
cpl_error_code moo_fibres_table_set_modelline(cpl_table *table, moo_detector_type type, cpl_size row, int value)
set the number of model lines for the given detector type
cpl_table * moo_fibres_table_get_spectro_table(cpl_table *table, int num)
get the selection of a spectro in the fibre table
int moo_fibres_table_get_matchline(cpl_table *table, moo_detector_type type, cpl_size row)
Get the number of matched lines for the given detector type.
int moo_fibres_table_get_rejectline(cpl_table *table, moo_detector_type type, cpl_size row)
Get the number of rejected lines for the given detector type.
double moo_fibres_table_get_xdiff(cpl_table *table, moo_detector_type type, cpl_size row)
Get xdiff for the given detector type.
cpl_error_code moo_fibres_table_set_xdiff(cpl_table *table, moo_detector_type type, cpl_size row, double value)
set the xdiff for the given fibre and detector type
cpl_error_code moo_fibres_table_add_extract_cols(cpl_table *table)
add extract additional columns
const char * moo_fibres_table_get_std_name(cpl_table *table)
get the object name of the STD type in the fibre table
cpl_error_code moo_fibres_table_set_detectline(cpl_table *table, moo_detector_type type, cpl_size row, int value)
set the number od detectline for the given detector type
cpl_error_code moo_fibres_table_add_f2f_cols(cpl_table *table)
add f2f additional columns
cpl_array * moo_fibres_table_get_spectro_index(cpl_table *table, int num)
get the index of a spectro in the fibre table sort by index on the slit
cpl_error_code moo_fibres_table_by_indexrbn(cpl_table *table)
Order fibres table by INDEXRBN (ASC)
cpl_error_code moo_fibres_table_add_nod_cols(cpl_table *table)
add nod additional columns
cpl_error_code moo_fibres_table_rbn_to_ext(cpl_table *table, int rbnindex, int *extindex, int *num)
get from indexrbn the corresponding indexext and num
cpl_error_code moo_fibres_table_add_locguess_cols(cpl_table *table)
add localise guess additional columns
cpl_error_code moo_fibres_table_add_rebin_cols(cpl_table *table)
add rebin additional columns
cpl_error_code moo_fibres_table_set_rejectline(cpl_table *table, moo_detector_type type, cpl_size row, int value)
set the number of rejected lines for the given detector type
cpl_error_code moo_fibres_table_erase_extract_cols(cpl_table *table)
erase extract additional columns