rail.core.utilPhotometry module
Module that implements operations on photometric data such as magnitudes and fluxes.
- class rail.core.utilPhotometry.HyperbolicMagnitudes(args, comm=None)[source]
Bases:
PhotormetryManipulatorConvert a set of classical magnitudes to hyperbolic magnitudes (Lupton et al. 1999). Requires input from the initial stage (HyperbolicSmoothing) to supply optimal values for the smoothing parameters (b).
- compute(data, parameters)[source]
Main method to call. Outputs hyperbolic magnitudes compuated from a set of smoothing parameters and input catalogue with classical magitudes and their respective errors.
- Parameters:
data (PqHandle) – Input table with photometry (magnitudes or flux columns and their respective uncertainties) as defined by the configuration.
parameters (PqHandle) – Table with smoothing parameters per photometric band, determined by HyperbolicSmoothing.
- Returns:
output – Output table containting hyperbolic magnitudes and their uncertainties. If the columns in the input table contain a prefix mag_, this output tabel will replace the prefix with hyp_mag_, otherwise the column names will be identical to the input table.
- Return type:
PqHandle
- config_options = {'error_columns': <ceci.config.StageParameter object>, 'is_flux': <ceci.config.StageParameter object>, 'output_mode': <ceci.config.StageParameter object>, 'value_columns': <ceci.config.StageParameter object>, 'zeropoints': <ceci.config.StageParameter object>}
- inputs = [('input', <class 'rail.core.data.PqHandle'>), ('parameters', <class 'rail.core.data.PqHandle'>)]
- name = 'HyperbolicMagnitudes'
- outputs = [('output', <class 'rail.core.data.PqHandle'>)]
- class rail.core.utilPhotometry.HyperbolicSmoothing(args, comm=None)[source]
Bases:
PhotormetryManipulatorInitial stage to compute hyperbolic magnitudes (Lupton et al. 1999). Estimates the smoothing parameter b that is used by the second stage (HyperbolicMagnitudes) to convert classical to hyperbolic magnitudes.
- compute(data)[source]
Main method to call. Computes the set of smoothing parameters (b) for an input catalogue with classical photometry and their respective errors. These parameters are required by the follow-up stage HyperbolicMagnitudes and are parsed as tabular data.
- Parameters:
data (PqHandle) – Input table with magnitude and magnitude error columns as defined in the configuration.
- Returns:
parameters – Table with smoothing parameters per photometric band and additional meta data.
- Return type:
PqHandle
- config_options = {'error_columns': <ceci.config.StageParameter object>, 'is_flux': <ceci.config.StageParameter object>, 'output_mode': <ceci.config.StageParameter object>, 'value_columns': <ceci.config.StageParameter object>, 'zeropoints': <ceci.config.StageParameter object>}
- inputs = [('input', <class 'rail.core.data.PqHandle'>)]
- name = 'HyperbolicSmoothing'
- outputs = [('parameters', <class 'rail.core.data.PqHandle'>)]
- class rail.core.utilPhotometry.PhotormetryManipulator(args, comm=None)[source]
Bases:
RailStage,ABCBase class to perform opertations on magnitudes. A table with input magnitudes and errors is processed and transformed into an output table with new magnitudes and errors.
Subclasses must implement the run() and compute() method.
- abstract compute(data)[source]
Main method to call.
- Parameters:
data (PqHandle) – Input tabular data with column names as defined in the configuration.
- Returns:
output – Output tabular data.
- Return type:
PqHandle
- config_options = {'error_columns': <ceci.config.StageParameter object>, 'is_flux': <ceci.config.StageParameter object>, 'output_mode': <ceci.config.StageParameter object>, 'value_columns': <ceci.config.StageParameter object>, 'zeropoints': <ceci.config.StageParameter object>}
- get_as_fluxes()[source]
Loads specified photometric data as fluxes, converting magnitudes on the fly.
- inputs = [('input', <class 'rail.core.data.PqHandle'>)]
- name = 'PhotormetryManipulator'
- outputs = [('output', <class 'rail.core.data.PqHandle'>)]