CR2RE Pipeline Reference Manual 1.6.10
Functions
IO related functions

Functions

cpl_table * cr2res_io_get_eop_table ()
 Get the eop_table.
 
cpl_frame * cr2res_io_find_SLIT_MODEL (const cpl_frameset *in, const char *setting_id, cr2res_decker decker)
 Get the first CR2RES_SLIT_MODEL_DRSTYPE frame from a frameset.
 
const cpl_frame * cr2res_io_find_TRACE_WAVE (const cpl_frameset *in)
 Get the first CR2RES_TW_DRSTYPE frame from a frameset.
 
const cpl_frame * cr2res_io_find_SLIT_FUNC (const cpl_frameset *in)
 Get the first CR2RES_SLIT_FUNC_DRSTYPE frame from a frameset.
 
cpl_frameset * cr2res_io_find_TRACE_WAVE_all (const cpl_frameset *in)
 Get the CR2RES_TW_DRSTYPE frames from a frameset.
 
cpl_frameset * cr2res_io_find_EXTRACT_1D_all (const cpl_frameset *in)
 Get the CR2RES_EXTRACT_1D_DRSTYPE frames from a frameset.
 
const cpl_frame * cr2res_io_find_BPM (const cpl_frameset *in)
 Get the first CR2RES_BPM_DRSTYPE frame from a frameset.
 
cpl_frameset * cr2res_io_find_BPM_all (const cpl_frameset *in)
 Get the CR2RES_BPM_DRSTYPE frames from a frameset.
 
cpl_vector * cr2res_io_read_dits (const cpl_frameset *in)
 Get the DITS from a frame set.
 
cpl_vector * cr2res_io_read_ndits (const cpl_frameset *in)
 Get the NDITs from a frame set.
 
cr2res_decker * cr2res_io_read_decker_positions (const cpl_frameset *in)
 Get the decker positions from a frame set.
 
cpl_frameset * cr2res_io_extract_decker_frameset (const cpl_frameset *in, const char *tag, cr2res_decker decker)
 Extract the frames with the given tag and Decker position.
 
int cr2res_io_convert_order_idx_to_idxp (int order_idx)
 Convert the order_idx to the order_idxp.
 
char * cr2res_io_create_extname (int detector, int data)
 Create Extname.
 
int cr2res_io_get_ext_idx (const char *filename, int detector, int data)
 Get the wished extension number for a detector.
 
hdrl_image * cr2res_io_load_image (const char *in, int detector)
 Load an hdrl image from a image file.
 
hdrl_imagelist * cr2res_io_load_image_list (const char *in, int detector)
 Load an hdrl image list from a cube file.
 
hdrl_imagelist * cr2res_io_load_image_list_from_set (const cpl_frameset *in, int detector)
 Load an hdrl image list from an images frameset.
 
cpl_table * cr2res_load_table (const char *in, int det_nr, int pmin, int pmax)
 Load the table accordingly.
 
cpl_bivector * cr2res_io_load_EMISSION_LINES (const char *filename)
 Load an EMISSION_LINES bivector.
 
cpl_image * cr2res_io_load_BPM (const char *filename, int detector, int data)
 Load an image from a BPM.
 
hdrl_image * cr2res_io_load_MASTER_DARK (const char *filename, int detector)
 Load an image from a MASTER_DARK.
 
hdrl_imagelist * cr2res_io_load_DETLIN_COEFFS (const char *filename, int detector)
 Load the detlin coefficients.
 
hdrl_image * cr2res_io_load_MASTER_FLAT (const char *filename, int detector)
 Load an hdrl image from a MASTER_FLAT.
 
cpl_table * cr2res_io_load_TRACE_WAVE (const char *filename, int detector)
 Load a table from a TRACE_WAVE.
 
cpl_table * cr2res_io_load_SLIT_FUNC (const char *filename, int detector)
 Load a table from a SLIT_FUNC.
 
hdrl_image * cr2res_io_load_SLIT_MODEL (const char *filename, int detector)
 Load an hdrl image from a SLIT MODEL.
 
cpl_table * cr2res_io_load_EXTRACT_1D (const char *filename, int detector)
 Load a table from a EXTRACT_1D.
 
int cr2res_io_save_PHOTO_FLUX (const char *filename, cpl_table *out_table, const cpl_parameterlist *parlist, cpl_frameset *set, const char *recipe)
 Save PHOTO_FLUX file.
 
int cr2res_io_save_EMISSION_LINES (const char *filename, cpl_table *out_table, const cpl_parameterlist *parlist, cpl_frameset *set, const char *recipe, const char *setting_string)
 Save EMISSION_LINES file.
 
int cr2res_io_save_MASTER_DARK (const char *filename, cpl_frameset *allframes, cpl_frameset *inframes, const cpl_parameterlist *parlist, hdrl_image **master_darks, const cpl_propertylist *qc_list, cpl_propertylist **ext_plist, const char *procatg, const char *recipe)
 Save a MASTER_DARK.
 
