EAZY

Module to faciliate scripting of EAZY analysis

frb.galaxies.eazy.eazy_filenames(input_dir, name)[source]

Generate names for EAZY files

Args:
  • input_dir (str) – Path to eazy inputs/ folder (can be relative) This is where eazy will be run

  • name (str) – Name of the source being analzyed

Returns:

catalog_filename, parameter_filename, translate_file

Return type:

tuple

frb.galaxies.eazy.eazy_setup(input_dir, template_dir=None)[source]

Setup for EAZY

Args:
  • input_dir (str) – Path to personal eazy inputs/ folder (can be relative)

  • template_dir (str, optional) – Path to templates/ folder in EAZY software package. If not given, it looks for the folder of eazy, the executable and navigates from there.

Returns:

frb.galaxies.eazy.eazy_input_files(photom, input_dir, name, out_dir, id_col='id', prior_filter=None, templates='eazy_v1.3', combo='a', cosmo=FlatLambdaCDM(name='Planck18', H0=<Quantity 67.66 km / (Mpc s)>, Om0=0.30966, Tcmb0=<Quantity 2.7255 K>, Neff=3.046, m_nu=<Quantity [0., 0., 0.06] eV>, Ob0=0.04897), magnitudes=False, prior='prior_R_zmax7', zmin=0.05, zmax=7.0, zstep=0.001, prior_ABZP=23.9, n_min_col=5, write_full_table=False)[source]
Write to disk a series of files needed to run EAZY
  • catalog file

  • translation file

  • param file

Args:
  • photom (dict or Table) – Held by an FRBGalaxy object

  • input_dir (str) – Path to eazy inputs/ folder (can be relative) This is where eazy will be run

  • name (str) – Name of the source being analzyed

  • out_dir (str) – Path to eazy OUTPUT folder relative to the input_dir

  • id_col (str, optional) – Column name to be used as the ID. Looks for a column with “id” in its name by default.

  • prior_filter (str, optional) – If provided, use the flux in this filter for EAZY’s prior

  • templates (str, optional) – Template set name to be used. Should be one of ‘br07_deafult’,’br07_goods’,’cww+kin’,’eazy_v1.0’, ‘eazy_v1.1_lines’,’eazy_v1.2_dusty’,’eazy_v1.3’,’pegase’, ‘pegase13’.

  • combo (int or str, optional) – Combinations of templates to be used for analysis. Can be one of 1,2,99,-1 and ‘a’. Read EAZY’s zphot.param.default file for details

  • cosmo (astropy.cosmology, optional) – Defaults to Repo cosmology

  • prior (str, optional) – Name of the prior file found in the EAZY templates folder. Default value is ‘prior_R_zmax7’.

  • magnitudes (bool, optional) – True if catalog contains magnitudes as opposed to F_nu values.

  • zmin (float, optional) – Minimum search redshift for EAZY. Default value is 0.05.

  • zmax (float, optional) – Maximum search redshift for EAZY. Be careful about the prior file not having information beyond a redshift less than zmax.

  • zstep (float, optional) – Step size of the redshift grid. (z_{i+1} = z_i+zstep*(1+z_i)). Default value is 0.001.

  • prior_ABZP (float, optional) – Zero point redshift for the band on which prior will be applied. Default value is for DECam r (https://cdcvs.fnal.gov/redmine/projects/des-sci-verification/wiki/Photometry)

  • write_full_table (bool, optional) – Are you trying to use this function for a table of objects instead of a single object? If so, set this to True.

frb.galaxies.eazy.run_eazy(input_dir, name, logfile)[source]

Find and run the EAZY executable on the files

Args:
  • input_dir (str) – Path to eazy inputs/ folder (can be relative) This is where eazy will be run

  • name (str) – Name of the source being analzyed

  • logfile (str)

frb.galaxies.eazy.eazy_stats(zgrid, pzi)[source]

Calculate the ‘best’ zphot and error

Args:
  • zgrid (np.ndarray)

  • pzi (np.ndarray)

Returns:

frb.galaxies.eazy.readEazyBinary(MAIN_OUTPUT_FILE='photz', OUTPUT_DIRECTORY='./OUTPUT', CACHE_FILE='Same')[source]

tempfilt, coeffs, temp_sed, pz = readEazyBinary(MAIN_OUTPUT_FILE=’photz’, OUTPUT_DIRECTORY=’./OUTPUT’, CACHE_FILE = ‘Same’)

Read Eazy BINARY_OUTPUTS files into structure data.

If the BINARY_OUTPUTS files are not in ‘./OUTPUT’, provide either a relative or absolute path in the OUTPUT_DIRECTORY keyword.

By default assumes that CACHE_FILE is MAIN_OUTPUT_FILE+’.tempfilt’. Specify the full filename if otherwise.

frb.galaxies.eazy.getEazyPz(idx, MAIN_OUTPUT_FILE='photz', OUTPUT_DIRECTORY='./OUTPUT', CACHE_FILE='Same', binaries=None, get_prior=False, get_chi2=False)[source]

zgrid, pz = getEazyPz(idx, MAIN_OUTPUT_FILE=’photz’, OUTPUT_DIRECTORY=’./OUTPUT’, CACHE_FILE=’Same’, binaries=None)

Get Eazy p(z) for object #idx.

To avoid re-reading the binary files, supply binaries = (tempfilt, pz)

Note

This module requires EAZY to be installed and the EAZYDIR environment variable to be set. See the EAZY documentation for installation instructions.