rail.creation.degradation.spectroscopic_selections module

Applying selection functions to catalog

class rail.creation.degradation.spectroscopic_selections.SpecSelection(args, comm=None)[source]

Bases: Degrader

The super class of spectroscopic selections.

Parameters:
  • N_tot (integer) – total number of down-sampled, spec-selected galaxies. If N_tot is greater than the number of spec-sepected galaxies, then it will be ignored.

  • nondetect_val (value to be removed for non detects) –

  • downsample (bool) – If True, then downsample the pre-selected galaxies to N_tot galaxies.

  • success_rate_dir (string, the path to the success rate files.) –

  • percentile_cut (If using color-based redshift cut, percentile in redshifts above which redshifts will be cut from the sample. Default is 100 (no cut)) –

  • colnames (a dictionary that includes necessary columns) – (magnitudes, colors and redshift) for selection. For magnitudes, the keys are ugrizy; for colors, the keys are, for example, gr standing for g-r; for redshift, the key is ‘redshift’.

  • random_seed (random seed for reproducibility.) –

config_options = {'N_tot': <ceci.config.StageParameter object>, 'colnames': <ceci.config.StageParameter object>, 'downsample': <ceci.config.StageParameter object>, 'nondetect_val': <ceci.config.StageParameter object>, 'output_mode': <ceci.config.StageParameter object>, 'percentile_cut': <ceci.config.StageParameter object>, 'random_seed': <ceci.config.StageParameter object>, 'seed': 12345, 'success_rate_dir': <ceci.config.StageParameter object>}
downsampling_N_tot()[source]

Method to randomly sample down the objects to a given number of data objects.

invalid_cut(data)[source]

This function removes entries in the data that have invalid magnitude values (nondetect_val or NaN)

name = 'specselection'
run()[source]

Run the selection

selection(data)[source]

Selection functions. This should be overwritten by the subclasses corresponding to different spec selections.

validate_colnames(data)[source]

Validate the column names of data table to make sure they have necessary information for each selection. colnames: a list of column names.

class rail.creation.degradation.spectroscopic_selections.SpecSelection_BOSS(args, comm=None)[source]

Bases: SpecSelection

The class of spectroscopic selections with BOSS. BOSS selection function is based on http://www.sdss3.org/dr9/algorithms/boss_galaxy_ts.php The selection has changed slightly compared to Dawson+13 BOSS covers an area of 9100 deg^2 with 893,319 galaxies. For BOSS selection, the data should at least include gri bands.

name = 'specselection_boss'
selection(data)[source]

The BOSS selection function.

class rail.creation.degradation.spectroscopic_selections.SpecSelection_DEEP2(args, comm=None)[source]

Bases: SpecSelection

The class of spectroscopic selections with DEEP2. DEEP2 has a sky coverage of 2.8 deg^2 with ~53000 spectra. For DEEP2, one needs R band magnitude, B-R/R-I colors which are not available for the time being. So we use LSST gri bands now. When the conversion degrader is ready, this subclass will be updated accordingly.

name = 'specselection_deep2'
photometryCut(data)[source]

Applying DEEP2 photometric cut based on Newman+13. This modified selection gives the best match to the data n(z) with its cut at z~0.75 and the B-R/R-I distribution (Newman+13, Fig. 12)

Notes

We cannot apply the surface brightness cut and do not apply the Gaussian weighted sampling near the original colour cuts.

selection(data)[source]

DEEP2 selection function

speczSuccess(data)[source]

Spec-z success rate as function of r_AB for Q>=3 read of Figure 13 in Newman+13 for DEEP2 fields 2-4. Values are binned in steps of 0.2 mag with the first and last bin centered on 19 and 24.

class rail.creation.degradation.spectroscopic_selections.SpecSelection_GAMA(args, comm=None)[source]

Bases: SpecSelection

The class of spectroscopic selections with GAMA. The GAMA survey covers an area of 286 deg^2, with ~238000 objects The necessary column is r band

name = 'specselection_gama'
selection(data)[source]

GAMA selection function

class rail.creation.degradation.spectroscopic_selections.SpecSelection_HSC(args, comm=None)[source]

Bases: SpecSelection

The class of spectroscopic selections with HSC or HSC, the data should at least include giz bands and redshift.

name = 'specselection_HSC'
photometryCut(data)[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.

selection(data)[source]

Selection functions. This should be overwritten by the subclasses corresponding to different spec selections.

speczSuccess(data)[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

class rail.creation.degradation.spectroscopic_selections.SpecSelection_VVDSf02(args, comm=None)[source]

Bases: SpecSelection

The class of spectroscopic selections with VVDSf02. It covers an area of 0.5 deg^2 with ~10000 sources. Necessary columns are i band magnitude and redshift.

name = 'specselection_VVDSf02'
photometryCut(data)[source]

Photometric cut of VVDS 2h-field based on LeFèvre+05.

Notes

The oversight of 1.0 magnitudes on the bright end misses 0.2% of galaxies.

selection(data)[source]

Selection functions. This should be overwritten by the subclasses corresponding to different spec selections.

speczSuccess(data)[source]

Success rate of VVDS 2h-field

Notes

We use a redshift-based and I-band based success rate independently here since we do not know their correlation, which makes the success rate worse than in reality.

Spec-z success rate as function of i_AB read of Figure 16 in LeFevre+05 for the VVDS 2h field. Values are binned in steps of 0.5 mag with the first starting at 17 and the last bin ending at 24.

class rail.creation.degradation.spectroscopic_selections.SpecSelection_zCOSMOS(args, comm=None)[source]

Bases: SpecSelection

The class of spectroscopic selections with zCOSMOS It covers an area of 1.7 deg^2 with ~20000 galaxies. For zCOSMOS, the data should at least include i band and redshift.

name = 'specselection_zCOSMOS'
photometryCut(data)[source]

Photometry cut for zCOSMOS based on Lilly+09. NOTE: This only includes zCOSMOS bright. update the internal state

selection(data)[source]

Selection functions. This should be overwritten by the subclasses corresponding to different spec selections.

speczSuccess(data)[source]

Spec-z success rate as function of redshift (x) and I_AB (y) read of Figure 3 in Lilly+09 for zCOSMOS bright sample.