Low Resolution Templates Fortran-77 Libraries
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 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
- How to Calculate Photometric
Redshifts and K-Corrections
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
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:
- Create the photometry description file.
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
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
Go to this link for a list
of the filters included with the LRT libraries.
- Initialize the libraries from your code.
Before calling the library functions, the
initialization functions must be called. For
For K-corrections and all other functions,
- Call the functions for doing the respective
For photometric redshifts, having declared 'nchan' filters:
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:
- Setting the Luminosity Priors for
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
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
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
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
- Setting the Cosmology
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
- Summary of Available Functions
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:
||Subroutine that returns the bolometric luminosity of a
galaxy given the specific luminosities returned by kca.
||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.
||Function that returns the luminosity distance at a certain
||Subroutine that estimates corrections to the input
photometric zero points. This can significantly improve
photometric redshifts and K-corrections significantly.
||Subroutine to calculate K-Corrections.
||Subroutine to initialize the K-corrections (and most other)
||Subroutine to calculate Photometric Redshifts
||Subroutine to initialize the photometric redshifts routines.
||Function that returns the co-moving volume at redshift z.
||Function that returns the maximum redshift at to which a
galaxy could be found given a limiting magnitude.