|
int | er_create_recipe_pafs (const cpl_frameset *frames, const char *recipe_name, const char *paf_config_filename) |
| Creates the PAF files. More...
|
|
int | er_paf_single_hdu_fill_write (const cpl_frame *frame, struct er_paf_config_item *config_item, int idx_paf, const char *recipe_name, char *arcfile) |
| Creates a list of keywords and saves the corresponding PAF file for single HDU products. More...
|
|
int | er_paf_multi_hdu_fill_write (const cpl_frame *frame, struct er_paf_config_item *config_item, int idx_paf, const char *recipe_name, char *arcfile) |
| Creates a list of keywords and saves the corresponding PAF file for multiple HDU products. More...
|
|
struct er_paf_config_item * | er_paf_get_matching_item (struct er_paf_config *paf_configuration, const char *this_pro_catg) |
| Get the matching configuration section. More...
|
|
struct er_paf_config * | er_paf_read_config_file (const char *paf_config_filename) |
| Reads the configuration to write PAF files. More...
|
|
cpl_propertylist * | er_paf_fill_paf_proplist_single_hdu (const cpl_frame *frame, struct er_paf_config_item *config_item, char *arcfile) |
| Creates a propertylist with all keywords to be saved for single extension products. More...
|
|
cpl_propertylist * | er_paf_fill_paf_proplist_multi_hdu (const cpl_frame *frame, struct er_paf_config_item *config_item, int iext, char *arcfile) |
| Creates a propertylist with all keywords to be saved for multi extension products. More...
|
|
er_stringarray_t * | er_paf_read_whole_file (const char *paf_config_filename) |
| Reads all the file in a string buffer. More...
|
|
int | er_paf_parse_config (er_stringarray_t *config_lines, struct er_paf_config *paf_configuration) |
| Actually parses the configuration into items, one per PRO CATG regexp. More...
|
|
int | er_paf_config_delete (struct er_paf_config *paf_configuration) |
| Deallocates the configuration to write PAF files. More...
|
|
This module provides a collection of functions that deal with the PAF files creation
int er_create_recipe_pafs |
( |
const cpl_frameset * |
frames, |
|
|
const char * |
recipe_name, |
|
|
const char * |
paf_config_filename |
|
) |
| |
Creates the PAF files.
- Parameters
-
frames | The frames to create the PAF from |
recipe_name | The name of the corresponding recipe |
paf_config_filename | The configuration file for PAF creation |
- Returns
- 0 if successful, !=0 otherwise
Create a PAF file using the important keywords from the header of the products. The important keywords are specified in the configuration file.
int er_paf_config_delete |
( |
struct er_paf_config * |
paf_configuration | ) |
|
Deallocates the configuration to write PAF files.
- Parameters
-
paf_configuration | The configuration |
- Returns
- 0 if successfull, !=0 otherwise
This function deallocates the configuration of a PAF writing process, that is, the er_paf_config structure.
cpl_propertylist* er_paf_fill_paf_proplist_multi_hdu |
( |
const cpl_frame * |
frame, |
|
|
struct er_paf_config_item * |
config_item, |
|
|
int |
iext, |
|
|
char * |
arcfile |
|
) |
| |
Creates a propertylist with all keywords to be saved for multi extension products.
- Parameters
-
frame | The frame product where to extract the keywords from |
config_item | The configuration contains the keywords requested |
iext | The number of the extension to get the keywords from |
arcfile | This is added as the ARCFILE keyword |
- Returns
- a pointer to the propertylist if success, NULL otherwise
This function will read all the keywords that are going to be saved in the PAF file. It includes the mandatory keywords, the QC keywords and the specified keywords in the config file and the ARCFILE keyword which comes from a external frame (the first raw frame from the frameset). All the keywords are retrieved from both the main extension and the requested extension. If there are duplicated keywords in the main header, the extension ones will take precedence
This function should be used only for multi extension products
cpl_propertylist* er_paf_fill_paf_proplist_single_hdu |
( |
const cpl_frame * |
frame, |
|
|
struct er_paf_config_item * |
config_item, |
|
|
char * |
arcfile |
|
) |
| |
Creates a propertylist with all keywords to be saved for single extension products.
- Parameters
-
frame | The frame product where to extract the keywords from |
config_item | The configuration contains the keywords requested |
arcfile | This is added as the ARCFILE keyword |
- Returns
- a pointer to the propertylist if sucess, NULL otherwise
This function will read all the keywords that are going to be saved in the PAF file. It includes the mandatory keywords, the QC keywords and the specified keywords in the config file and the ARCFILE keyword which comes from a external frame (the first raw frame from the frameset). This function should be used only for single extension products
struct er_paf_config_item* er_paf_get_matching_item |
( |
struct er_paf_config * |
paf_configuration, |
|
|
const char * |
this_pro_catg |
|
) |
| |
Get the matching configuration section.
- Parameters
-
paf_configuration | The whole configuration |
this_pro_catg | The procatg to match |
- Returns
- a pointer to a er_paf_config_item structure if there is a match, NULL otherwise
This function loops through the config pro catg regular expressions and return the first match
int er_paf_multi_hdu_fill_write |
( |
const cpl_frame * |
frame, |
|
|
struct er_paf_config_item * |
config_item, |
|
|
int |
idx_paf, |
|
|
const char * |
recipe_name, |
|
|
char * |
arcfile |
|
) |
| |
Creates a list of keywords and saves the corresponding PAF file for multiple HDU products.
- Parameters
-
frame | The frame product where to extract the keywords from |
config_item | The configuration contains the keywords requested |
idx_paf | The index number for these PAF files (it will be added to the filenames) |
recipe_name | The recipe name (this is saved in the PAF file) |
arcfile | This is added as the ARCFILE keyword |
- Returns
- CPL_ERROR_NONE if success or the error code otherwise
int er_paf_parse_config |
( |
er_stringarray_t * |
config_lines, |
|
|
struct er_paf_config * |
paf_configuration |
|
) |
| |
Actually parses the configuration into items, one per PRO CATG regexp.
- Parameters
-
config_lines | The lines of text to convert |
paf_configuration | The configuration |
- Returns
- 0 if successfull, !=0 otherwise
struct er_paf_config* er_paf_read_config_file |
( |
const char * |
paf_config_filename | ) |
|
Reads the configuration to write PAF files.
- Parameters
-
paf_config_filename | Path to the configuration file |
- Returns
- a pointer to a er_paf_config structure if successfull, NULL otherwise
This function reads the configuration file for PAF writing functionality. It returns an allocated er_paf_config object, which must be deallocated with er_paf_config_delete.
Reads all the file in a string buffer.
- Parameters
-
paf_config_filename | Path to the configuration file |
- Returns
- a pointer to the lines buffer if successfull, NULL otherwise
int er_paf_single_hdu_fill_write |
( |
const cpl_frame * |
frame, |
|
|
struct er_paf_config_item * |
config_item, |
|
|
int |
idx_paf, |
|
|
const char * |
recipe_name, |
|
|
char * |
arcfile |
|
) |
| |
Creates a list of keywords and saves the corresponding PAF file for single HDU products.
- Parameters
-
frame | The frame product where to extract the keywords from |
config_item | The configuration contains the keywords requested |
idx_paf | The index number for this PAF file (it will be added to the filename |
recipe_name | The recipe name (this is saved in the PAF file) |
arcfile | This is added as the ARCFILE keyword |
- Returns
- CPL_ERROR_NONE if success or the error code otherwise