MOONS Pipeline Reference Manual 0.13.2
Functions
Moons products management

Functions

moo_products * moo_products_new (cpl_frameset *framelist, const cpl_parameterlist *parlist, const char *recid, const char *pipeline_id)
 create a moo_product object for a recipe
 
const moo_params * moo_products_get_params (const moo_products *self)
 get the moo_params object
 
cpl_error_code moo_products_add_frame (const moo_products *self, cpl_frame *frame)
 add a frame to the recipe products
 
cpl_frame * moo_products_add (moo_products *self, moo_det *det, cpl_frame_level level, const char *tag, const char *filename, const cpl_frame *inherit_frame)
 create a product from a DET object
 
cpl_frame * moo_products_add_loc (moo_products *self, moo_loc *loc, int keep_points, cpl_frame_level level, const char *tag, const char *filename, const cpl_frame *inherit_frame)
 This function creates a product from a LOC structure.
 
cpl_frame * moo_products_add_ext (moo_products *self, moo_ext *ext, cpl_frame_level level, const char *tag, const char *filename, const cpl_frame *inherit_frame)
 create a product from a EXT object
 
cpl_frame * moo_products_add_rbn (moo_products *self, moo_rbn *rbn, cpl_frame_level level, const char *tag, const char *filename, const cpl_frame *inherit_frame)
 create a product from a RBN object
 
cpl_frame * moo_products_add_sci (moo_products *self, moo_sci *sci, cpl_frame_level level, const char *tag, const char *filename, const cpl_frame *inherit_frame)
 create a product from a SCI object
 
cpl_frame * moo_products_add_resp (moo_products *self, moo_resp *resp, cpl_frame_level level, const char *tag, const char *filename, const cpl_frame *inherit_frame)
 create a product from a RESP object
 
cpl_frame * moo_products_add_telluric (moo_products *self, moo_telluric *tell, cpl_frame_level level, const char *tag, const char *filename, const cpl_frame *inherit_frame)
 create a product from a TELLURIC object
 
cpl_frame * moo_products_add_map (moo_products *self, moo_map *map, cpl_frame_level level, const char *tag, const char *filename, const cpl_frame *inherit_frame, moo_rbn *rbn)
 create a product from a EXT object
 
cpl_frame * moo_products_add_molectable (moo_products *self, moo_molectable *mtable, cpl_frame_level level, const char *tag, const char *filename, const cpl_frame *inherit_frame)
 create a product from a MOLECTABLE object
 
cpl_frame * moo_products_add_bpm (moo_products *self, moo_bpm *bpm, cpl_frame_level level, const char *tag, const char *filename, const cpl_frame *inherit_frame)
 create a product from a BPM object
 
cpl_frame * moo_products_add_saturate_map (moo_products *self, moo_saturate_map *saturate, cpl_frame_level level, const char *tag, const char *filename, const cpl_frame *inherit_frame)
 create a product from a SATURATE MAP object
 
cpl_frame * moo_products_add_cube (moo_products *self, moo_cube *cube, cpl_frame_level level, const char *tag, const char *filename, const cpl_frame *inherit_frame)
 create a product from a CUBE object
 
cpl_frame * moo_products_add_target_table (moo_products *self, moo_target_table *ttable, cpl_frame_level level, const char *tag, const char *filename, const cpl_frame *inherit_frame)
 create a product from a TARGET_TABLE object
 
cpl_error_code moo_masterbias (moo_det *det, moo_detlist *bias_list, moo_bias_params *bias_params, moo_products *products)
 This function creates the master bias frame as a product and essentially produces a standard output as well as it computes and writes the different QC parameters.
 
cpl_error_code moo_masterdark (moo_det *det, moo_products *products, int mode)
 This function creates the master dark frame as a product and essentially produces a standard output as well as it computes and writes the different QC parameters.
 
cpl_frame * moo_products_add_s1d (moo_products *self, moo_s1d *s1d, const char *tag, const cpl_frame *inherit_frame)
 create a product from a MOLECTABLE object
 

Detailed Description

Function Documentation

◆ moo_masterbias()

cpl_error_code moo_masterbias ( moo_det *  det,
moo_detlist *  bias_list,
moo_bias_params *  bias_params,
moo_products *  products 
)

This function creates the master bias frame as a product and essentially produces a standard output as well as it computes and writes the different QC parameters.

Parameters
detthe MASTER_BIAS det
bias_listthe BIAS det list
bias_paramsthe masterbias parameter
productsthe product structure to save product file
Returns
the DET result

