rail.creation.degraders.spectroscopic_degraders module

Degraders that emulate spectroscopic effects on photometry

class rail.creation.degraders.spectroscopic_degraders.InvRedshiftIncompleteness

Bases: Selector

Degrader that simulates incompleteness with a selection function inversely proportional to redshift.

The survival probability of this selection function is p(z) = min(1, z_p/z), where z_p is the pivot redshift.

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.

  • pivot_redshift ([float] (required)) – redshift at which the incompleteness begins

  • input (PqHandle (INPUT))

  • output (PqHandle (OUTPUT))

__init__(args, **kwargs)
entrypoint_function: str | None = '__call__'
interactive_function: str | None = 'inv_redshift_incompleteness'
name = 'InvRedshiftIncompleteness'
class rail.creation.degraders.spectroscopic_degraders.LineConfusion

Bases: Noisifier

Degrader that simulates emission line confusion.

degrader = LineConfusion(true_wavelen=3727,
                         wrong_wavelen=5007,
                         frac_wrong=0.05)

is a degrader that misidentifies 5% of OII lines (at 3727 angstroms) as OIII lines (at 5007 angstroms), which results in a larger spectroscopic redshift.

Note that when selecting the galaxies for which the lines are confused, the degrader ignores galaxies for which this line confusion would result in a negative redshift, which can occur for low redshift galaxies when wrong_wavelen < true_wavelen.

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.

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

  • true_wavelen ([float] (required)) – wavelength of the true emission line

  • wrong_wavelen ([float] (required)) – wavelength of the wrong emission line

  • frac_wrong ([float] (required)) – fraction of galaxies with confused emission lines

  • input (PqHandle (INPUT))

  • output (PqHandle (OUTPUT))

__init__(args, **kwargs)
entrypoint_function: str | None = '__call__'
interactive_function: str | None = 'line_confusion'
name = 'LineConfusion'