PCL
|
Flux calibration data parser and generator. More...
#include <FluxCalibrationData.h>
FluxCalibrationData implements support for the XML flux calibration data format (XFCL format, .xfcl file suffix).
Flux calibration is essential for critical tasks requiring accurate and robust estimates of statistical scale computed for deep-sky astronomical images. On the PixInsight platform, we have implemented absolute, universally comparable, spectrophotometry-based scale estimation based on stellar photometry and Gaia mean spectra provided by the Gaia DR3 catalog. The primary tool to generate these estimates and XFCL files is SpectrophotometricFluxCalibration (SPFC).
Absolute spectrophotometry-based scale estimates are currently required by the MultiscaleGradientCorrection process and are critically important for generating Multiscale All-Sky Reference Survey (MARS) databases.
Definition at line 99 of file FluxCalibrationData.h.
|
default |
Default constructor. Constructs an empty FluxCalibrationData object.
|
default |
Copy constructor.
|
default |
Move constructor.
|
inline |
Constructs a new FluxCalibrationData instance by loading and parsing an existing file.
filePath | Path to an existing file that will be parsed. The file contents must be in XML flux calibration data format (normally, a file with the .xfcl suffix). |
This constructor validates the data retrieved from the specified file. It throws the appropriate Error exceptions in the event of parsing errors or invalid data.
Definition at line 130 of file FluxCalibrationData.h.
|
inline |
Constructs a new FluxCalibrationData instance by parsing a well-formed XML document.
xml | Reference to the source XML document. This constructor expects an XML document in valid XFCL flux calibration data format (.xfcl). |
This constructor validates the data retrieved from the specified XML document. It throws an Error exception in the event of an invalid document or invalid data.
Definition at line 147 of file FluxCalibrationData.h.
|
inline |
Constructs a new FluxCalibrationData instance by parsing an XML element.
element | Reference to the source XML element. This constructor expects an XML document tree in valid XFCL flux calibration data format (.xfcl) rooted at this element. |
This constructor validates the data retrieved from the specified XML element. It throws an Error exception in the event of invalid data.
Definition at line 163 of file FluxCalibrationData.h.
|
inlinevirtual |
Virtual destructor.
Definition at line 171 of file FluxCalibrationData.h.
void pcl::FluxCalibrationData::Clear | ( | ) |
Clears all the flux calibration data transported by this instance, yielding an empty FluxCalibrationData object.
|
inline |
Returns the UTC time this flux calibration data was created, or an invalid TimePoint instance if creation time information is not available.
Definition at line 420 of file FluxCalibrationData.h.
|
inline |
Returns the vector of per-channel flux scale factors for the calibration target image represented by this instance.
Returns a reference to an empty vector if this object has not been initialized with valid flux calibration data.
Definition at line 220 of file FluxCalibrationData.h.
|
inline |
Returns the vector of per-channel flux calibration dispersion estimates for the calibration target image represented by this instance.
Returns a reference to an empty vector if this object has not been initialized with valid flux calibration data.
Definition at line 245 of file FluxCalibrationData.h.
|
inline |
Returns the vector of per-channel X-axis, mean PSF full width at half maximum (FWHM) estimates for the calibration target image represented by this instance.
For each measured star, the X-axis corresponds to the major axis of the fitted elliptical point spread function. For mean flux calibration data results, a Gaussian PSF is assumed.
Returns a reference to an empty vector if this object has not been initialized with valid flux calibration data, or if PSF FWHM data is not available in this instance.
Definition at line 276 of file FluxCalibrationData.h.
|
inline |
Returns the vector of per-channel Y-axis, mean PSF full width at half maximum (FWHM) estimates for the calibration target image represented by this instance.
For each measured star, the Y-axis corresponds to the minor axis of the fitted elliptical point spread function. For mean flux calibration data results, a Gaussian PSF is assumed.
Returns a reference to an empty vector if this object has not been initialized with valid flux calibration data, or if PSF FWHM data is not available in this instance.
Definition at line 308 of file FluxCalibrationData.h.
|
default |
Copy assignment operator. Returns a reference to this object.
|
default |
Move assignment operator. Returns a reference to this object.
void pcl::FluxCalibrationData::Parse | ( | const String & | filePath | ) |
Loads and parses a flux calibration data file.
filePath | Path to an existing file that will be parsed. The file contents must be in XML flux calibration data format (normally, a file with the .xfcl suffix). |
All previous data transported by this instance will be replaced with new data acquired from the specified file.
This function validates the data retrieved from the specified file. It throws an Error exception in the event of parsing errors or invalid data.
void pcl::FluxCalibrationData::Parse | ( | const XMLDocument & | xml | ) |
Parses a well-formed XML document.
xml | Reference to the source XML document. This member function expects an XML document in valid XFCL flux calibration data format (.xfcl). |
All previous data transported by this instance will be replaced with new data acquired from the specified XML contents.
This function validates the data retrieved from the specified XML document. It throws an Error exception in the event of an invalid document or invalid data.
void pcl::FluxCalibrationData::Parse | ( | const XMLElement & | element | ) |
Parses an XML element.
element | Reference to the source XML element. This function expects an XML document tree in valid XFCL flux calibration data format (.xfcl) rooted at this element. |
All previous data transported by this instance will be replaced with new data acquired from the specified XML contents.
This function validates the data retrieved from the specified XML element. It throws an Error exception in the event of invalid data.
|
inline |
Returns the normalization factor applied to raw flux calibration scale factors.
Normalization allows us to generate flux scale factors within manageable ranges for typical deep-sky images, i.e., in [100,0.001] instead of [1e-7,1e-12], for example. In current versions of the SpectrophotometricFluxCalibration process, the normalization factor is 1.0e+08. Although it is unlikely to happen, the normalization factor might change in a future version. By including it in flux calibration data, we can ensure compatibility with future calibration data.
Definition at line 370 of file FluxCalibrationData.h.
XMLDocument* pcl::FluxCalibrationData::Serialize | ( | ) | const |
Serializes the flux calibration data transported by this object as a new XML document in .xfcl format.
The returned XMLDocument object has been allocated dynamically. The caller is responsible for destroying and deallocating it as appropriate.
void pcl::FluxCalibrationData::SerializeToFile | ( | const String & | path | ) | const |
Serializes the flux calibration data transported by this object as a new XML document file in .xfcl format. The file will be newly created at the specified file path.
|
inline |
Sets a new vector of per-channel flux scale factors for the calibration target image represented by this instance.
Definition at line 231 of file FluxCalibrationData.h.
|
inline |
Sets a new vector of per-channel flux calibration dispersion estimates for the calibration target image represented by this instance.
Definition at line 256 of file FluxCalibrationData.h.
|
inline |
Sets a new vector of per-channel X-axis, mean PSF full width at half maximum (FWHM) estimates for the calibration target image represented by this instance.
Definition at line 288 of file FluxCalibrationData.h.
|
inline |
Sets a new vector of per-channel Y-axis, mean PSF full width at half maximum (FWHM) estimates for the calibration target image represented by this instance.
Definition at line 320 of file FluxCalibrationData.h.
|
inline |
Defines the normalization factor applied to raw flux calibration scale factors.
Calling this member function is not necessary for generation of new flux calibration data if the default normalization factor is used (see the __PCL_SPFC_NORMALIZATION_FACTOR macro definition).
Definition at line 385 of file FluxCalibrationData.h.
|
inline |
Sets a new vector of per-channel measured star counts for the calibration target image represented by this instance.
Definition at line 351 of file FluxCalibrationData.h.
|
inline |
Sets the path to the flux calibration target image represented by this instance.
Definition at line 206 of file FluxCalibrationData.h.
References pcl::File::FullPath().
|
inline |
Sets a version number for the flux calibration data in this instance.
Definition at line 411 of file FluxCalibrationData.h.
|
inline |
Returns the vector of per-channel measured star counts for the calibration target image represented by this instance.
Star counts refer to the sets of stars used for the calculation of robust flux calibration factors. Note that this typically includes outlier rejection procedures, so the actual numbers of measured stars are usually larger than the values returned by this function.
Returns a reference to an empty vector if this object has not been initialized with valid flux calibration data, or if star count data is not available in this instance.
Definition at line 340 of file FluxCalibrationData.h.
|
inline |
Returns the full path to the flux calibration target image represented by this instance.
The file identified by this function stores the input image of the flux calibration task, e.g. as processed by the SpectrophotometricFluxCalibration (SPFC) tool.
Definition at line 195 of file FluxCalibrationData.h.
|
inline |
Returns a version number for the flux calibration data in this instance.
The value returned by this function normally corresponds to the version of the SpectrophotometricFluxCalibration process used to generate the flux calibration data. This version number can be useful to ensure backward compatibility in future implementations.
Definition at line 401 of file FluxCalibrationData.h.