int cr2res_io_save_DETLIN_COEFFS (const char *filename, cpl_frameset *allframes, cpl_frameset *inframes, const cpl_parameterlist *parlist, hdrl_imagelist **coeffs, const cpl_propertylist *qc_list, cpl_propertylist **ext_plist, const char *procatg, const char *recipe)
 Save a DETLIN COEFFS.
 
int cr2res_io_save_BPM (const char *filename, cpl_frameset *allframes, cpl_frameset *inframes, const cpl_parameterlist *parlist, cpl_image **bpms, const cpl_propertylist *qc_list, cpl_propertylist **ext_plist, const char *procatg, const char *recipe)
 Save a BPM.
 
int cr2res_io_save_CALIBRATED (const char *filename, cpl_frameset *allframes, cpl_frameset *inframes, const cpl_parameterlist *parlist, hdrl_image **calib_collapsed, const cpl_propertylist *qc_list, cpl_propertylist **ext_plist, const char *procatg, const char *recipe)
 Save a CALIBRATED frame.
 
int cr2res_io_save_MASTER_FLAT (const char *filename, cpl_frameset *allframes, cpl_frameset *inframes, const cpl_parameterlist *parlist, hdrl_image **master_flats, const cpl_propertylist *qc_list, cpl_propertylist **ext_plist, const char *procatg, const char *recipe)
 Save a MASTER_FLAT.
 
int cr2res_io_save_TRACE_WAVE (const char *filename, cpl_frameset *allframes, cpl_frameset *inframes, const cpl_parameterlist *parlist, cpl_table **tables, const cpl_propertylist *qc_list, cpl_propertylist **ext_plist, const char *procatg, const char *recipe)
 Save a TRACE_WAVE.
 
int cr2res_io_save_LINES_DIAGNOSTICS (const char *filename, cpl_frameset *allframes, cpl_frameset *inframes, const cpl_parameterlist *parlist, cpl_table **tables, const cpl_propertylist *qc_list, cpl_propertylist **ext_plist, const char *procatg, const char *recipe)
 Save a LINES_DIAGNOSTICS.
 
int cr2res_io_save_EXTRACT_1D (const char *filename, cpl_frameset *allframes, cpl_frameset *inframes, const cpl_parameterlist *parlist, cpl_table **tables, const cpl_propertylist *qc_list, cpl_propertylist **ext_plist, const char *procatg, const char *recipe)
 Save a 1D extracted spectrum.
 
int cr2res_io_save_THROUGHPUT (const char *filename, cpl_frameset *allframes, cpl_frameset *inframes, const cpl_parameterlist *parlist, cpl_table **tables, const cpl_propertylist *qc_list, cpl_propertylist **ext_plist, const char *procatg, const char *recipe)
 Save a THROUGHPUT table.
 
int cr2res_io_save_SLIT_FUNC (const char *filename, cpl_frameset *allframes, cpl_frameset *inframes, const cpl_parameterlist *parlist, cpl_table **slit_func, const cpl_propertylist *qc_list, cpl_propertylist **ext_plist, const char *procatg, const char *recipe)
 Save a SLIT_FUNC.
 
int cr2res_io_save_SLIT_MODEL (const char *filename, cpl_frameset *allframes, cpl_frameset *inframes, const cpl_parameterlist *parlist, hdrl_image **data, const cpl_propertylist *qc_list, cpl_propertylist **ext_plist, const char *procatg, const char *recipe)
 Save a SLIT_MODEL.
 
int cr2res_io_save_COMBINED (const char *filename, cpl_frameset *allframes, cpl_frameset *inframes, const cpl_parameterlist *parlist, hdrl_image **data, const cpl_propertylist *qc_list, cpl_propertylist **ext_plist, const char *procatg, const char *recipe)
 Save a COMBINED.
 
int cr2res_io_save_TRACE_MAP (const char *filename, cpl_frameset *allframes, cpl_frameset *inframes, const cpl_parameterlist *parlist, hdrl_image **data, const cpl_propertylist *qc_list, cpl_propertylist **ext_plist, const char *procatg, const char *recipe)
 Save a TRACE_MAP.
 
int cr2res_io_save_WAVE_MAP (const char *filename, cpl_frameset *allframes, cpl_frameset *inframes, const cpl_parameterlist *parlist, hdrl_image **data, const cpl_propertylist *qc_list, cpl_propertylist **ext_plist, const char *procatg, const char *recipe)
 Save a WAVE_MAP.
 
int cr2res_io_save_SLIT_CURV_MAP (const char *filename, cpl_frameset *allframes, cpl_frameset *inframes, const cpl_parameterlist *parlist, hdrl_image **data, const cpl_propertylist *qc_list, cpl_propertylist **ext_plist, const char *procatg, const char *recipe)
 Save a SLIT_CURV_MAP.
 
int cr2res_io_save_SPLICED_1D (const char *filename, cpl_frameset *allframes, cpl_frameset *inframes, const cpl_parameterlist *parlist, cpl_table *spliced_1d, const cpl_propertylist *qc_list, cpl_propertylist *ext_plist, const char *procatg, const char *recipe)
 Save a SPLICED_1D.
 
