NAME

makecal.pl - Produces FGM *.cal files.


SYNOPSIS

makecal.pl --month month [--year year] [--days days_list | --begin day_begin --end day_end] [--spacecraft spacecraft] [--(no)idl] [--ICL] [--Merge] [--version version] [--(no)log] [--help]


DESCRIPTION

This script produces the FGM calibrated *.cal files using the calibration (*.fgmcal) files. It also produces the cfg file for fgm_spectra.pro idl script and runs it to produce the spectra. Compressed input files are transparently managed. If data is missing for one spacecraft on one day, then calibration files and spectra are not produced for the other spacecraft on that day either. For this reason, the dates and spacecraft should be choosen carefuly. If daily calibration files for range 7 are found, they are used, otherwise, the default range 7 calibration files are used.


OPTIONS

-m month, --month month

The month. One or two digits. Mandatory argument.

-y year, --year year

The year. One or two digits. Default is the current year.

-s spacecraft, --spacecraft spacecraft

The spacecraft number (1-4) or list of spacecraft e.g -s '1 3 4'. Default all spacecraft.

-d days_list, -d-ays days_list

List of days given as a string. Ranges are permitted, e.g -d '3 12 15-28 30'. If niether --days, --begin, or --end options are given, than the entire month is processed.

-b day_begin, --begin day_begin

First day in the sequence. Can be an one or two digits integer in which case the starting time is 00:00:00.000, or can have the starting time attached. In this last case, the first two digits represent the day and the rest is the time. Example: -b 2 or -b 2815 or -b 2815:20, etc. Default value for this option is 1.

-e day_end, --end day_end

Last day in sequence. Same format as above. Default value is 31.

-I ,--ICL

Use the Imperial College London raw data. Default is to use the ESTEC raw data.

-M, --Merge

Merge normal science with burst science data. The default is to use only normal science data when available and only burst science when normal science is not available (and burst science is..).

-l, --log

Record the run to dailycal log file. Default is enabled. Can be disbled using the -nolog option.

-v version, --version version

Version of the calibration files. If this option is not given then the environment variable FGMVERSION is used. If FGMVERSION is not set, then the default version is 3.

-i, --idl

Run the fgm_spectra.pro IDL script to produce the spectra for the given days. This option is enabled by default. To disable it, negate: --noidl.

-h, -?, --help

Prints a brief help message.


ENVIRONMENT

FGMROOT

Root for the FGM calibration directory structure. Default to /export/cluster2/pp/.

FGMPATH

Path to calibration files (*.fgmcal and *.cfgnew). Default to $FGMROOT/precal/.

SATTPATH

Path to orbit parameters files. Default to $FGMROOT/input/cddaten/atorb/.

FGMVERSION

Calibration files version.


FILES

/export/cluster2/pp/input/pegasus/$yy_$mm/ - input path

/export/cluster2/pp/output/cal/ - output path

/export/cluster2/pp/input/pegasus/$yy_$mm/ - path to IC calibration files

/export/cluster2/pp/input/cddaten/cluster$sc/(n|b)sd_$sc/ - path to ESTEC calibration files

C$sc_$yy$mm$dd_B.(B|N)S(.gz) - IC input raw files

$yy$mm$ddf(b|n).?a$sc(.gz) - ESTEC input raw files

C$sc_20$yy$mm$dd_V??.fgmcal - calibration files

C$sc_20$yy$mm$dd_range7.fgmcal - daily range 7 calibration files

C$sc_range7.fgmcal - default range 7 calibration files

c$sc_20$yy$mm$dd_cfdv??.cal - FGM calibrated data files

/export/cluster2/pp/idl/fgm_spectra.cfg - Config file for fgm_spectra.pro. It contains the spacecraft and days for which spectra are produced.

/export/cluster2/pp/scripts/log/dailycal_$yy$mm.log - Dailycal log file.


DEPENDENCES

This script uses the following:

 ddscut,
 fgmtel,
 fgmcut,
 fgmvec,
 fgm_spectra.pro.


AUTHOR

Dragos Constantinescu <d.constantinescu@tu-bs.de>