MOONS Pipeline Reference Manual 0.13.1
Functions
FIBRE TABLE format

Functions

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_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_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_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_add_locguess_cols (cpl_table *table)
 add localise guess additional columns
 
cpl_error_code moo_fibres_table_add_extract_cols (cpl_table *table)
 add extract additional columns
 
cpl_error_code moo_fibres_table_add_f2f_cols (cpl_table *table)
 add f2f additional columns
 
cpl_error_code moo_fibres_table_add_rebin_cols (cpl_table *table)
 add rebin additional columns
 
cpl_error_code moo_fibres_table_add_nod_cols (cpl_table *table)
 add nod additional columns
 
cpl_error_code moo_fibres_table_erase_extract_cols (cpl_table *table)
 erase extract additional columns
 
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_add_wavecalguess_cols (cpl_table *table)
 add wavecal additional columns
 
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_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_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
 
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_matchline (cpl_table *table, moo_detector_type type, cpl_size row, int value)
 set the number of match 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_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_set_xdiff (cpl_table *table, moo_detector_type type, cpl_size row, double value)
 set the xdiff for the given fibre and detector type
 
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.
 
int moo_fibres_table_filter_health (cpl_table *table)
 Filter bad health data in fibre table.
 
cpl_table * moo_fibre_table_load (cpl_frame *frame)
 Load a fibre table from a file.
 
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_rbn_to_ext (cpl_table *table, int indexrbn, int *indexext, int *num)
 get from indexrbn the corresponding indexext and num
 
cpl_error_code moo_fibres_table_by_indexrbn (cpl_table *table)
 Order fibres table by INDEXRBN (ASC)
 
cpl_error_code moo_fibres_table_by_index (cpl_table *table)
 Order fibres table by INDEX (ASC)
 

Detailed Description

This module provides functions to use FIBRE TABLE

Functionality include:

Synopsis:
#include "moo_map.h"

Function Documentation

◆ moo_fibre_table_load()

cpl_table * moo_fibre_table_load ( cpl_frame *  frame)

Load a fibre table from a file.

Parameters
framethe frame conataining fibre table
Returns
the fibre table

Definition at line 877 of file moo_fibres_table.c.

◆ moo_fibres_table_add_extract_cols()

cpl_error_code moo_fibres_table_add_extract_cols ( cpl_table *  table)

add extract additional columns

Parameters
tablethe fibre table
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
  • CPL_ERROR_INVALID_TYPE The specified type is not supported.
  • CPL_ERROR_ILLEGAL_OUTPUT A column with the same name already exists in table.

Definition at line 234 of file moo_fibres_table.c.

Referenced by moo_extract().

◆ moo_fibres_table_add_f2f_cols()

cpl_error_code moo_fibres_table_add_f2f_cols ( cpl_table *  table)

add f2f additional columns

Parameters
tablethe fibre table
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
  • CPL_ERROR_INVALID_TYPE The specified type is not supported.
  • CPL_ERROR_ILLEGAL_OUTPUT A column with the same name already exists in table.

Definition at line 274 of file moo_fibres_table.c.

Referenced by moo_apply_flat().

◆ moo_fibres_table_add_locguess_cols()

cpl_error_code moo_fibres_table_add_locguess_cols ( cpl_table *  table)

add localise guess additional columns

Parameters
tablethe fibre table
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
  • CPL_ERROR_INVALID_TYPE The specified type is not supported.
  • CPL_ERROR_ILLEGAL_OUTPUT A column with the same name already exists in table.

Definition at line 200 of file moo_fibres_table.c.

◆ moo_fibres_table_add_nod_cols()

cpl_error_code moo_fibres_table_add_nod_cols ( cpl_table *  table)

add nod additional columns

Parameters
tablethe fibre table
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
  • CPL_ERROR_INVALID_TYPE The specified type is not supported.
  • CPL_ERROR_ILLEGAL_OUTPUT A column with the same name already exists in table.

Definition at line 346 of file moo_fibres_table.c.

