write¶
Functions to write Science Instrument Aperture Files (SIAF).
SIAF content in an aperture_collection object can be written to an xml file that can be ingested in the PRD. Format and order of the xml fields are defined in SIAF reference files. Writing to Microsoft Excel .xlsx format is supported. Writing to .csv and other formats supported by astropy.table.Table.write is enabled.
- pysiaf.iando.write.write_jwst_siaf(aperture_collection, filename=None, basepath=None, label=None, file_format='xml', verbose=True)[source]¶
Write the content of aperture_collection into xml and xlsx files that are PRD-compliant.
- Parameters:
- aperture_collectionApertureCollection
dictionary of apertures
- filenamestr
The file name and path if you do not wish to use the default naming
- basepathstr
If you wish to use the default naming, basepath allows you to set the path where the file will be saved
- labelstr
Append default file name (“INSTR_SIAF”) with this string
- file_formatstr list
one of [‘xml’, ‘xlsx’, ‘csv’, and formats supported by astropy Table.write]
- verbose
- Returns:
- filenameslist
list of the filenames written out