rail.tools.catalog_tools module
Module that implements operations on catalog data such as size and ellipticity.
- class rail.tools.catalog_tools.BulgeDiscSizeEllipticityToAB
Bases:
CatalogManipulatorFirst compute galaxy size from bulge and disk sizes in the simulation, then convert size and ellipticity columns to semi-major and minor axes
- Parameters:
output_mode ([str] default=default) – What to do with the outputs. The options are ‘default’, where outputs will be written to files and some returned, and ‘return’, where outputs will only be returned and not written.
major_columns ([str] default=major) – column names for semi-major axes.
minor_columns ([str] default=minor) – column names for semi-major axes.
to_arcsec ([bool] default=False) – Whether apply conversion from pixel size to arcsec size.
arcsec_per_pix ([float] default=0.2) – Size of the pixel in arcsec.
bulge_size_column ([str] default=size_bulge_true) – Bulge size
disk_size_column ([str] default=size_disk_true)
- bulge_to_total_ratio_colum: [str] default=bulge_to_total_ratio
column names for size (here defined to be the geometric average of semi-major and minor axes)
- ellipticity_column: [str] default=ellipticity_true
column names for ellipticity
input: PqHandle (INPUT)
output: PqHandle (OUTPUT)
- inputs = [('input', <class 'rail.core.data.PqHandle'>)]
- name = 'BulgeDiscSizeEllipticityToAB'
- outputs = [('output', <class 'rail.core.data.PqHandle'>)]
- class rail.tools.catalog_tools.CatalogManipulator
Bases:
RailStage,ABCBase class to perform opertations on catalog size columns. A table with input size-related columns is processed and transformed into an output table with semi-major and semi-minor axis in arcsec.
Subclasses must implement the run() and compute() method.
- Parameters:
output_mode ([str] default=default) – What to do with the outputs. The options are ‘default’, where outputs will be written to files and some returned, and ‘return’, where outputs will only be returned and not written.
major_columns ([str] default=major) – column names for semi-major axes.
minor_columns ([str] default=minor) – column names for semi-major axes.
to_arcsec ([bool] default=False) – Whether apply conversion from pixel size to arcsec size.
arcsec_per_pix ([float] default=0.2) – Size of the pixel in arcsec.
input (PqHandle (INPUT))
output (PqHandle (OUTPUT))
- __init__(args, **kwargs)
Constructor: Do RailStage specific initialization
- compute(data)
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
- inputs = [('input', <class 'rail.core.data.PqHandle'>)]
- name = 'CatalogManipulator'
- outputs = [('output', <class 'rail.core.data.PqHandle'>)]
- run()
Implements the operation performed on the photometric data.
- class rail.tools.catalog_tools.MajorEllipticityToAB
Bases:
CatalogManipulatorConvert semi-major axis (size) and ellipticity columns to semi-major and minor axes
- Parameters:
output_mode ([str] default=default) – What to do with the outputs. The options are ‘default’, where outputs will be written to files and some returned, and ‘return’, where outputs will only be returned and not written.
major_columns ([str] default=major) – column names for semi-major axes.
minor_columns ([str] default=minor) – column names for semi-major axes.
to_arcsec ([bool] default=False) – Whether apply conversion from pixel size to arcsec size.
arcsec_per_pix ([float] default=0.2) – Size of the pixel in arcsec.
size_column ([str] default=size) – column names for size (here defined to be the same as the major axis)
ellipticity_column ([str] default=ellipticity) – column names for ellipticity
input (PqHandle (INPUT))
output (PqHandle (OUTPUT))
- inputs = [('input', <class 'rail.core.data.PqHandle'>)]
- name = 'MajorEllipticityToAB'
- outputs = [('output', <class 'rail.core.data.PqHandle'>)]
- class rail.tools.catalog_tools.MomentsToAB
Bases:
CatalogManipulatorConvert image moments to semi-major and minor axes.
- Parameters:
output_mode ([str] default=default) – What to do with the outputs. The options are ‘default’, where outputs will be written to files and some returned, and ‘return’, where outputs will only be returned and not written.
major_columns ([str] default=major) – column names for semi-major axes.
minor_columns ([str] default=minor) – column names for semi-major axes.
to_arcsec ([bool] default=False) – Whether apply conversion from pixel size to arcsec size.
arcsec_per_pix ([float] default=0.2) – Size of the pixel in arcsec.
xx_column ([str] default=shape_xx) – column names for moment xx
xy_column ([str] default=shape_xy) – column names for moment xy
yy_column ([str] default=shape_yy) – column names for moment yy
input (PqHandle (INPUT))
output (PqHandle (OUTPUT))
- inputs = [('input', <class 'rail.core.data.PqHandle'>)]
- name = 'MomentsToAB'
- outputs = [('output', <class 'rail.core.data.PqHandle'>)]
- class rail.tools.catalog_tools.SizeEllipticityToAB
Bases:
CatalogManipulatorConvert size and ellipticity columns to semi-major and minor axes
- Parameters:
output_mode ([str] default=default) – What to do with the outputs. The options are ‘default’, where outputs will be written to files and some returned, and ‘return’, where outputs will only be returned and not written.
major_columns ([str] default=major) – column names for semi-major axes.
minor_columns ([str] default=minor) – column names for semi-major axes.
to_arcsec ([bool] default=False) – Whether apply conversion from pixel size to arcsec size.
arcsec_per_pix ([float] default=0.2) – Size of the pixel in arcsec.
size_column ([str] default=size) – column names for size (here defined to be the geometric average of semi-major and minor axes)
ellipticity_column ([str] default=ellipticity) – column names for ellipticity
input (PqHandle (INPUT))
output (PqHandle (OUTPUT))
- inputs = [('input', <class 'rail.core.data.PqHandle'>)]
- name = 'SizeEllipticityToAB'
- outputs = [('output', <class 'rail.core.data.PqHandle'>)]
- rail.tools.catalog_tools.compute_AB_from_maj_ellip(size, e)
- rail.tools.catalog_tools.compute_AB_from_moments(xx, xy, yy)
- rail.tools.catalog_tools.compute_AB_from_size_ellip(size, e)