 |
Welcome to |
Script Definitions
The following scripts are in the "python" subdirectory, and they are executable -- you don't need to say "python Run.py", but just "Run.py".
makeTiles.py Script
- -config <config.xml location>
Where to find the configuration file that contains locations of dat and
temp space, as well as NVO-compliant servers for data.
- -action <list selected from data,run,jpg>
This allows control of the behavior of makeTiles. If the value of action
contains the string "data", then data will be fetched from the NVO service
corresponding to the value of the survey keyword; if the value run
is present, then tiles are computed, and if jpg is present,
then a jpeg image of the results is computed.
- -filtermask <filters to include>
By default, makeTiles computes mosaic tiles for each of the waveband filters
that correspond to the given survey. For example 2MASS has filters k, h, j; and SDSS has filters u, g, r, i, z. If this argument is present, it
restricts the number of filters computed. For example, if the value
is "uz" for a Sloan computation, only the u and z filters will be computed.
- -atlas <atlas id>
Defines the atlas that is being used. The default is TM-5-TAN-20.
For more information, see the
hyperatlas pages
- -page <page number in atlas>
Defines the page (vchart) number that is being computed in the atlas
For more information, see the
hyperatlas pages
- -config <config.xml location>
Where to find the configuration file that contains locations of dat and
temp space, as well as NVO-compliant servers for data.
- -survey <survey name from config.xml>
This is the name of the NVO SIAP image retrieval service that is to be
used for fetching data. It must match one of the survey names
that are defined in the config.xml file.
- -jobid <string to identify this job>
If this is present, a subdirectory of the temp directory is
made of this name. The purpose is when multiple instantiations of this
script are running on the same file system, so that the temp
directories are to be separated.
- -naxis <pixel size of the tiles>
- -tilexmin <tile number minimum in the x direction>
- -tileymin <tile number minimum in the y direction>
- -tilexmax <tile number maximum -- defaults to tilexmin+1>
- -tileymax <tile number maximum -- defaults to tileymin+1>
These define the region of the page that is to be computed, measured from
the reference point of the page. Tiles are numbered 999, 1000, 1001, etc,
with 1000 being the origin. A tile with coordinates (tx, ty) has its
origin at [(tx-1000)*naxis, (ty-1000)*naxis], and has size naxis in each
direction. The defaults are to comput a single 1024x1024 tile, whose
origin is at the reference point.
- -np <number of processors>
If this argument is present, each tile is computed in parallel, using MPI.
It is assumed that "mpirun" is in the path, and that the executables
in the "MPI" subdirectory have been compiled (using "mpicc").
Note This flag is not necessary if jobs have been submitted
through PBS. In that case, PBS sets an environment variable
PBS_NODEFILE, and the existence of that variable causes the right
parallel code to be executed.
colorPicture.py Script
This script is a rollup of the makeChart, getData, Run, and utility
programs defined below. It makes a simple square projection centered at
the given point. For more flexibility, edit this script, or build
something new from the component scripts.
- -config <config.xml location>
Where to find the configuration file that contains locations of dat and
temp space, as well as NVO-compliant servers for data.
- -survey <survey name from config.xml>
This is the name of the NVO SIAP image retrieval service that is to be
used for fetching data. It must match one of the survey names
that are defined in the config.xml file.
- -naxis <pixel size of the tiles>
Size of the desired mosaic image in each direction.
- -ra <right ascension>
Right ascension of the center of the desired mosaic image.
- -dec <declination>
Declination of the center of the desired mosaic image.
Run.py Script
- -data <directory where are input images> (mandatory)
Location of the directory for input data. It is assumed to have directory names chosen from the filterlist ie k, h, j for 2MASS. The input files come from SRB and go in here.
- -temp <temporary directory> (mandatory)
Location of temp space. It will be scrubbed before use so don't leave anything valuable here.
Montage produces about 5-10 times the bulk of the
input dataset during its projection, background removal, and coaddition. These
files will be put in this directory.
- -chartfile <chartfile> (mandatory)
This is the name of the chart file (FITS header, also called template file) that defines
the requested mosaic.
- -outfile <outfile> (mandatory)
This is the file name that will be used for the resulting mosaic.
- -debug <level>
This debug level will be passed to all Montage modules. Voluminous output may result
for values bigger than 1.
- -noCorrectBG
This toggle prevents Atlasmaker from estimating and subtracting
the background levels from images. The resulting mosaics will not
look much like sky, they will have dark and light stripes and blotches.
The following arguments are applicable when running Atlasmaker in parallel mode.
If the -np argument is present, the projection is done through the parallel
executive, with the specified number of processors. If the -machinefile argument is
present, its value is assumed to point to a file of machine names that will be used as
worker nodes. If neither of those is present, the computation is serial.
In all cases, the background subtraction and coaddition is done serially.
- -np <number of processors>
This is the number of processors to be used for the MPI parallel compute intensive work.
- -machinefile <machinefile>
This argument is the file of machine names to use for the MPI, the same semantics as the argument of the same name in the mpirun command.
- -mpiopt <mpiopt>
This argument specifies the parallel algorithm to be used in the MPI parallel processing of the projection tasks. The values can be "roundrobin" (default) or "lockfile".
getData.py Script
This script uses a given chart and an NVO images server to fetch data. The chart is used
to form the request to the server, which returns a set of URLs. These URLs are
instantiated, and the resulting data stored in the place indicated through the -data
argument. This code understands http:// and srb:// URLs. In the latter case, it attempts
ti initiate SRB transport by running the "Sinit" command. If that succeeds, it assumes that
"Sget" and "Sexit" will also work. For more information on SRB
check here.
- -data <data directory> (mandatory)
This is the directory where the retrieved files will be placed.
- -chartfile <chart file> (mandatory)
This is the file that contains the chart (FITS header, template file) that will be used to
decide what data to fetch.
- -siap <Base URL of SIAP server>
This is the baseURL for the SIAP server. From this string we expect to append something like "POS=203.0,39.0&SIZE=0.5" and get a URL that delivers a VOTable to SIAP specification.
For more information on this protocol,
check here.
makeChart.py Script
This script creates a chart with minimal input information. The mandatory parameters are the
RA and Dec of a point in the sky that will be in the approximate center of the created mosaic,
and the width and height of the image that will be produced, in pixels. If there is an
"atlas" argument, the relevant page is found though a call to a Hyperatlas service
(see here for more information).
Otherwise, a "scale" argument is needed to define the scale in degrees per pixel. In the
latter case, the projection will be TAN and the reference point at the center of the
image.
- -ra <ra> and -dec <dec> (mandatory)
These change the default ra and dec. Note this string is used to form file names as well as turned into a float.
- -naxis1 <width in pixels> and -naxis2 <height in pixels> (mandatory)
The width and height of the desired image.
- -chartfile <chart file> (mandatory)
The file name where the resulting chart will be written.
- -atlas <atlas name, eg TM-5-TAN-20>
The name of an atlas to be used for the rest of the projection information.
- -scale <scale>
If no atlas is specified, this argument provides the scale (degrees per pixel), which
defaults to 1/3600 if not present.
other Utilities
These utilities are in the "util" subdirectory.
mReduceFloat -o <outfile> <infile>
This program takes a FITS file with BITPIX=-64 (double pixels), and converts
it to a file with BITPIX=-32 (float pixels).
mReduce -a <minq> -z <maxq> -o <outfile> <infile>
This program takes a FITS file with BITPIX=-64 (double pixels), and converts
it to one with BITPIX=8 (byte pixels).
The parameters "minq" and "maxq" are quantiles of the pixel distribution that are
used to maximize the information content of the resulting image. A pixel brightness
minp is found so that the proportion of pixels "minq" are less than minp,
and similarly for "maxq". Pixels less than minp are mapped to zero, and greater
than maxp mapped to 255. Pixels between are mapped with a square root stretch.
Thus if "minq" is 0.5, then minp is the median pixel brightness.
mCombine <fileR> <fileG> <fileB>
This program takes three FITS files with BITPIX=8 (byte pixels) and interleaves
the pixels to a color PPM file, which is emitted on standard output.
It is intended to be used with the JPEG compression utility
"cjpeg" which is in util/jpeg.