Referenced by moo_subtract_nod().

◆ moo_fibres_table_add_rebin_cols()

cpl_error_code moo_fibres_table_add_rebin_cols ( cpl_table *  table)

add rebin additional columns

Parameters
tablethe fibre table
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
  • CPL_ERROR_INVALID_TYPE The specified type is not supported.
  • CPL_ERROR_ILLEGAL_OUTPUT A column with the same name already exists in table.

Definition at line 302 of file moo_fibres_table.c.

Referenced by moo_rebin().

◆ moo_fibres_table_add_wavecal_cols()

cpl_error_code moo_fibres_table_add_wavecal_cols ( cpl_table *  table,
cpl_table *  guess,
const char *  model 
)

add wavecal additional columns

Parameters
tablethe fibre table
guessthe guess fibre table
modelthe name of the guess model
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
  • CPL_ERROR_INVALID_TYPE The specified type is not supported.
  • CPL_ERROR_ILLEGAL_OUTPUT A column with the same name already exists in table.

Definition at line 402 of file moo_fibres_table.c.

References moo_fibres_table_get_matchline(), moo_fibres_table_get_rejectline(), moo_fibres_table_set_matchline(), and moo_fibres_table_set_modelline().

◆ moo_fibres_table_add_wavecalguess_cols()

cpl_error_code moo_fibres_table_add_wavecalguess_cols ( cpl_table *  table)

add wavecal additional columns

Parameters
tablethe fibre table
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
  • CPL_ERROR_INVALID_TYPE The specified type is not supported.
  • CPL_ERROR_ILLEGAL_OUTPUT A column with the same name already exists in table.

Definition at line 514 of file moo_fibres_table.c.

◆ moo_fibres_table_by_index()

cpl_error_code moo_fibres_table_by_index ( cpl_table *  table)

Order fibres table by INDEX (ASC)

Parameters
tablefibres table
Returns
error code

Definition at line 1006 of file moo_fibres_table.c.

Referenced by moo_extract().

◆ moo_fibres_table_by_indexrbn()

cpl_error_code moo_fibres_table_by_indexrbn ( cpl_table *  table)

Order fibres table by INDEXRBN (ASC)

Parameters
tablefibres table
Returns
error code

Definition at line 985 of file moo_fibres_table.c.

Referenced by moo_target_table_select_sky_index().

◆ moo_fibres_table_erase_extract_cols()

cpl_error_code moo_fibres_table_erase_extract_cols ( cpl_table *  table)

erase extract additional columns

Parameters
tablethe fibre table
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
  • CPL_ERROR_INVALID_TYPE The specified type is not supported.
  • CPL_ERROR_ILLEGAL_OUTPUT A column with the same name already exists in table.

Definition at line 375 of file moo_fibres_table.c.

◆ moo_fibres_table_filter_health()

int moo_fibres_table_filter_health ( cpl_table *  table)

Filter bad health data in fibre table.

Parameters
tablethe fibre table
Returns
the number of good lines

Definition at line 860 of file moo_fibres_table.c.

◆ moo_fibres_table_get_matchline()

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.

Parameters
tablethe fibre table
typethe detector type
rowthe row
Returns
number of lines

Definition at line 787 of file moo_fibres_table.c.

Referenced by moo_fibres_table_add_wavecal_cols().

◆ moo_fibres_table_get_median_snr()

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

Parameters
tablethe fibre table
typethe detector type
Returns
the column data

Definition at line 572 of file moo_fibres_table.c.

◆ moo_fibres_table_get_rejectline()

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.

Parameters
tablethe fibre table
typethe detector type
rowthe row
Returns
number of lines

Definition at line 812 of file moo_fibres_table.c.

Referenced by moo_fibres_table_add_wavecal_cols().

◆ moo_fibres_table_get_spectro_index()

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

Parameters
tablethe fibre table
numthe spectro number
Returns
the array index

Definition at line 77 of file moo_fibres_table.c.

Referenced by moo_apply_flat().

