rail.creation.degradation.grid_selection module
Degraders that emulate spectroscopic effects on photometry
- class rail.creation.degradation.grid_selection.GridSelection(args, comm=None)[source]
Bases:
DegraderUses the ratio of HSC spectroscpic galaxies to photometric galaxies to portion a sample into training and application samples. Option to implement a color-based redshift cut off in each pixel. Option of further degrading the training sample by limiting it to galaxies less than a redshift cutoff by specifying redshift_cut.
- Parameters:
color_redshift_cut (True or false, implements color-based redshift cut. Default is True.) – If True, ratio_file must include second key called ‘data’ with magnitudes, colors and spec-z from the spectroscopic sample.
percentile_cut (If using color-based redshift cut, percentile in spec-z above which redshifts will be cut from training sample. Default is 99.0) –
scaling_factor (Enables the user to adjust the ratios by this factor to change the overall number of galaxies kept. For example, if you wish) – to generate 100,00 galaxies but only 50,000 are selected by default, then you can adjust factor up by a factor of 2 to return more galaixes.
redshift_cut (redshift above which all galaxies will be removed from training sample. Default is 100) –
ratio_file (hdf5 file containing an array of spectroscpic vs. photometric galaxies in each pixel. Default is hsc_ratios.hdf5 for an HSC based selection) –
settings_file (pickled dictionary containing information about colors and magnitudes used in defining the pixels. Dictionary must include the following keys:) – ‘x_band_1’: string, this is the band used for the magnitude in the color magnitude diagram. Default for HSC is ‘i’. ‘x_band_2’: string, this is the redder band used for the color in the color magnitude diagram. if x_band_2 string is not set to ‘’ then the grid is assumed to be over color and x axis color is set to x_band_1 - x_band_2, default is ‘’. ‘y_band_1’: string, this is the bluer band used for the color in the color magnitude grid. Default for HSC is ‘g’. ‘y_band_2’: string, this is the redder band used for the color in the color magnitude diagram. if y_band_2 is not set to ‘’ then the y-band is assumed to be over color and is set to y_band_1 - y_band 2. ‘x_limits’: 2-element list, this is a list of the lower and upper limits of the magnitude. Default for HSC is [13, 16], ‘y_limits’: 2-element list, this is a list of the lower and upper limits of the color. Default for HSC is [-2, 6]}
NOTE (the default 'HSC' grid file, located in rail/examples_data/creation_data/data/hsc_ratios_and_specz.hdf5, is based on data from the) –
Release (Second HSC Data) –
here (details of which can be found) –
Aihara –
H. –
AlSayyad –
Y. –
Ando –
M. –
2019 (et al.) –
PASJ –
71 –
114 –
doi (10.1093/pasj/psz103) –
- config_options = {'color_redshift_cut': <ceci.config.StageParameter object>, 'output_mode': <ceci.config.StageParameter object>, 'percentile_cut': <ceci.config.StageParameter object>, 'random_seed': <ceci.config.StageParameter object>, 'ratio_file': <ceci.config.StageParameter object>, 'redshift_cut': <ceci.config.StageParameter object>, 'scaling_factor': <ceci.config.StageParameter object>, 'seed': 12345, 'settings_file': <ceci.config.StageParameter object>}
- def_ratio_file = '/home/docs/checkouts/readthedocs.org/user_builds/rail-hub/envs/eac-introspection/lib/python3.9/site-packages/rail/examples_data/creation_data/data/hsc_ratios_and_specz.hdf5'
- def_set_file = '/home/docs/checkouts/readthedocs.org/user_builds/rail-hub/envs/eac-introspection/lib/python3.9/site-packages/rail/examples_data/creation_data/data/HSC_grid_settings.pkl'
- name = 'GridSelection'
- run()[source]
HSC galaxies were binned in color magnitude space with i-band mag from -2 to 6 and g-z color from 13 to 26 200 bins in each direction. The ratio of of galaxies with spectroscopic redshifts (training galaxies) to galaxies with only photometry in HSC wide field (application galaxies) was computed for each pixel. We divide the data into the same pixels and randomly select galaxies into the training sample based on the HSC ratios. If using a color-based redshift cut, galaxies with redshifts > the percentile cut are removed from the sample before making the random selection.