int cr2res_io_save_EXTRACT_2D (const char *filename, cpl_frameset *allframes, cpl_frameset *inframes, const cpl_parameterlist *parlist, cpl_table **tables, const cpl_propertylist *qc_list, cpl_propertylist **ext_plist, const char *procatg, const char *recipe)
 Save a 2D extracted spectrum.
 
int cr2res_io_save_POL_SPEC (const char *filename, cpl_frameset *allframes, cpl_frameset *inframes, const cpl_parameterlist *parlist, cpl_table **tables, const cpl_propertylist *qc_list, cpl_propertylist **ext_plist, const char *procatg, const char *recipe)
 Save a Polarimetry spectrum.
 

Detailed Description

Function Documentation

◆ cr2res_io_convert_order_idx_to_idxp()

int cr2res_io_convert_order_idx_to_idxp ( int  order_idx)

◆ cr2res_io_create_extname()

char * cr2res_io_create_extname ( int  detector,
int  data 
)

Create Extname.

Parameters
detectorThe wished detector (1 to CR2RES_NB_DETECTORS)
data1 for the data image, 0 for the error
Returns
the newly allocated string with the EXTNAME

Definition at line 618 of file cr2res_io.c.

Referenced by cr2res_io_get_ext_idx().

◆ cr2res_io_extract_decker_frameset()

cpl_frameset * cr2res_io_extract_decker_frameset ( const cpl_frameset *  in,
const char *  tag,
cr2res_decker  decker 
)

Extract the frames with the given tag and Decker position.

Parameters
inA non-empty frameset
tagThe tag of the requested frames
deckerCR2RES_DECKER_NONE,CR2RES_DECKER_1_3 or CR2RES_DECKER_2_4
Returns
The newly created frameset or NULL on error

The returned frameset must be de allocated with cpl_frameset_delete()

Definition at line 527 of file cr2res_io.c.

References cr2res_pfits_get_decker_position().

◆ cr2res_io_find_BPM()

const cpl_frame * cr2res_io_find_BPM ( const cpl_frameset *  in)

Get the first CR2RES_BPM_DRSTYPE frame from a frameset.

Parameters
setInput frame set
Returns
the frame reference or NULL in error case or if it is missing

Definition at line 369 of file cr2res_io.c.

◆ cr2res_io_find_BPM_all()

cpl_frameset * cr2res_io_find_BPM_all ( const cpl_frameset *  in)

Get the CR2RES_BPM_DRSTYPE frames from a frameset.

Parameters
setInput frame set
Returns
the frameset or NULL in error case or if it is missing

Definition at line 397 of file cr2res_io.c.

References cr2res_extract_frameset_several_tags().

◆ cr2res_io_find_EXTRACT_1D_all()

cpl_frameset * cr2res_io_find_EXTRACT_1D_all ( const cpl_frameset *  in)

Get the CR2RES_EXTRACT_1D_DRSTYPE frames from a frameset.

Parameters
setInput frame set
Returns
the frameset or NULL in error case or if it is missing

Definition at line 331 of file cr2res_io.c.

References cr2res_extract_frameset_several_tags().

◆ cr2res_io_find_SLIT_FUNC()

const cpl_frame * cr2res_io_find_SLIT_FUNC ( const cpl_frameset *  in)

Get the first CR2RES_SLIT_FUNC_DRSTYPE frame from a frameset.

Parameters
setInput frame set
Returns
the frame reference or NULL in error case or if it is missing

Definition at line 267 of file cr2res_io.c.

◆ cr2res_io_find_SLIT_MODEL()

cpl_frame * cr2res_io_find_SLIT_MODEL ( const cpl_frameset *  in,
const char *  setting_id,
cr2res_decker  decker 
)

Get the first CR2RES_SLIT_MODEL_DRSTYPE frame from a frameset.

Parameters
setInput frame set
settingThe setting to match
deckerThe decker position to match
Returns
The new allocated frame or NULL in error case or if it is missing

Definition at line 167 of file cr2res_io.c.

References cr2res_extract_frameset_several_tags(), cr2res_format_setting(), cr2res_pfits_get_decker_position(), and cr2res_pfits_get_wlen_id().

◆ cr2res_io_find_TRACE_WAVE()

const cpl_frame * cr2res_io_find_TRACE_WAVE ( const cpl_frameset *  in)

Get the first CR2RES_TW_DRSTYPE frame from a frameset.

Parameters
setInput frame set
Returns
the frame reference or NULL in error case or if it is missing

Definition at line 231 of file cr2res_io.c.

◆ cr2res_io_find_TRACE_WAVE_all()

cpl_frameset * cr2res_io_find_TRACE_WAVE_all ( const cpl_frameset *  in)

Get the CR2RES_TW_DRSTYPE frames from a frameset.

Parameters
setInput frame set
Returns
the frameset or NULL in error case or if it is missing

Definition at line 293 of file cr2res_io.c.

References cr2res_extract_frameset_several_tags().

◆ cr2res_io_get_eop_table()

cpl_table * cr2res_io_get_eop_table ( )

Get the eop_table.

Returns
The new allocated table

Definition at line 120 of file cr2res_io.c.

◆ cr2res_io_get_ext_idx()

