MOONS Pipeline Reference Manual 0.13.2
Data Structures | Typedefs | Functions
TARGET table functions

Data Structures

struct  moo_target_table
 the different type of detectors More...
 

Typedefs

typedef enum _moo_target_table_mode_ moo_target_table_mode
 The type code type.
 

Functions

const char * moo_target_table_mode_get_name (moo_target_table_mode m)
 Get the name of target mode.
 
moo_target_tablemoo_target_table_new (void)
 Create a new moo_target_table.
 
moo_target_tablemoo_target_table_duplicate (moo_target_table *self)
 Duplicate an existing target_table.
 
moo_target_tablemoo_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.
 
void moo_target_table_delete (moo_target_table *self)
 Delete a moo_target_table.
 
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_stare (moo_target_table *self)
 select STARE object in trget table
 
cpl_error_code moo_target_table_select_pstare (moo_target_table *self)
 select PSTARE object in trget table
 
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
 
moo_target_tablemoo_target_table_load (const cpl_frame *frame)
 Load a TARGET_TABLE frame and create a moo_target_table.
 
cpl_error_code moo_target_table_merge (moo_target_table *self, moo_target_table *tomerge)
 Merge two TARGET_TABLE.
 
int moo_target_table_find_target (moo_target_table *self, const char *targname)
 find target targindex in TARGET_TABLE
 
cpl_error_code moo_target_table_remove_coadd_cols (moo_target_table *self)
 remove columns for coadd in target_table
 
int moo_target_table_find_index (moo_target_table *self, const char *targname)
 find target indexspec in TARGET_TABLE
 
double moo_target_table_get_exptime (moo_target_table *self, int i, int j)
 rget the exptime of a target
 

Detailed Description

Function Documentation

◆ moo_create_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.

Parameters
rbnAthe RBN object
rbnBthe RBN (object B) or null
modethe TARGET_TABLE mode
paramsthe target_table parameters
Returns
target_table or NULL

Error code:

  • CPL_ERROR_NULL_INPUT if an input pointer is NULL

Definition at line 901 of file moo_target_table.c.

◆ moo_target_table_delete()

void moo_target_table_delete ( moo_target_table self)

Delete a moo_target_table.

Parameters
selfmoo_target_table to delete
Returns
void

If the moo_target_table self is NULL, nothing is done and no error is set.

Definition at line 949 of file moo_target_table.c.

Referenced by moo_sci_delete(), and moo_target_table_load().

◆ moo_target_table_duplicate()

moo_target_table * moo_target_table_duplicate ( moo_target_table self)

Duplicate an existing target_table.

Returns
1 newly allocated moo_target_table or NULL in case of an error

The returned object must be deallocated using moo_target_table_delete().

Definition at line 93 of file moo_target_table.c.

References moo_target_table_new().

Referenced by moo_sub_sky_stare().

◆ moo_target_table_find_index()

int moo_target_table_find_index ( moo_target_table self,
const char *  targname 
)

find target indexspec in TARGET_TABLE

Parameters
selfthe TARGET_TABLE
targnamethe name of TARGET_TABLE to find
Returns
the indexspec or -1

Possible cpl_error_code set in this function:

  • CPL_ERROR_NULL_INPUT if an input pointer is NULL _ CPL_ERROR_ILLEGAL_INPUT if table is NULL

Definition at line 1443 of file moo_target_table.c.

References moo_table_or_selected_sequal_string().

Referenced by moo_coadd(), and moo_compute_resp().

◆ moo_target_table_find_target()

int moo_target_table_find_target ( moo_target_table self,
const char *  targname 
)

find target targindex in TARGET_TABLE

Parameters
selfthe TARGET_TABLE
targnamethe name of TARGET_TABLE to find
Returns
the indextarg or -1

Possible cpl_error_code set in this function:

  • CPL_ERROR_NULL_INPUT if an input pointer is NULL _ CPL_ERROR_ILLEGAL_INPUT if table is NULL

Definition at line 1357 of file moo_target_table.c.

References moo_table_or_selected_sequal_string().

Referenced by moo_coadd(), moo_resp_create(), and moo_telluric_create().

◆ moo_target_table_get_exptime()

double moo_target_table_get_exptime ( moo_target_table self,
int  i,
int  j 
)

rget the exptime of a target

