20#ifndef MOO_TARGET_TABLE_H
21#define MOO_TARGET_TABLE_H
29#include "moo_params.h"
33#include "moo_sky_lines_list.h"
35#define MOO_TARGET_TABLE_INDEXTARG "INDEXTARG"
36#define MOO_TARGET_TABLE_TARGNAME "TARGNAME"
37#define MOO_TARGET_TABLE_TARGALPHA "TARGALPHA"
38#define MOO_TARGET_TABLE_TARGDELTA "TARGDELTA"
39#define MOO_TARGET_TABLE_TYPE "TYPE"
40#define MOO_TARGET_TABLE_TYPENOD "TYPE_NOD"
41#define MOO_TARGET_TABLE_FIBRE "FIBRE"
42#define MOO_TARGET_TABLE_INDEX "INDEX"
43#define MOO_TARGET_TABLE_PAIREDFIBRE "PAIREDFIBRE"
44#define MOO_TARGET_TABLE_INDEXRBN "INDEXRBN"
45#define MOO_TARGET_TABLE_PAIREDINDEXRBN "PAIREDINDEXRBN"
46#define MOO_TARGET_TABLE_OBSTYPE "OBSTYPE"
47#define MOO_TARGET_TABLE_SUBSKYMODE "SUBSKYMODE"
48#define MOO_TARGET_TABLE_SUBSKY_NOD "NOD"
49#define MOO_TARGET_TABLE_SUBSKY_STARE "STARE"
50#define MOO_TARGET_TABLE_SUBSKY_MIXED "MIXED"
51#define MOO_TARGET_TABLE_SPECTRO "SPECTRO"
53#define MOO_OBSTYPE_SKYSTARE "SKY_STARE"
54#define MOO_OBSTYPE_OBSSTARE "OBS_STARE"
55#define MOO_OBSTYPE_SKYRESSTARE "SKYRES_STARE"
56#define MOO_OBSTYPE_SKYRESPSTARE "SKYRES_P_STARE"
57#define MOO_OBSTYPE_OBSPSTARE "OBS_P_STARE"
58#define MOO_OBSTYPE_OBSNOD "OBS_NOD"
59#define MOO_OBSTYPE_SKYRESNOD "SKYRES_NOD"
60#define MOO_OBSTYPE_OBSSWITCH "OBS_SWITCH"
61#define MOO_OBSTYPE_OBSSWITCHSTARE "OBS_SWITCHSTARE"
62#define MOO_OBSTYPE_OBSNODSTARE "OBS_NODSTARE"
64#define MOO_OBSTYPE_OBSPNOD "OBS_P_NOD"
65#define MOO_OBSTYPE_OBSPNODSTARE "OBS_P_NODSTARE"
67#define MOO_TARGET_TABLE_EXPTIMERI "EXPTIMERI"
68#define MOO_TARGET_TABLE_EXPTIMEYJ "EXPTIMEYJ"
69#define MOO_TARGET_TABLE_EXPTIMEH "EXPTIMEH"
71#define MOO_TARGET_TABLE_MAG "MAG"
73#define MOO_TARGET_TABLE_NBSKY "NSKY_FIBRES"
74#define MOO_TARGET_TABLE_MAX_DIST_SLIT "MAX_DIST_SLIT"
75#define MOO_TARGET_TABLE_MAX_DIST_SKY "MAX_DIST_SKY"
76#define MOO_TARGET_TABLE_PNBSKY "PNSKY_FIBRES"
77#define MOO_TARGET_TABLE_PMAX_DIST_SLIT "PMAX_DIST_SLIT"
78#define MOO_TARGET_TABLE_PMAX_DIST_SKY "PMAX_DIST_SKY"
80#define MOO_TARGET_TABLE_TRANSRI "TRANSRI"
81#define MOO_TARGET_TABLE_TRANSYJ "TRANSYJ"
82#define MOO_TARGET_TABLE_TRANSH "TRANSH"
83#define MOO_TARGET_TABLE_PTRANSRI "PTRANSRI"
84#define MOO_TARGET_TABLE_PTRANSYJ "PTRANSYJ"
85#define MOO_TARGET_TABLE_PTRANSH "PTRANSH"
87#define MOO_TARGET_TABLE_MEDSNRRI_EXT "MEDIAN_SNR_RI_EXT"
88#define MOO_TARGET_TABLE_MEDSNRYJ_EXT "MEDIAN_SNR_YJ_EXT"
89#define MOO_TARGET_TABLE_MEDSNRH_EXT "MEDIAN_SNR_H_EXT"
91#define MOO_TARGET_TABLE_DERSNRRI_EXT "DERSNR_RI_EXT"
92#define MOO_TARGET_TABLE_DERSNRYJ_EXT "DERSNR_YJ_EXT"
93#define MOO_TARGET_TABLE_DERSNRH_EXT "DERSNR_H_EXT"
95#define MOO_TARGET_TABLE_MEDSNRRI_RBN "MEDIAN_SNR_RI_RBN"
96#define MOO_TARGET_TABLE_MEDSNRYJ_RBN "MEDIAN_SNR_YJ_RBN"
97#define MOO_TARGET_TABLE_MEDSNRH_RBN "MEDIAN_SNR_H_RBN"
99#define MOO_TARGET_TABLE_PMEDSNRRI_EXT "PMEDIAN_SNR_RI_EXT"
100#define MOO_TARGET_TABLE_PMEDSNRYJ_EXT "PMEDIAN_SNR_YJ_EXT"
101#define MOO_TARGET_TABLE_PMEDSNRH_EXT "PMEDIAN_SNR_H_EXT"
103#define MOO_TARGET_TABLE_PDERSNRRI_EXT "PDERSNR_RI_EXT"
104#define MOO_TARGET_TABLE_PDERSNRYJ_EXT "PDERSNR_YJ_EXT"
105#define MOO_TARGET_TABLE_PDERSNRH_EXT "PDERSNR_H_EXT"
107#define MOO_TARGET_TABLE_PMEDSNRRI_RBN "PMEDIAN_SNR_RI_RBN"
108#define MOO_TARGET_TABLE_PMEDSNRYJ_RBN "PMEDIAN_SNR_YJ_RBN"
109#define MOO_TARGET_TABLE_PMEDSNRH_RBN "PMEDIAN_SNR_H_RBN"
111#define MOO_TARGET_TABLE_MEDSNRRI_SCI "MEDIAN_SNR_RI_SCI"
112#define MOO_TARGET_TABLE_MEDSNRYJ_SCI "MEDIAN_SNR_YJ_SCI"
113#define MOO_TARGET_TABLE_MEDSNRH_SCI "MEDIAN_SNR_H_SCI"
115#define MOO_TARGET_TABLE_EXTNAME "TARGET_TABLE"
125 const char *filename;
126 cpl_propertylist *primary_header;
130enum _moo_target_table_mode_
164 moo_target_table_params *params);
211int moo_is_obstype_stare(
const char *obstype);
cpl_array * moo_target_table_select_sky_index(moo_target_table *self, moo_rbn *sky_rbn)
get the index of the sky in the target table sort by indexspec
cpl_error_code moo_target_table_select_pstare(moo_target_table *self)
select PSTARE object in trget table
void moo_target_table_delete(moo_target_table *self)
Delete a moo_target_table.
double moo_target_table_get_exptime(moo_target_table *self, int i, int j)
rget the exptime of a target
moo_target_table * moo_target_table_load(const cpl_frame *frame)
Load a TARGET_TABLE frame and create a moo_target_table.
moo_target_table * moo_target_table_new(void)
Create a new moo_target_table.
moo_target_table * moo_target_table_duplicate(moo_target_table *self)
Duplicate an existing target_table.
enum _moo_target_table_mode_ moo_target_table_mode
The type code type.
cpl_error_code moo_target_table_merge(moo_target_table *self, moo_target_table *tomerge)
Merge two TARGET_TABLE.
cpl_error_code moo_target_table_select_stare(moo_target_table *self)
select STARE object in trget table
int moo_target_table_find_index(moo_target_table *self, const char *targname)
find target indexspec in TARGET_TABLE
int moo_target_table_find_target(moo_target_table *self, const char *targname)
find target targindex in TARGET_TABLE
moo_target_table * moo_create_target_table(moo_rbn *rbnA, moo_rbn *rbnB, moo_target_table_mode mode, moo_target_table_params *params)
Prepare target table for SCI frames using their attached fibre.
cpl_error_code moo_target_table_select_nod(moo_target_table *self)
select STARE object in trget table
cpl_error_code moo_target_table_select_pnod(moo_target_table *self)
select STARE object in trget table
int moo_target_table_xswitch_paired(moo_target_table *self)
get the index of the object in the target table sort by indexrbn
cpl_array * moo_target_table_select_obj_index(moo_target_table *self, int ispaired)
get the index of the object in the target table sort by indexrbn
const char * moo_target_table_mode_get_name(moo_target_table_mode m)
Get the name of target mode.
cpl_error_code moo_target_table_remove_coadd_cols(moo_target_table *self)
remove columns for coadd in target_table
the different type of detectors