Flags considered as bad : BADPIX_COSMETIC | BADPIX_NON_LINEAR Possible _cpl_error_code set in this function:

  • CPL_ERROR_NULL_INPUT if an input pointer is NULL

Definition at line 995 of file moo_products.c.

References MOO_BADPIX_COSMETIC, MOO_BADPIX_NON_LINEAR, moo_detlist_free_single(), moo_detlist_get_image(), moo_detlist_load_single(), moo_qc_set_mbias_avg(), moo_qc_set_mbias_mad(), moo_qc_set_mbias_med(), moo_qc_set_mbias_rms(), moo_qc_set_ron_master(), moo_qc_set_ron_raw(), moo_single_load(), and MOO_TYPE_RI.

◆ moo_masterdark()

cpl_error_code moo_masterdark ( moo_det *  det,
moo_products *  products,
int  mode 
)

This function creates the master dark frame as a product and essentially produces a standard output as well as it computes and writes the different QC parameters.

Parameters
detthe DET MASTER_DARK
productsthe product structure to save product file
modeVIS (0) or NIR(1)
Returns
the relevant error code or CPL_ERROR_NONE

Flags considered as bad : BADPIX_COSMETIC | BADPIX_HOT Possible _cpl_error_code set in this function:

  • CPL_ERROR_NULL_INPUT if an input pointer is NULL

Definition at line 1087 of file moo_products.c.

References MOO_BADPIX_COSMETIC, MOO_BADPIX_HOT, MOO_BADPIX_OUTSIDE_DATA_RANGE, moo_pfits_get_det_chip_outi_gain(), moo_pfits_get_det_outi_gain(), moo_pfits_get_dit(), moo_pfits_get_exptime(), moo_pfits_get_ndit(), moo_pfits_update_exptime(), moo_qc_set_mdark_avg(), moo_qc_set_mdark_current(), moo_qc_set_mdark_med(), moo_qc_set_mdark_normalise_factor(), moo_qc_set_mdark_rms(), and moo_single_load().

◆ moo_products_add()

cpl_frame * moo_products_add ( moo_products *  self,
moo_det *  det,
cpl_frame_level  level,
const char *  tag,
const char *  filename,
const cpl_frame *  inherit_frame 
)

create a product from a DET object

Parameters
selfthe moo_product object
detthe DET object product
levelthe level of product frame
tagthe tag of product frame
filenamethe name of product frame or NULL for using tag
inherit_frameframe to inherit keywords
Returns
the product frame
Error code:
  • CPL_ERROR_NULL_INPUT if one of the inputs is NULL

Definition at line 203 of file moo_products.c.

References moo_det_save(), and moo_products_add_frame().

◆ moo_products_add_bpm()

cpl_frame * moo_products_add_bpm ( moo_products *  self,
moo_bpm *  bpm,
cpl_frame_level  level,
const char *  tag,
const char *  filename,
const cpl_frame *  inherit_frame 
)

create a product from a BPM object

Parameters
selfthe moo_product object
bpmthe BPM object product
levelthe level of product frame
tagthe tag of product frame
filenamethe name of product frame or NULL for using tag
inherit_frameframe to inherit keywords
Returns
the product frame
Error code:
  • CPL_ERROR_NULL_INPUT if one of the inputs is NULL

Definition at line 643 of file moo_products.c.

References moo_bpm_save(), and moo_products_add_frame().

◆ moo_products_add_cube()

cpl_frame * moo_products_add_cube ( moo_products *  self,
moo_cube *  cube,
cpl_frame_level  level,
const char *  tag,
const char *  filename,
const cpl_frame *  inherit_frame 
)

create a product from a CUBE object

Parameters
selfthe moo_product object
cubethe CUBE object product
levelthe level of product frame
tagthe tag of product frame
filenamethe name of product frame or NULL for using tag
inherit_frameframe to inherit keywords
Returns
the product frame
Error code:
  • CPL_ERROR_NULL_INPUT if one of the inputs is NULL

Definition at line 731 of file moo_products.c.

References moo_cube_save(), and moo_products_add_frame().

◆ moo_products_add_ext()

cpl_frame * moo_products_add_ext ( moo_products *  self,
moo_ext *  ext,
cpl_frame_level  level,
const char *  tag,
const char *  filename,
const cpl_frame *  inherit_frame 
)

create a product from a EXT object