int cr2res_io_get_ext_idx ( const char *  filename,
int  detector,
int  data 
)

Get the wished extension number for a detector.

Parameters
filenameThe FITS file name
detectorThe wished detector (1 to CR2RES_NB_DETECTORS)
data1 for the data image, 0 for the error
Returns
the Extension number or -1 in error case

Definition at line 644 of file cr2res_io.c.

References cr2res_io_create_extname().

Referenced by cr2res_io_load_BPM(), cr2res_io_load_image(), cr2res_io_load_image_list(), cr2res_io_load_image_list_from_set(), cr2res_trace_add_extra_columns(), and cr2res_wave_get_estimate().

◆ cr2res_io_load_BPM()

cpl_image * cr2res_io_load_BPM ( const char *  filename,
int  detector,
int  data 
)

Load an image from a BPM.

Parameters
filenameThe FITS file name
detectorThe wished detector (1 to CR2RES_NB_DETECTORS)
data1 for the data image, 0 for the error
Returns
An integer type image or NULL in error case. The returned object needs to be deallocated

Definition at line 957 of file cr2res_io.c.

References cr2res_io_get_ext_idx().

Referenced by cr2res_bpm_set_and_correct_image().

◆ cr2res_io_load_DETLIN_COEFFS()

hdrl_imagelist * cr2res_io_load_DETLIN_COEFFS ( const char *  filename,
int  detector 
)

Load the detlin coefficients.

Parameters
filenameThe FITS file name
detectorThe wished detector (1 to CR2RES_NB_DETECTORS)
Returns
An image list with the polynomial coefficients for each pixel of the wished detector. The returned object list needs to be deallocated

Definition at line 1034 of file cr2res_io.c.

References cr2res_io_load_image_list().

Referenced by cr2res_calib_image().

◆ cr2res_io_load_EMISSION_LINES()

cpl_bivector * cr2res_io_load_EMISSION_LINES ( const char *  filename)

Load an EMISSION_LINES bivector.

Parameters
filenameThe FITS file name
Returns
The returned object needs to be deallocated

Definition at line 903 of file cr2res_io.c.

Referenced by cr2res_wave_2d().

◆ cr2res_io_load_EXTRACT_1D()

cpl_table * cr2res_io_load_EXTRACT_1D ( const char *  filename,
int  detector 
)

Load a table from a EXTRACT_1D.

Parameters
filenameThe FITS file name
detectorThe wished detector (1 to CR2RES_NB_DETECTORS)
Returns
A table or NULL in error case. The returned object needs to be deallocated

Definition at line 1296 of file cr2res_io.c.

References cr2res_load_table().

◆ cr2res_io_load_image()

hdrl_image * cr2res_io_load_image ( const char *  in,
int  detector 
)

Load an hdrl image from a image file.

Parameters
fnameThe input file name
detectorThe wished detector (1 to CR2RES_NB_DETECTORS)
Returns
A hdrl image or NULL in error case. The returned object needs to be deallocated This function load images files (also where the error is missing) with the proper EXTNAME convention

Definition at line 704 of file cr2res_io.c.

References cr2res_io_get_ext_idx(), and hdrl_image_create().

Referenced by cr2res_io_load_MASTER_DARK(), cr2res_io_load_MASTER_FLAT(), cr2res_io_load_SLIT_MODEL(), and cr2res_qc_numsat().

◆ cr2res_io_load_image_list()

hdrl_imagelist * cr2res_io_load_image_list ( const char *  in,
int  detector 
)

Load an hdrl image list from a cube file.

Parameters
fnameThe input file name
detectorThe wished detector (1 to CR2RES_NB_DETECTORS)
Returns
A hdrl image list or NULL in error case. The returned object needs to be deallocated This function loads image list from a cube (also where the error is missing) with the proper EXTNAME convention

Definition at line 754 of file cr2res_io.c.

References cr2res_io_get_ext_idx(), and hdrl_imagelist_create().

Referenced by cr2res_io_load_DETLIN_COEFFS().

◆ cr2res_io_load_image_list_from_set()

hdrl_imagelist * cr2res_io_load_image_list_from_set ( const cpl_frameset *  in,
int  detector 
)

Load an hdrl image list from an images frameset.

Parameters
fsetThe input frame set
detectorThe wished detector (1 to CR2RES_NB_DETECTORS)
Returns
A hdrl imagelist or NULL in error case. The returned object needs to be deallocated The returned hdrl image list contains the list of all data images for a given detector from a list of input image frames This function load images files (also where the error is missing) with the proper EXTNAME convention

Definition at line 808 of file cr2res_io.c.

References cr2res_io_get_ext_idx(), and hdrl_imagelist_create().

◆ cr2res_io_load_MASTER_DARK()

hdrl_image * cr2res_io_load_MASTER_DARK ( const char *  filename,
int  detector 
)

Load an image from a MASTER_DARK.

Parameters
filenameThe FITS file name
detectorThe wished detector (1 to CR2RES_NB_DETECTORS)
Returns
A hdrl image or NULL in error case. The returned object needs to be deallocated

Definition at line 990 of file cr2res_io.c.

