LRT Libraries Manual

Low Resolution Templates Fortran-77 Libraries

Index

  1. Installation
  2. How to Calculate Photometric Redshifts/K-Corrections
  3. Setting the Luminosity Priors for Photometric Redshifts
  4. Setting the Cosmology
  5. Summary of Available Functions


  1. Installation
  2. For installation instructions, see the INSTALL file.
    In a nutshell, first define the environment variable LRTPATH pointing to the folder where the files will be installed. Then run

    make
    make install

    It is recommended that you run the test codes in the test folder and compare the outputs to the zphot.bak and kcorr.bak files.


  1. How to Calculate Photometric Redshifts and K-Corrections
  2. The LRT libraries use the low resolution spectral templates of Assef et al. (2008) to calculate useful quantities like photometric redshifts, K-corrections and bolometric luminosities.

    To install the libraries, please refer to the INSTALL file included with the package.

    The LRT libraries provide functions for your Fortran-77 codes. To use the functions, a few steps have to be followed. Here we show how to construct a basic code that will calculate photometric redshifts and K-corrections.

    The order you should follow is the following:

    1. Create the photometry description file.
    2. First, put the filters you will use in the Filters folder were the code has been installed. This file has two columns: the first one is wavelength in Angstroms and the second one is the response. Lines starting with a # will be considered comments. THE EXTENSION OF THE FILE MUST BE ".filter" . See this file for an example.

      Second, create the photometry description file. This file has three columns. The first is the name of the filter file (without the .filter termination). The second is the normalization flag: 1 if Vega magnitude/fluxes are being used, 2 if IRAC and 3 if AB. The third and last column is the mean flux of your calibration source in Jy through the corresponding filter. A list of Vega mean fluxes can be found in http://nsted.ipac.caltech.edu/NStED/docs/parhelp/Photometry.html and AB ones are always 3631 Jy.

      An example of this file can be found in the bandmag.dat file included with the test files. Feel free to modify and use all the test files.

      Go to this link for a list of the filters included with the LRT libraries.

    3. Initialize the libraries from your code.
    4. Before calling the library functions, the initialization functions must be called. For photometric redshifts,

      call pzinit (filtname,nspec,zmin,zmax,dz,verbose)

      For K-corrections and all other functions,
      call kcinit (filtname,nspec,verbose)

    5. Call the functions for doing the respective calculations.
    6. For photometric redshifts, having declared 'nchan' filters:

      call pza (mag,emag,maguse,zphot,chigal,chinop,op,chi2zop)

      Photometry can be given in either magnitudes or fluxes (Jy). Note that if chi2zop is 1, the full χ2 distribution for each object will be written to the fort.90 file. For K-Corrections:
      call kca (mag,emag,maguse,z,z0,magmod,magcorr,comp,op)


  1. Setting the Luminosity Priors for Photometric Redshifts
  2. The LRT libraries can use luminosity function priors for estimating photometric redshifts. As discussed in Assef et al. (2008), the priors improve the estimates by 5 - 10% in general.

    The priors are set by the "pzinit" function which in turn calls the "setlumprior" internal function. The latter will look for a file called 'prior.dat' in the folder where you are running your program. This file must have 1 column and 4 lines with 1 number each (everything after the first number in a line is considered a comment). Lines starting with a '#' are considered comments.

    The first number indicates whether or not to use the luminosity priors. If 1, the priors will be used and if 0 they will not.

    The second number indicates the band to which this will be applied. The number must correspond to the photometry description file location of the filter from top to bottom.

    The third is the value of M*.

    The fourth is the value of α.

    If no file is provided, the function will not use a luminosity prior.


    1. Setting the Cosmology
    2. This is very similar to setting the luminosity priors. The cosmology is set by the "pzinit" and/or "kcinit" function, which in turns call the "setdist" internal function. The latter will search for a file called 'cosmo.dat' in the folder where your program is run. This file must have 1 column and 4 lines with 1 number each. Lines starting with a '#' are considered comments.

      The first number is Omega Matter.
      The second is Omega_Lambda.
      The third is Omega_k.
      The fourth is H0 in units of km/s/Mpc.

      If no file is provided a cosmology of (Omega_Matter, Omega_Lambda, Omega_k, H0) = (0.3, 0.7, 0.0, 70.0) is assumed.


  1. Summary of Available Functions
  2. The LRT main functions are pza and kca, which calculate photometric redshifts and K corrections respectively, but we also provided other potentially useful functions. A summary in alphabetical order follows:

    bol_lum : Subroutine that returns the bolometric luminosity of a galaxy given the specific luminosities returned by kca.
    get_mags : Subroutine that given specific luminosities for each component and a redshift, returns the associated magnitudes in the set of filters of the Photometry Description File. This subroutine can be used to create mock galaxies.
    DL : Function that returns the luminosity distance at a certain redshift
    fitzero : Subroutine that estimates corrections to the input photometric zero points. This can significantly improve photometric redshifts and K-corrections significantly.
    kca : Subroutine to calculate K-Corrections.
    kcinit : Subroutine to initialize the K-corrections (and most other) routines.
    pza : Subroutine to calculate Photometric Redshifts
    pzinit : Subroutine to initialize the photometric redshifts routines.
    vc : Function that returns the co-moving volume at redshift z.
    vmax : Function that returns the maximum redshift at to which a galaxy could be found given a limiting magnitude.