Parameters
selfthe TARGET_TABLE
ithe index of the TARGET_TABLE
jthe band
Returns
the error code

Definition at line 1528 of file moo_target_table.c.

Referenced by moo_create_s1d().

◆ moo_target_table_load()

moo_target_table * moo_target_table_load ( const cpl_frame *  frame)

Load a TARGET_TABLE frame and create a moo_target_table.

Parameters
framethe TARGET_TABLE frame
Returns
1 newly allocated moo_spectral_format or NULL in case of an error

The returned object must be deallocated using moo_target_table_delete().

Possible cpl_error_code set in this function:

  • CPL_ERROR_NULL_INPUT if an input pointer is NULL

Definition at line 1234 of file moo_target_table.c.

References moo_target_table_delete(), and moo_target_table_new().

◆ moo_target_table_merge()

cpl_error_code moo_target_table_merge ( moo_target_table self,
moo_target_table tomerge 
)

Merge two TARGET_TABLE.

Parameters
selfthe merge result TARGET_TABLE
tomergethe TARGET_TABLE to merge
Returns
error code or CPL_ERROR_NONE

Possible cpl_error_code set in this function:

  • CPL_ERROR_NULL_INPUT if an input pointer is NULL

Definition at line 1294 of file moo_target_table.c.

References moo_table_or_selected_sequal_string().

◆ moo_target_table_mode_get_name()

const char * moo_target_table_mode_get_name ( moo_target_table_mode  m)

Get the name of target mode.

Parameters
mthe target mode
Returns
target mode name

Error code:

  • None

Definition at line 60 of file moo_target_table.c.

◆ moo_target_table_new()

moo_target_table * moo_target_table_new ( void  )

Create a new moo_target_table.

Returns
1 newly allocated moo_target_table or NULL in case of an error

The returned object must be deallocated using moo_target_table_delete().

Definition at line 76 of file moo_target_table.c.

Referenced by moo_sci_get_target_table(), moo_target_table_duplicate(), and moo_target_table_load().

◆ moo_target_table_remove_coadd_cols()

cpl_error_code moo_target_table_remove_coadd_cols ( moo_target_table self)

remove columns for coadd in target_table

Parameters
selfthe TARGET_TABLE
Returns
the error code

Definition at line 1390 of file moo_target_table.c.

Referenced by moo_coadd().

◆ moo_target_table_select_nod()

cpl_error_code moo_target_table_select_nod ( moo_target_table self)

select STARE object in trget table

Parameters
selfthe target table
Returns
the error_code or CPL_ERROR_NONE

Definition at line 1083 of file moo_target_table.c.

◆ moo_target_table_select_obj_index()

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

Parameters
selfthe target table
ispairedif TRUE select the index of fibres in paired mode
Returns
the array index

Definition at line 1184 of file moo_target_table.c.

Referenced by moo_sub_sky_stare().

◆ moo_target_table_select_pnod()

cpl_error_code moo_target_table_select_pnod ( moo_target_table self)

select STARE object in trget table

Parameters
selfthe target table
Returns
the error_code or CPL_ERROR_NONE

Definition at line 1108 of file moo_target_table.c.

◆ moo_target_table_select_pstare()

cpl_error_code moo_target_table_select_pstare ( moo_target_table self)

select PSTARE object in trget table

Parameters
selfthe target table
Returns
the error_code or CPL_ERROR_NONE

Definition at line 1056 of file moo_target_table.c.

◆ moo_target_table_select_sky_index()

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

Parameters
selfthe target table
sky_rbnthe RBN sky
Returns
the array index

Definition at line 973 of file moo_target_table.c.

References moo_fibres_table_by_indexrbn(), and moo_rbn_get_fibre_table().

Referenced by moo_sub_sky_stare().

◆ moo_target_table_select_stare()

cpl_error_code moo_target_table_select_stare ( moo_target_table self)

select STARE object in trget table

Parameters
selfthe target table
Returns
the error_code or CPL_ERROR_NONE

Definition at line 1027 of file moo_target_table.c.

◆ moo_target_table_xswitch_paired()

int moo_target_table_xswitch_paired ( moo_target_table self)

get the index of the object in the target table sort by indexrbn

Parameters
selfthe target table
Returns
the array index

Definition at line 1131 of file moo_target_table.c.

Referenced by moo_sub_sky_stare().