Parameters
selfthe moo_product object
extthe EXT object product
levelthe level of product frame
tagthe tag of product frame
filenamethe name of product frame or NULL for using tag
inherit_frameframe to inherit keywords
Returns
the product frame
Error code:
  • CPL_ERROR_NULL_INPUT if one of the inputs is NULL

Definition at line 333 of file moo_products.c.

References moo_ext_save(), and moo_products_add_frame().

◆ moo_products_add_frame()

cpl_error_code moo_products_add_frame ( const moo_products *  self,
cpl_frame *  frame 
)

add a frame to the recipe products

Parameters
selfthe moo_product object
framethe product frame
Returns
the relevant error_code
Error code:
  • CPL_ERROR_NULL_INPUT if one of the inputs is NULL

Definition at line 167 of file moo_products.c.

Referenced by moo_products_add(), moo_products_add_bpm(), moo_products_add_cube(), moo_products_add_ext(), moo_products_add_map(), moo_products_add_molectable(), moo_products_add_rbn(), moo_products_add_resp(), moo_products_add_s1d(), moo_products_add_saturate_map(), moo_products_add_sci(), moo_products_add_target_table(), and moo_products_add_telluric().

◆ moo_products_add_loc()

cpl_frame * moo_products_add_loc ( moo_products *  self,
moo_loc *  loc,
int  keep_points,
cpl_frame_level  level,
const char *  tag,
const char *  filename,
const cpl_frame *  inherit_frame 
)

This function creates a product from a LOC structure.

Returns
the product frame

Possible cpl_error_code set in this function:

  • CPL_ERROR_NULL_INPUT if an input pointer is NULL

Definition at line 277 of file moo_products.c.

References moo_loc_save().

◆ moo_products_add_map()

cpl_frame * moo_products_add_map ( moo_products *  self,
moo_map *  map,
cpl_frame_level  level,
const char *  tag,
const char *  filename,
const cpl_frame *  inherit_frame,
moo_rbn *  rbn 
)

create a product from a EXT object

Parameters
selfthe moo_product object
mapthe MAP object product
levelthe level of product frame
tagthe tag of product frame
filenamethe name of product frame or NULL for using tag
inherit_frameframe to inherit keywords
rbnthe RBN to update the line table
Returns
the product frame
Error code:
  • CPL_ERROR_NULL_INPUT if one of the inputs is NULL

Definition at line 554 of file moo_products.c.

References moo_map_save(), and moo_products_add_frame().

◆ moo_products_add_molectable()

cpl_frame * moo_products_add_molectable ( moo_products *  self,
moo_molectable *  mtable,
cpl_frame_level  level,
const char *  tag,
const char *  filename,
const cpl_frame *  inherit_frame 
)

create a product from a MOLECTABLE object

Parameters
selfthe moo_product object
mtablethe MAP object product
levelthe level of product frame
tagthe tag of product frame
filenamethe name of product frame or NULL for using tag
inherit_frameframe to inherit keywords
Returns
the product frame
Error code:
  • CPL_ERROR_NULL_INPUT if one of the inputs is NULL

Definition at line 600 of file moo_products.c.

References moo_molectable_save(), and moo_products_add_frame().

◆ moo_products_add_rbn()

cpl_frame * moo_products_add_rbn ( moo_products *  self,
moo_rbn *  rbn,
cpl_frame_level  level,
const char *  tag,
const char *  filename,
const cpl_frame *  inherit_frame 
)

create a product from a RBN object

Parameters
selfthe moo_product object
rbnthe RBN object product
levelthe level of product frame
tagthe tag of product frame
filenamethe name of product frame or NULL for using tag
inherit_frameframe to inherit keywords
Returns
the product frame
Error code:
  • CPL_ERROR_NULL_INPUT if one of the inputs is NULL

Definition at line 376 of file moo_products.c.

References moo_products_add_frame(), and moo_rbn_save().

◆ moo_products_add_resp()

cpl_frame * moo_products_add_resp ( moo_products *  self,
moo_resp *  resp,
cpl_frame_level  level,
const char *  tag,
const char *  filename,
const cpl_frame *  inherit_frame 
)

create a product from a RESP object

Parameters
selfthe moo_product object
respthe RESP object product
levelthe level of product frame
tagthe tag of product frame
filenamethe name of product frame or NULL for using tag
inherit_frameframe to inherit keywords
Returns
the product frame
Error code:
  • CPL_ERROR_NULL_INPUT if one of the inputs is NULL

Definition at line 464 of file moo_products.c.

References moo_products_add_frame(), and moo_resp_save().

