httm.fits_utilities.raw_fits¶
This module contains functions for marshalling and de-marshalling
SingleCCDRawConverter and the other book-keeping objects
it contains to and from FITS files or astropy.io.fits.HDUList objects.
-
make_slice_from_raw_data(image_and_smear_pixels, index, early_dark_pixels, late_dark_pixels)[source]¶ Construct a slice from raw pixel data given a specified index.
Result is in Analogue to Digital Converter Units (ADU).
Parameters: - image_and_smear_pixels (
numpy.ndarray) – Image pixels from the raw FITS data. - index (int) – The index of the slice to construct.
- early_dark_pixels (
numpy.ndarray) – The leftmost columns are dark pixels, to be placed on the left of the slice. - late_dark_pixels (
numpy.ndarray) – The rightmost columns are dark pixels, to be placed on the right of the slice.
Return type: - image_and_smear_pixels (
-
raw_converter_flags_from_fits_header(fits_header, flag_overrides=None)[source]¶ Construct a
SingleCCDRawConverterFlagsfrom a FITS header.TODO: Document me
Parameters: Return type:
-
raw_converter_from_fits(input_file, command=None, checksum=True, flag_overrides=None, parameter_overrides=None)[source]¶ TODO: Document this
Parameters: Return type:
-
raw_converter_from_hdulist(header_data_unit_list, command=None, origin_file_name=None, flag_overrides=None, parameter_overrides=None)[source]¶ TODO: Document this
Parameters: Return type:
-
raw_converter_parameters_from_fits_header(fits_header, parameter_overrides=None)[source]¶ TODO: Document this
Parameters: Return type:
-
raw_fits_to_calibrated(fits_input_file, fits_output_file, command=None, checksum=True, flag_overrides=None, parameter_overrides=None, transformation_settings=None)[source]¶ Read a raw FITS file in as input, with units specified in Analogue to Digital Converter Units (ADU), run a series of transformations over it, and output the results to a specified file.
Parameters: - fits_input_file (str) – A raw FITS file to use as input
- fits_output_file (str) – A FITS file to use as output; will be clobbered if it exists
- command (str) – The command issued to be recorded in the
HISTORYheader keyword in the output - checksum (bool) – Whether to use checksums for data validation in reading and writing
- flag_overrides (
objectordict) – An object or dictionary specifying values transformation flags should take rather than their defaults - parameter_overrides (
objectordict) – An object or dictionary specifying values parameters should take rather than their defaults - transformation_settings (object) – An object which specifies which transformations should run, rather than the defaults
-
write_raw_converter_to_calibrated_fits(converter, output_file, checksum=True)[source]¶ Write a completed
SingleCCDRawConverterto a calibrated FITS file.Parameters: - converter (
SingleCCDRawConverter) – - output_file (
fileorstr) – - checksum (bool) –
Return type: NoneType
- converter (