rail.creation.degradation.observing_condition_degrader module

Degrader applied to the magnitude error based on a set of input observing condition maps

class rail.creation.degradation.observing_condition_degrader.ObsCondition(args, comm=None)[source]

Bases: Degrader

Photometric errors based on observation conditions

This degrader calculates spatially-varying photometric errors using input survey condition maps. The error is based on the LSSTErrorModel from the PhotErr python package.

Parameters:
  • nside (int, optional) – nside used for the HEALPIX maps.

  • mask (str, optional) – Path to the mask covering the survey footprint in HEALPIX format. Notice that all negative values will be set to zero.

  • weight (str, optional) – Path to the weights HEALPIX format, used to assign sample galaxies to pixels. Default is weight=””, which uses uniform weighting.

  • tot_nVis_flag (bool, optional) – If any map for nVisYr are provided, this flag indicates whether the map shows the total number of visits in nYrObs (tot_nVis_flag=True), or the average number of visits per year (tot_nVis_flag=False). The default is set to True.

  • random_seed (int, optional) – A random seed for reproducibility.

  • map_dict (dict, optional) – A dictionary that contains the paths to the survey condition maps in HEALPIX format. This dictionary uses the same arguments as LSSTErrorModel (from PhotErr). The following arguments, if supplied, may contain either a single number (as in the case of LSSTErrorModel), or a path: [m5, nVisYr, airmass, gamma, msky, theta, km, tvis] For the following keys: [m5, nVisYr, gamma, msky, theta, km] numbers/paths for specific bands must be passed. Example: {“m5”: {“u”: path, …}, “theta”: {“u”: path, …},} Other LSSTErrorModel parameters can also be passed in this dictionary (e.g. a necessary one may be [nYrObs] for the survey condition maps). If any argument is not passed, the default value in PhotErr’s LsstErrorModel is adopted.

assign_pixels(catalog: DataFrame) DataFrame[source]

assign the pixels to the input catalog

config_options = {'map_dict': <ceci.config.StageParameter object>, 'mask': <ceci.config.StageParameter object>, 'nside': <ceci.config.StageParameter object>, 'output_mode': <ceci.config.StageParameter object>, 'random_seed': <ceci.config.StageParameter object>, 'seed': 12345, 'tot_nVis_flag': <ceci.config.StageParameter object>, 'weight': <ceci.config.StageParameter object>}
get_pixel_conditions(pixel: int) dict[source]

get the map values at given pixel output is a dictionary that only contains the LSSTErrorModel keys

name = 'ObsCondition'
run()[source]

Run the degrader.