Here we provide a collection of useful scripts and code for handling
2QZ catalogue files and assorted other things, such as mask making.
Catalogue Handling (Perl)
The main catalogue reading and writing routines are located in a Perl module:
TWOQZ_CAT.pm - current version:
3.0 (10/06/03)
This module is used in the scripts below. In order for the scripts
to load the module you will need to set your PERL5LIB environmental variable
to include the path to the module. The module contains subroutine
to:
-
Fix up dates, i.e. add the 19 or 20 tothe year (date_fix).
-
Read the catalogue entries into separate scalar variables from a string
containing a single line (rline).
-
Write the catalogue entries into a single string ready for output (wline).
-
Read public 10k format catalogue entries from a string (rlinepub).
Now obselete.
-
Write public 10k format catalogue entries to a string (wlinepub). Now obselete.
-
Read the entries in a repeats file, see
the catalogue page (rlinerep).
-
Write the entries in a repeats file (wlinerep).
-
Read in a field centres file and place it in a hash (readcents).
We also provide some scripts to do useful things with the catalogue files:
-
extract.pl This extracts catalogue entries
which have a least one observation and writes them to a file with a name
*.extract where * is the name of the original catalogue file. This
is a good simple example of how to use the TWOQZ_CAT.pm
module.
-
make_comp_cat.pl A very useful
script to generate a full catalogue file containing only IDs which are
in regions of at least a specified spectroscopic completeness [that is:
(number identified)/(number observed)]. This is based on which sector
each object is in. The resulting catalogue can then be used to make
a mask file with the make_mask.f code below. (2QZ only)
-
cat_search.pl A command line version
of the on line catalogue search tool. This extracts a catalogue file
only (no plots or spectra). Does not require TWOQZ_CAT.pm,
as the rline() and wline() subroutines are included.
-
get_fits.pl A script to extract all the
fits spectra of objects listed in a catalogue file from the CD. Does
not
require TWOQZ_CAT.pm.
Note: for these to work your version of perl should be in /usr/bin/perl
change the first line of each file if this is not the case.
Catalogue Handling (Fortran77)
If you need to read catalogue files into a piece of Fortran code you can
use these subroutines. Note that for compilation you will have to
change the path of the include file to be where ever you put it, before
it will work.
-
2dfcatread.f A Fortran subroutine to
read in 2dF catalogue files a line at a time. Uses the include file 2dfcatformat.h.
-
2dfcatwrite.f A Fortran subroutine
to write a 2dF catalogue entry to a file one line at a time. Uses the include
file 2dfcatformat.h.
-
2dfrepread.f A Fortran subroutine to
read 2dF repeats file entries a line at a time. Uses the include
file 2dfcatformat.h.
-
2dfcatformat.h A Fortran include file
containing the common block and variable definitions for reading the catalogue
file.
Mask making code (Fortran 77)
To produce completeness maps over the 2QZ survey area (2QZ only, not 6QZ)
you may use the following code:
Photometric completeness code (Fortran 77)
To do a simple interpolation of the photometric completeness map as a fucntion
of z and bJ we provide this Fortran program:
General subroutines
Finally we provide a number of useful subroutines. These are required
for code such at the mask making (make_mask.f):
All 2QZ software is distributed under the terms of the GNU
General Public License.
Back to 2QZ home
Back to Spectroscopic catalogue home
The 2QZ team (July 2003)