◆ moo_products_add_s1d()

cpl_frame * moo_products_add_s1d ( moo_products *  self,
moo_s1d *  s1d,
const char *  tag,
const cpl_frame *  inherit_frame 
)

create a product from a MOLECTABLE object

Parameters
selfthe moo_product object
s1dthe s1d object product
tagthe tag of product frame
inherit_frameframe to inherit keywords
Returns
the product frame
Error code:
  • CPL_ERROR_NULL_INPUT if one of the inputs is NULL

Definition at line 1185 of file moo_products.c.

References moo_products_add_frame(), and moo_s1d_save().

Referenced by moo_create_s1d().

◆ moo_products_add_saturate_map()

cpl_frame * moo_products_add_saturate_map ( moo_products *  self,
moo_saturate_map *  saturate,
cpl_frame_level  level,
const char *  tag,
const char *  filename,
const cpl_frame *  inherit_frame 
)

create a product from a SATURATE MAP object

Parameters
selfthe moo_product object
saturatethe SATURATE MAP object product
levelthe level of product frame
tagthe tag of product frame
filenamethe name of product frame or NULL for using tag
inherit_frameframe to inherit keywords
Returns
the product frame
Error code:
  • CPL_ERROR_NULL_INPUT if one of the inputs is NULL

Definition at line 687 of file moo_products.c.

References moo_products_add_frame(), and moo_saturate_map_save().

◆ moo_products_add_sci()

cpl_frame * moo_products_add_sci ( moo_products *  self,
moo_sci *  sci,
cpl_frame_level  level,
const char *  tag,
const char *  filename,
const cpl_frame *  inherit_frame 
)

create a product from a SCI object

Parameters
selfthe moo_product object
scithe SCI object product
levelthe level of product frame
tagthe tag of product frame
filenamethe name of product frame or NULL for using tag
inherit_frameframe to inherit keywords
Returns
the product frame
Error code:
  • CPL_ERROR_NULL_INPUT if one of the inputs is NULL

Definition at line 420 of file moo_products.c.

References moo_products_add_frame(), and moo_sci_save().

Referenced by moo_combine_pair().

◆ moo_products_add_target_table()

cpl_frame * moo_products_add_target_table ( moo_products *  self,
moo_target_table ttable,
cpl_frame_level  level,
const char *  tag,
const char *  filename,
const cpl_frame *  inherit_frame 
)

create a product from a TARGET_TABLE object

Parameters
selfthe moo_product object
ttablethe TARGET_TABLE object product
levelthe level of product frame
tagthe tag of product frame
filenamethe name of product frame or NULL for using tag
inherit_frameframe to inherit keywords
Returns
the product frame
Error code:
  • CPL_ERROR_NULL_INPUT if one of the inputs is NULL

Definition at line 774 of file moo_products.c.

References moo_products_add_frame().

◆ moo_products_add_telluric()

cpl_frame * moo_products_add_telluric ( moo_products *  self,
moo_telluric *  tell,
cpl_frame_level  level,
const char *  tag,
const char *  filename,
const cpl_frame *  inherit_frame 
)

create a product from a TELLURIC object

Parameters
selfthe moo_product object
tellthe TELLURic object product
levelthe level of product frame
tagthe tag of product frame
filenamethe name of product frame or NULL for using tag
inherit_frameframe to inherit keywords
Returns
the product frame
Error code:
  • CPL_ERROR_NULL_INPUT if one of the inputs is NULL

Definition at line 508 of file moo_products.c.

References moo_products_add_frame(), and moo_telluric_save().

◆ moo_products_get_params()

const moo_params * moo_products_get_params ( const moo_products *  self)

get the moo_params object

Parameters
selfthe moo_product object
Returns
the object for managing the recipe parameters
Error code:
  • CPL_ERROR_NULL_INPUT if one of the inputs is NULL

Definition at line 87 of file moo_products.c.

◆ moo_products_new()

moo_products * moo_products_new ( cpl_frameset *  framelist,
const cpl_parameterlist *  parlist,
const char *  recid,
const char *  pipeline_id 
)

create a moo_product object for a recipe

Parameters
framelistthe recipe input frames list
parlistthe recipe input parameters list
recidthe recipe id
pipeline_idthe pipeline id
Returns
a new moo_product object
Error code:
  • CPL_ERROR_NULL_INPUT if one of the inputs is NULL

Definition at line 53 of file moo_products.c.

References moo_params_get_keep_temp(), and moo_params_new().