Project

General

Profile

Perl Tools Help Page

fstream.pl source:trunk/fstream/fstream.pl

The fstream tool is a FITS image truncating tool without using any library.
You only need perl.

Usage :
fstream.pl fits [x1,y1:x2,y2] {-o result.fits}

fits2fits.pl

The fits2fits program is a small tools to the modify a fits file.
produce a FITS file from a FITS catalog with the selected columns and explode the tables in colomns.

Usage :
fits2fits.pl input_file output_file {list}
input_file: Catalog fits_file
output_file: Catalog fits file {list} : composed of a range list of the column you want as 1..5,8,11..or with columns name as NUMBER,MAG_ISO.. or a mix of the two 1,MAG_ISO,3..5
or
fits2fits.pl
without parameters you enter in a shell mode to produce your file.

saturation.pl

The saturation program is a small tools to the treatment of flags in SLOAN Catalogs.

Usage :
saturation.pl file column flag
with file : SLOAN file you want to modify (add a new column)
column : name of the column containing the flags.
flag : hexadecimal number of the flag (typing note hexadecimal : 0x04000)
Exemple :
saturation.pl Sloanfile.fits FLAGS 0x040000
add a column result with 1 in it for any line with the 19th flag in FLAG column at 1

subfits.pl

The subfits program make a cutout of a larger fits image using WCS.

Usage :
subfits.pl origin_fits output_fits ra_center dec_center radius
origin_fits : original file
output_fits : result file
ra_center, dec_center : center coordinates in decimal degrees
radius : radius (half box-side) in seconds
Exemple :
subfits.pl img.fits result.fits 357.5227 -1.3563 120

cutlist.pl

The cutlist program is an extension of the sublist program to a list of coordinate. It access a list file to search in the Galex Database all sub-image to get.

Usage :
cutlist.pl file_list directory radius
file_list : each line contains ra dec of a center of a sub image and optionnaly the size of the box in degrees (ex 0.5d), minutes (ex 5m) or seconds (ex 13s) for this point.
directory : the directory where to stock the resulting images
radius : default size of the box in degrees (ex 0.5d), minutes (ex 5m) or seconds (ex 13s) Exemple :
cutlist.pl list.txt Result 3m

fcifits.pl and fci.pl

The fcifits read a definition file to cross-idenfiate 2 fits catalog and produce a fits file. fci is as fcifits but produce a csv catalog (usable in a spreadsheet program) All data of the first catalog a reported in the result fits file. it add 6 column : nb of objects found, rank in distance , distance in seconds, RA distance, dec distance, rank in magnitude.

Usage :
fcifits.pl param_file
Example of a parameters file:

# first catalog info
# ra1,de1=column number or name
#(as in FITS header)
fits1= /path/to/catalog1.fits
ra1= ALPHA_J2000
de1= DELTA_J2000
# second catalog info
# ra2,de2=column number or name
#(as in FITS header)
fits2= /path/to/catalog2.fits
ra2= 38
de2= 39
mag2= 16
# general info
dist= 30 ( arcsec)
# optionnal info
hour2= 1
# value != 0 indicate decimal hour R.A.
# output name of the output file.
output= output.fits

fuvs.pl

fuvs produce a fits file containing the first next source in a catalog.

Usage :
fuvs.pl input.fits output.fits ra_column de_column [-hour]
input.fits output.fits: fits file
ra_column de_column: column of the position of the sources
[-hour]: indicate if ra_column is in hour coordinates
Exemple :
fuvs.pl uvsource.fits result.fits 53 54

to_ds9ell.pl

create DS9 region files from a fits Catalog with the possibility to produce ellipse.

Usage :
to_ds9 fitsfile file.conf
fitsfile: Catalog file. file.conf: configuration file.
An example is here:here Exemple :
to_ds9 image.fits fd.conf

to_ascii.pl

produce a text file from a fits catalog with the selected columns.

Usage :
to_ascii.pl input_file output_file {list}
input_file: Catalog fits_file
output_file: Catalog text file {list} : composed of a range list of the column you want as 1..5,8,11..
or
to_ascii.pl
without parameters you enter in a shell mode to produce your file.

to_fits.pl

produce a fits from a specialy formatted ascii fits :
the first line must contain all column names with a charater separator(, ot | or <TAB>)
the second line contain the types of the column ( a for string ex 20a , j for integer, e for float)

Go to top