References cr2res_io_load_image(), hdrl_image_delete(), hdrl_image_get_error(), hdrl_image_get_image(), and hdrl_image_reject_value().

Referenced by cr2res_calib_image().

◆ cr2res_io_load_MASTER_FLAT()

hdrl_image * cr2res_io_load_MASTER_FLAT ( const char *  filename,
int  detector 
)

Load an hdrl image from a MASTER_FLAT.

Parameters
filenameThe FITS file name
detectorThe wished detector (1 to CR2RES_NB_DETECTORS)
Returns
A hdrl image or NULL in error case. The returned object needs to be deallocated

Definition at line 1066 of file cr2res_io.c.

References cr2res_io_load_image(), hdrl_image_delete(), hdrl_image_get_error(), hdrl_image_get_image(), and hdrl_image_reject_value().

Referenced by cr2res_calib_image().

◆ cr2res_io_load_SLIT_FUNC()

cpl_table * cr2res_io_load_SLIT_FUNC ( const char *  filename,
int  detector 
)

Load a table from a SLIT_FUNC.

Parameters
filenameThe FITS file name
detectorThe wished detector (1 to CR2RES_NB_DETECTORS)
Returns
A table or NULL in error case. The returned object needs to be deallocated

Definition at line 1139 of file cr2res_io.c.

References cr2res_load_table().

◆ cr2res_io_load_SLIT_MODEL()

hdrl_image * cr2res_io_load_SLIT_MODEL ( const char *  filename,
int  detector 
)

Load an hdrl image from a SLIT MODEL.

Parameters
filenameThe FITS file name
detectorThe wished detector (1 to CR2RES_NB_DETECTORS)
Returns
A hdrl image or NULL in error case. The returned object needs to be deallocated

Definition at line 1169 of file cr2res_io.c.

References cr2res_io_load_image(), hdrl_image_delete(), and hdrl_image_get_error().

◆ cr2res_io_load_TRACE_WAVE()

cpl_table * cr2res_io_load_TRACE_WAVE ( const char *  filename,
int  detector 
)

Load a table from a TRACE_WAVE.

Parameters
filenameThe FITS file name
detectorThe wished detector (1 to CR2RES_NB_DETECTORS)
Returns
A table or NULL in error case. The returned object needs to be deallocated

Definition at line 1109 of file cr2res_io.c.

References cr2res_load_table().

◆ cr2res_io_read_decker_positions()

cr2res_decker * cr2res_io_read_decker_positions ( const cpl_frameset *  in)

Get the decker positions from a frame set.

Parameters
setInput frame set
Returns
the DECKER positions or NULL in error case

Definition at line 491 of file cr2res_io.c.

References cr2res_pfits_get_decker_position().

◆ cr2res_io_read_dits()

cpl_vector * cr2res_io_read_dits ( const cpl_frameset *  in)

Get the DITS from a frame set.

Parameters
setInput frame set
Returns
the DITS or NULL in error case

Definition at line 432 of file cr2res_io.c.

References cr2res_pfits_get_dit().

◆ cr2res_io_read_ndits()

cpl_vector * cr2res_io_read_ndits ( const cpl_frameset *  in)

Get the NDITs from a frame set.

Parameters
setInput frame set
Returns
the NDITs or NULL in error case

Definition at line 462 of file cr2res_io.c.

References cr2res_pfits_get_ndit().

◆ cr2res_io_save_BPM()

int cr2res_io_save_BPM ( const char *  filename,
cpl_frameset *  allframes,
cpl_frameset *  inframes,
const cpl_parameterlist *  parlist,
cpl_image **  bpms,
const cpl_propertylist *  qc_list,
cpl_propertylist **  ext_plist,
const char *  procatg,
const char *  recipe 
)

Save a BPM.

Parameters
filenameThe FITS file name
allframesThe recipe input frames
inframesThe recipe used input frames
parlistThe recipe input parameters
bpmsThe BPMs (1 per detector)
qc_listThe QC parameters
ext_plistThe extensions property lists
procatgThe PRO CATG value
recipeThe recipe name
Returns
0 if ok, -1 in error case

Definition at line 1555 of file cr2res_io.c.

References hdrl_image_create(), and hdrl_image_delete().

◆ cr2res_io_save_CALIBRATED()

int cr2res_io_save_CALIBRATED ( const char *  filename,
cpl_frameset *  allframes,
cpl_frameset *  inframes,
const cpl_parameterlist *  parlist,
hdrl_image **  calib_collapsed,
const cpl_propertylist *  qc_list,
cpl_propertylist **  ext_plist,
const char *  procatg,
const char *  recipe 
)

Save a CALIBRATED frame.

Parameters
filenameThe FITS file name
allframesThe recipe input frames
inframesThe recipe used input frames
parlistThe recipe input parameters
calib_collapsedThe data/error (1 per detector)
qc_listThe QC parameters
ext_plistThe extensions property lists
procatgThe PRO CATG value
recipeThe recipe name
Returns
0 if ok, -1 in error case

Definition at line 1608 of file cr2res_io.c.

◆ cr2res_io_save_COMBINED()