◆ moo_fibres_table_get_spectro_indexext()

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

Parameters
tablethe fibre table
numthe spectro number
Returns
the array index or NULL

Definition at line 109 of file moo_fibres_table.c.

Referenced by moo_extract(), and moo_rebin().

◆ moo_fibres_table_get_spectro_nrow()

int moo_fibres_table_get_spectro_nrow ( cpl_table *  table,
int  num 
)

get the number of rows of a spectro in the fibre table

Parameters
tablethe fibre table
numthe spectro number
Returns
the number of rows or -1

Definition at line 178 of file moo_fibres_table.c.

◆ moo_fibres_table_get_spectro_table()

cpl_table * moo_fibres_table_get_spectro_table ( cpl_table *  table,
int  num 
)

get the selection of a spectro in the fibre table

Parameters
tablethe fibre table
numthe spectro number
Returns
the table selection

Definition at line 156 of file moo_fibres_table.c.

Referenced by moo_f2f_create().

◆ moo_fibres_table_get_std_name()

const char * moo_fibres_table_get_std_name ( cpl_table *  table)

get the object name of the STD type in the fibre table

Parameters
tablethe fibre table
Returns
the name or NULL if not find

Definition at line 902 of file moo_fibres_table.c.

◆ moo_fibres_table_get_xdiff()

double moo_fibres_table_get_xdiff ( cpl_table *  table,
moo_detector_type  type,
cpl_size  row 
)

Get xdiff for the given detector type.

Parameters
tablethe fibre table
typethe detector type
rowthe row
Returns
the xdiff

Definition at line 837 of file moo_fibres_table.c.

◆ moo_fibres_table_rbn_to_ext()

cpl_error_code moo_fibres_table_rbn_to_ext ( cpl_table *  table,
int  indexrbn,
int *  indexext,
int *  num 
)

get from indexrbn the corresponding indexext and num

Parameters
tablethe fibre table
indexrbnthe rbn index
indexextthe corresponding indexext or -1
numthe corresponding num or -1
Returns
the cpl error code

Definition at line 942 of file moo_fibres_table.c.

◆ moo_fibres_table_set_detectline()

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

Parameters
tablethe fibre table
typethe detector type
rowthe row
valuethe number of lines
Returns
error code or CPL_ERROR_NONE;

Definition at line 595 of file moo_fibres_table.c.

◆ moo_fibres_table_set_failedfit()

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

Parameters
tablethe fibre table
typethe detector type
rowthe row
valuethe number of lines
Returns
error code or CPL_ERROR_NONE;

Definition at line 624 of file moo_fibres_table.c.

◆ moo_fibres_table_set_fitline()

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

Parameters
tablethe fibre table
typethe detector type
rowthe row
valuethe number of lines
Returns
error code or CPL_ERROR_NONE;

Definition at line 652 of file moo_fibres_table.c.

◆ moo_fibres_table_set_matchline()

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

Parameters
tablethe fibre table
typethe detector type
rowthe row
valuethe number of lines
Returns
error code or CPL_ERROR_NONE;

Definition at line 681 of file moo_fibres_table.c.

Referenced by moo_fibres_table_add_wavecal_cols().

◆ moo_fibres_table_set_modelline()

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

Parameters
tablethe fibre table
typethe detector type
rowthe row
valuethe number of lines
Returns
error code or CPL_ERROR_NONE;

Definition at line 708 of file moo_fibres_table.c.

Referenced by moo_fibres_table_add_wavecal_cols().

◆ moo_fibres_table_set_rejectline()

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

Parameters
tablethe fibre table
typethe detector type
rowthe row
valuethe number of lines
Returns
error code or CPL_ERROR_NONE;

Definition at line 734 of file moo_fibres_table.c.

◆ moo_fibres_table_set_xdiff()

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

Parameters
tablethe fibre table
typethe detector type
rowthe row
valuethe number of lines
Returns
error code or CPL_ERROR_NONE;

Definition at line 762 of file moo_fibres_table.c.