API reference

load_cosmos20(drn=None, bn='COSMOS2020_Farmer_processed_hlin.fits', apply_cuts=True, mag_lo=-100, mag_hi=5)[source]

Load the COSMOS-20 dataset from disk and calculate quality cuts

Parameters:
  • drn (string, optional) –

    Absolute path to directory containing .fits file storing COSMOS-20 dataset Default value is os.environ[‘COSMOS20_DRN’].

    For bash users, add the following line to your .bash_profile in order to configure the package to use your default dataset location:

    export COSMOS20_DRN=”/drn/storing/COSMOS20”

  • bn (string, optional) – Absolute path to directory containing .fits file storing COSMOS-20 dataset Default value is COSMOS20_BASENAME set at top of module

  • apply_cuts (bool, optional) – If True, returned Table will have quality cuts imposed on the data Default is True

  • mag_lo (int, optional) – Smallest absolute magnitude in any band before galaxy is considered unphysical

  • mag_hi (int, optional) – Largest absolute magnitude in any band before galaxy is considered unphysical

Returns:

cat – Table of length ngals

Return type:

astropy.table.Table

Notes

Quality cuts include lp_type=0 for the galaxies flag. And for every Mag in the Le Phare absolute magnitudes, we require mag_lo < Mag < mag_hi

median_hsc_imag_model(logsm, z)[source]

Median absolute i-band magnitude as a function of stellar mass and redshift

Parameters:
  • logsm (float or ndarray of shape (n, )) –

    base-10 log of stellar mass

    In the COSMOS2020_Farmer_processed_hlin.fits catalog, this cut pertains to the lp_mass_med column

  • redshift (float) –

    Photometric redshift derived from the Le PHARE SED-fitting code

    In the COSMOS2020_Farmer_processed_hlin.fits catalog, this is the photoz column

Returns:

imag – Absolute i-band magnitude through HSC filter

In the COSMOS2020_Farmer_processed_hlin.fits catalog, this cut pertains to the lp_MI column

Return type:

float or ndarray of shape (n, )

_images/median_imag_vs_mstar.png
get_logsm_completeness(redshift, imag_cut, ytp_c0=20.305, ytp_c1=-0.465, x0_c0=-1.95, x0_c1=0.1)[source]

Model for Mstar completeness limit

Parameters:
  • redshift (float or ndarray of shape (n, )) – Photometric redshift derived from the Le PHARE SED-fitting code In the COSMOS2020_Farmer_processed_hlin.fits catalog, this is the photoz column

  • imag_cut (float) – Cut in HSC measurement of i-band apparent magnitude In the COSMOS2020_Farmer_processed_hlin.fits catalog, this is the HSC_i_MAG column

Returns:

logsm – Cut in base-10 log of stellar mass In the COSMOS2020_Farmer_processed_hlin.fits catalog, this cut pertains to the lp_mass_med column

Return type:

float or ndarray of shape (n, )

_images/logsm_completeness_model_check.png
approximate_cuml_hsc_imag_sky_density(imag, xtp=23, ytp=4.49, x0=23, tw_h=5, lo=0.53, hi=0.225)[source]

Density per square degree of galaxies as a function of apparent i-band magnitude

Parameters:

imag (float or ndarray of shape (n, )) –

Returns:

  • Number count per square degree of galaxies brighter than

  • the input apparent i-band magnitude

_images/cuml_sky_density_app_imag_hsc.png