int cr2res_io_save_COMBINED ( const char *  filename,
cpl_frameset *  allframes,
cpl_frameset *  inframes,
const cpl_parameterlist *  parlist,
hdrl_image **  data,
const cpl_propertylist *  qc_list,
cpl_propertylist **  ext_plist,
const char *  procatg,
const char *  recipe 
)

Save a COMBINED.

Parameters
filenameThe FITS file name
allframesThe recipe input frames
inframesThe recipe used input frames
parlistThe recipe input parameters
dataThe data images to save (DATA and ERROR per detector)
qc_listThe QC parameters
ext_plistThe extensions property lists
procatgThe PRO CATG value
recipeThe recipe name
Returns
0 if ok, -1 in error case

Definition at line 1854 of file cr2res_io.c.

◆ cr2res_io_save_DETLIN_COEFFS()

int cr2res_io_save_DETLIN_COEFFS ( const char *  filename,
cpl_frameset *  allframes,
cpl_frameset *  inframes,
const cpl_parameterlist *  parlist,
hdrl_imagelist **  coeffs,
const cpl_propertylist *  qc_list,
cpl_propertylist **  ext_plist,
const char *  procatg,
const char *  recipe 
)

Save a DETLIN COEFFS.

Parameters
filenameThe file name
allframesThe recipe input frames
inframesThe recipe used input frames
filenameThe FITS file name
parlistThe recipe input parameters
coeffsThe detlin coefficients (1 per detector)
qc_listThe QC parameters
ext_plistThe extensions property lists
procatgThe PRO CATG value
recipeThe recipe name
Returns
0 if ok, -1 in error case

Definition at line 1523 of file cr2res_io.c.

◆ cr2res_io_save_EMISSION_LINES()

int cr2res_io_save_EMISSION_LINES ( const char *  filename,
cpl_table *  out_table,
const cpl_parameterlist *  parlist,
cpl_frameset *  set,
const char *  recipe,
const char *  setting_string 
)

Save EMISSION_LINES file.

Parameters
filenameThe file name
tableThe table to save
parlistThe recipe input parameters
setThe recipe input frames
recipeThe recipe name
setting_stringNULL or Y22, H14,...
Returns
0 if ok, -1 in error case

Definition at line 1435 of file cr2res_io.c.

References cr2res_mjd_obs_now().

◆ cr2res_io_save_EXTRACT_1D()

int cr2res_io_save_EXTRACT_1D ( const char *  filename,
cpl_frameset *  allframes,
cpl_frameset *  inframes,
const cpl_parameterlist *  parlist,
cpl_table **  tables,
const cpl_propertylist *  qc_list,
cpl_propertylist **  ext_plist,
const char *  procatg,
const char *  recipe 
)

Save a 1D extracted spectrum.

Parameters
filenameThe FITS file name
allframesThe recipe input frames
inframesThe recipe used input frames
parlistThe recipe input parameters
tablesThe tables to save (1 per detector)
qc_listThe QC parameters
ext_plistThe extensions property lists
procatgThe PRO CATG value
recipeThe recipe name
Returns
0 if ok, -1 in error case

Definition at line 1732 of file cr2res_io.c.

◆ cr2res_io_save_EXTRACT_2D()

int cr2res_io_save_EXTRACT_2D ( const char *  filename,
cpl_frameset *  allframes,
cpl_frameset *  inframes,
const cpl_parameterlist *  parlist,
cpl_table **  tables,
const cpl_propertylist *  qc_list,
cpl_propertylist **  ext_plist,
const char *  procatg,
const char *  recipe 
)

Save a 2D extracted spectrum.

Parameters
filenameThe FITS file name
allframesThe recipe input frames
inframesThe recipe used input frames
parlistThe recipe input parameters
tablesThe tables to save (1 per detector)
qc_listThe QC parameters
ext_plistThe extensions property lists
procatgThe PRO CATG value
recipeThe recipe name
Returns
0 if ok, -1 in error case

Definition at line 2009 of file cr2res_io.c.

◆ cr2res_io_save_LINES_DIAGNOSTICS()

int cr2res_io_save_LINES_DIAGNOSTICS ( const char *  filename,
cpl_frameset *  allframes,
cpl_frameset *  inframes,
const cpl_parameterlist *  parlist,
cpl_table **  tables,
const cpl_propertylist *  qc_list,
cpl_propertylist **  ext_plist,
const char *  procatg,
const char *  recipe 
)

Save a LINES_DIAGNOSTICS.

Parameters
filenameThe FITS file name
allframesThe recipe input frames
inframesThe recipe used input frames
parlistThe recipe input parameters
tablesThe tables to save (1 per detector)
qc_listThe QC parameters
ext_plistThe extensions property lists
procatgThe PRO CATG value
recipeThe recipe name
Returns
0 if ok, -1 in error case

Definition at line 1701 of file cr2res_io.c.

◆ cr2res_io_save_MASTER_DARK()

int cr2res_io_save_MASTER_DARK ( const char *  filename,
cpl_frameset *  allframes,
cpl_frameset *  inframes,
const cpl_parameterlist *  parlist,
hdrl_image **  master_darks,
const cpl_propertylist *  qc_list,
cpl_propertylist **  ext_plist,
const char *  procatg,
const char *  recipe 
)

