10. cpl.dfs DFS header parsing

class cpl.dfs.ProcessingInfo(source, recno=-1)

Support for reading input files and parameters from the FITS header of a CPL processed file.

This is done through the FITS headers that were written by the DFS function called within the processing recipe.

name

Recipe name

version

Recipe version string

pipeline

Pipeline name

cpl_version

CPL version string

tag

Tag name

calib

Calibration frames from a FITS file processed with CPL. The result of this function may directly set as cpl.Recipe.calib attribute:

import cpl
myrecipe = cpl.Recipe('muse_bias')
myrecipe.calib = cpl.dfs.ProcessingInfo('MASTER_BIAS_0.fits').calib

Note

This will not work properly for files that had astropy.io.fits.HDUList inputs since they have assigned a temporary file name only.

raw

Raw (input) frames

Note

This will not work properly for files that had astropy.io.fits.HDUList inputs since they have assigned a temporary file name only.

param

Processing parameters. The result of this function may directly set as cpl.Recipe.param attribute:

import cpl
myrecipe = cpl.Recipe('muse_bias')
myrecipe.param = cpl.dfs.ProcessingInfo('MASTER_BIAS_0.fits').param
md5sum

MD5 sum of the data portions of the output file (header keyword ‘DATAMD5’).

md5sums

MD5 sums of the input and calibration files. dict with the file name as key and the corresponding MD5 sum as value.

Note

Due to a design decision in CPL, the raw input files are not accompanied with the MD5 sum.

ProcessingInfo.__init__(source, recno=-1)
Parameters:
  • source (str or astropy.io.fits.HDUList or astropy.io.fits.PrimaryHDU or astropy.io.fits.Header) – Object pointing to the result file header
  • recno (int) – Record number. Optional. If not given, the last record (with the highest record number) is used.