Input Catalogs

class txpipe.input_cats.TXBuzzardMock(*args: Any, **kwargs: Any)[source]

Bases: ceci.

This stage simulates metacal data and metacalibrated photometry measurements, starting from a cosmology catalogs of the kind used as an input to DC2 image and obs-catalog simulations.

This is mainly useful for testing infrastructure in advance of the DC2 catalogs being available, but might also be handy for starting from a purer simulation.

class txpipe.input_cats.TXCosmoDC2Mock(*args: Any, **kwargs: Any)[source]

Bases: ceci.

This stage simulates metacal data and metacalibrated photometry measurements, starting from a cosmology catalogs of the kind used as an input to DC2 image and obs-catalog simulations.

This is mainly useful for testing infrastructure in advance of the DC2 catalogs being available, but might also be handy for starting from a purer simulation.

apply_magnitude_cut(data)[source]

Allow for a cut in absolute magnitude.

load_metacal_response_model()[source]

Load an HDF file containing the response model R(log10(snr), size) R_std(log10(snr), size)

where R is the mean metacal response in a bin and R_std is its standard deviation.

So far only one of these files exists!

make_mock_metacal(data, photo)[source]

Generate a mock metacal table. This is a long and complicated function unfortunately.

Throughout we assume a single R = R11 = R22, with R12 = R21 = 0

Parameters
  • data (dict) – Dictionary of arrays read from the input cosmo catalog

  • photo (dict) – Dictionary of arrays generated to simulate photometry

remove_undetected(data, photo)[source]

Strip out any undetected objects from the two simulated data sets.

Use a configuration parameter snr_limit to decide on the detection limit.

write_output(start, target_size, photo_cols, metacal_cols, photo_file, photo_data, metacal_file, metacal_data)[source]

Save the photometry we have just simulated to disc

Parameters
  • photo_file (HDF File object) –

  • metacal_file (HDF File object) –

  • photo_data (dict) – Dictionary of simulated photometry

  • metacal_data (dict) – Dictionary of simulated metacal data

txpipe.input_cats.make_mock_photometry(n_visit, bands, data, unit_response)[source]

Generate a mock photometric table with noise added

This is mostly from LSE‐40 by Zeljko Ivezic, Lynne Jones, and Robert Lupton retrieved here: http://faculty.washington.edu/ivezic/Teaching/Astr511/LSST_SNRdoc.pdf