Save a MASTER_DARK.

Parameters
filenameThe file name
allframesThe recipe input frames
inframesThe recipe used input frames
filenameThe FITS file name
parlistThe recipe input parameters
master_darksThe data/error master darks (1 per detector)
qc_listThe QC parameters
ext_plistThe extensions property lists
procatgThe PRO CATG value
recipeThe recipe name
Returns
0 if ok, -1 in error case

Definition at line 1491 of file cr2res_io.c.

◆ cr2res_io_save_MASTER_FLAT()

int cr2res_io_save_MASTER_FLAT ( const char *  filename,
cpl_frameset *  allframes,
cpl_frameset *  inframes,
const cpl_parameterlist *  parlist,
hdrl_image **  master_flats,
const cpl_propertylist *  qc_list,
cpl_propertylist **  ext_plist,
const char *  procatg,
const char *  recipe 
)

Save a MASTER_FLAT.

Parameters
filenameThe FITS file name
allframesThe recipe input frames
inframesThe recipe used input frames
parlistThe recipe input parameters
master_flatsThe data/error FLATs (1 per detector)
qc_listThe QC parameters
ext_plistThe extensions property lists
procatgThe PRO CATG value
recipeThe recipe name
Returns
0 if ok, -1 in error case

Definition at line 1639 of file cr2res_io.c.

◆ cr2res_io_save_PHOTO_FLUX()

int cr2res_io_save_PHOTO_FLUX ( const char *  filename,
cpl_table *  out_table,
const cpl_parameterlist *  parlist,
cpl_frameset *  set,
const char *  recipe 
)

Save PHOTO_FLUX file.

Parameters
filenameThe file name
tableThe table to save
parlistThe recipe input parameters
setThe recipe input frames
recipeThe recipe name
Returns
0 if ok, -1 in error case

Definition at line 1389 of file cr2res_io.c.

References cr2res_mjd_obs_now().

◆ cr2res_io_save_POL_SPEC()

int cr2res_io_save_POL_SPEC ( const char *  filename,
cpl_frameset *  allframes,
cpl_frameset *  inframes,
const cpl_parameterlist *  parlist,
cpl_table **  tables,
const cpl_propertylist *  qc_list,
cpl_propertylist **  ext_plist,
const char *  procatg,
const char *  recipe 
)

Save a Polarimetry spectrum.

Parameters
filenameThe FITS file name
allframesThe recipe input frames
inframesThe recipe used input frames
parlistThe recipe input parameters
tablesThe tables to save (1 per detector)
qc_listThe QC parameters
ext_plistThe extensions property lists
procatgThe PRO CATG value
recipeThe recipe name
Returns
0 if ok, -1 in error case

Definition at line 2039 of file cr2res_io.c.

◆ cr2res_io_save_SLIT_CURV_MAP()

int cr2res_io_save_SLIT_CURV_MAP ( const char *  filename,
cpl_frameset *  allframes,
cpl_frameset *  inframes,
const cpl_parameterlist *  parlist,
hdrl_image **  data,
const cpl_propertylist *  qc_list,
cpl_propertylist **  ext_plist,
const char *  procatg,
const char *  recipe 
)

Save a SLIT_CURV_MAP.

Parameters
filenameThe FITS file name
allframesThe recipe input frames
inframesThe recipe used input frames
parlistThe recipe input parameters
dataThe data images to save (DATA and ERROR per detector)
qc_listThe QC parameters
ext_plistThe extensions property lists
procatgThe PRO CATG value
recipeThe recipe name
Returns
0 if ok, -1 in error case

Definition at line 1947 of file cr2res_io.c.

◆ cr2res_io_save_SLIT_FUNC()

int cr2res_io_save_SLIT_FUNC ( const char *  filename,
cpl_frameset *  allframes,
cpl_frameset *  inframes,
const cpl_parameterlist *  parlist,
cpl_table **  slit_func,
const cpl_propertylist *  qc_list,
cpl_propertylist **  ext_plist,
const char *  procatg,
const char *  recipe 
)

Save a SLIT_FUNC.

Parameters
filenameThe FITS file name
allframesThe recipe input frames
inframesThe recipe used input frames
parlistThe recipe input parameters
dataThe tables to save (1 per detector)
qc_listThe QC parameters
ext_plistThe extensions property lists
procatgThe PRO CATG value
recipeThe recipe name
Returns
0 if ok, -1 in error case

Definition at line 1792 of file cr2res_io.c.

◆ cr2res_io_save_SLIT_MODEL()

int cr2res_io_save_SLIT_MODEL ( const char *  filename,
cpl_frameset *  allframes,
cpl_frameset *  inframes,
const cpl_parameterlist *  parlist,
hdrl_image **  data,
const cpl_propertylist *  qc_list,
cpl_propertylist **  ext_plist,
const char *  procatg,
const char *  recipe 
)

Save a SLIT_MODEL.

