rail.creation.selector module

Abstract base class defining a selector.

The key feature here is make selection to either the photometric or spectroscopic catalog. Intended subclasses spectroscopic selection, probability selection on a grid for the photometry, or pure photometric selection.

class rail.creation.selector.Selector

Bases: RailStage

Base class Selector, which makes selection to the catalog

Selector take “input” data in the form of pandas dataframes in Parquet files and provide as “output” another pandas dataframes written to Parquet files.

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.

  • drop_rows ([bool] default=True) – Drop selected rows from output table

  • seed ([type not specified] default=None) – Set to an int to force reproducible results.

  • input (PqHandle (INPUT))

  • output (PqHandle (OUTPUT))

entrypoint_function: str | None = '__call__'
inputs = [('input', <class 'rail.core.data.PqHandle'>)]
name = 'Selector'
outputs = [('output', <class 'rail.core.data.PqHandle'>)]
run()

Run the stage and return the execution status.

Subclasses must implemented this method.

Return type:

None