Parameters
filenameThe FITS file name
allframesThe recipe input frames
inframesThe recipe used input frames
parlistThe recipe input parameters
dataThe data images to save (DATA and ERROR per detector)
qc_listThe QC parameters
ext_plistThe extensions property lists
procatgThe PRO CATG value
recipeThe recipe name
Returns
0 if ok, -1 in error case

Definition at line 1823 of file cr2res_io.c.

◆ cr2res_io_save_SPLICED_1D()

int cr2res_io_save_SPLICED_1D ( const char *  filename,
cpl_frameset *  allframes,
cpl_frameset *  inframes,
const cpl_parameterlist *  parlist,
cpl_table *  spliced_1d,
const cpl_propertylist *  qc_list,
cpl_propertylist *  ext_plist,
const char *  procatg,
const char *  recipe 
)

Save a SPLICED_1D.

Parameters
filenameThe FITS file name
allframesThe recipe input frames
inframesThe recipe used input frames
parlistThe recipe input parameters
spliced_1dThe table to save
qc_listThe QC parameters
ext_plistThe extension property list
procatgThe PRO CATG value
recipeThe recipe name
Returns
0 if ok, -1 in error case

Definition at line 1978 of file cr2res_io.c.

◆ cr2res_io_save_THROUGHPUT()

int cr2res_io_save_THROUGHPUT ( const char *  filename,
cpl_frameset *  allframes,
cpl_frameset *  inframes,
const cpl_parameterlist *  parlist,
cpl_table **  tables,
const cpl_propertylist *  qc_list,
cpl_propertylist **  ext_plist,
const char *  procatg,
const char *  recipe 
)

Save a THROUGHPUT table.

Parameters
filenameThe FITS file name
allframesThe recipe input frames
inframesThe recipe used input frames
parlistThe recipe input parameters
tablesThe tables to save (1 per detector)
qc_listThe QC parameters
ext_plistThe extensions property lists
procatgThe PRO CATG value
recipeThe recipe name
Returns
0 if ok, -1 in error case

Definition at line 1762 of file cr2res_io.c.

◆ cr2res_io_save_TRACE_MAP()

int cr2res_io_save_TRACE_MAP ( const char *  filename,
cpl_frameset *  allframes,
cpl_frameset *  inframes,
const cpl_parameterlist *  parlist,
hdrl_image **  data,
const cpl_propertylist *  qc_list,
cpl_propertylist **  ext_plist,
const char *  procatg,
const char *  recipe 
)

Save a TRACE_MAP.

Parameters
filenameThe FITS file name
allframesThe recipe input frames
inframesThe recipe used input frames
parlistThe recipe input parameters
dataThe data images to save (DATA and ERROR per detector)
qc_listThe QC parameters
ext_plistThe extensions property lists
procatgThe PRO CATG value
recipeThe recipe name
Returns
0 if ok, -1 in error case

Definition at line 1885 of file cr2res_io.c.

◆ cr2res_io_save_TRACE_WAVE()

int cr2res_io_save_TRACE_WAVE ( const char *  filename,
cpl_frameset *  allframes,
cpl_frameset *  inframes,
const cpl_parameterlist *  parlist,
cpl_table **  tables,
const cpl_propertylist *  qc_list,
cpl_propertylist **  ext_plist,
const char *  procatg,
const char *  recipe 
)

Save a TRACE_WAVE.

Parameters
filenameThe FITS file name
allframesThe recipe input frames
inframesThe recipe used input frames
parlistThe recipe input parameters
tablesThe tables to save (1 per detector)
qc_listThe QC parameters
ext_plistThe extensions property lists
procatgThe PRO CATG value
recipeThe recipe name
Returns
0 if ok, -1 in error case

Definition at line 1670 of file cr2res_io.c.

◆ cr2res_io_save_WAVE_MAP()

int cr2res_io_save_WAVE_MAP ( const char *  filename,
cpl_frameset *  allframes,
cpl_frameset *  inframes,
const cpl_parameterlist *  parlist,
hdrl_image **  data,
const cpl_propertylist *  qc_list,
cpl_propertylist **  ext_plist,
const char *  procatg,
const char *  recipe 
)

Save a WAVE_MAP.

Parameters
filenameThe FITS file name
allframesThe recipe input frames
inframesThe recipe used input frames
parlistThe recipe input parameters
dataThe data images to save (DATA and ERROR per detector)
qc_listThe QC parameters
ext_plistThe extensions property lists
procatgThe PRO CATG value
recipeThe recipe name
Returns
0 if ok, -1 in error case

Definition at line 1916 of file cr2res_io.c.

◆ cr2res_load_table()

cpl_table * cr2res_load_table ( const char *  in,
int  det_nr,
int  pmin,
int  pmax 
)

Load the table accordingly.

Parameters
inthe input file
det_nrthe detector number
pminthe first pixel to load (-1 if all)
pmaxthe last pixel to load (-1 if all)
Returns
the loaded table or NULL in error case

Definition at line 862 of file cr2res_io.c.

Referenced by cr2res_io_load_EXTRACT_1D(), cr2res_io_load_SLIT_FUNC(), and cr2res_io_load_TRACE_WAVE().