NAME

makedata.pl - Produces calibrated FGM data using raw data and calibration files. Based on gsepos4cd1s_multi provided by eg. Compressed input files are transparently managed.


SYNOPSIS

makedata.pl [--year year] --month month --days days_list [--begin begin_time] [--end end_time] [--fgmcalfile fgmcalfile] [--spacecraft spacecraft] [--coordinates coordinate_system] [--resolution resolution] [--outdir output_directory] [--name filename] [--ICL] [--version version] [--(no)archived] [--help]


DESCRIPTION

This script produces calibrated FGM data using raw data and calibration files with various resolutions and in various coordinate systems. If daily calibration files for range 7 are found, they are used, otherwise, the default range 7 calibration files are used.


OPTIONS

-y year, --year year

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

-m month, --month month

The month. One or two digits. Mandatory argument.

-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, --days days_list

List of days given as a string. Ranges are permitted, e.g -d '3 12 15-28 30'. Mandatory argument.

-b begin_time, --begin begin_time

Specify the starting time. Full format is hh:mm:ss.mmm. If only the first part ot the format is given, the rest is filled with zeroes. e.g. -b 2 is same as -b 02:00:00:000 or -b 03:45 is same as -b 03:45:00.000. Default is 00:00:00.000.

-e end_time, --end end_time

Specify the end time of the interval. Same format as for -begin option. Deafult is 23:59:59.999.

-c coordinate_system, --coordinates coordinate_system

The output coordinate system. Default is GSE. Valid values are:


=item I<sr>   for spin-reference system,
scs for spacecraft-sun system,
gse for geocentric solar ecliptic system,
gsm for geocentric solar magnetospheric system,
sm for solar magnetic system, or
j2k for geocentric equatorial inertial system of epoch J2000.
-r resolution, --resolution resolution

The resolution of output data. It can be given as an integer n or as 1/n. Also spin can be used to obtain spin averaged data. If not specified the data is not interpolated and the output will have the actual acquisition rate.

-I ,--ICL

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

-o output_directory, --outdir output_directory

The destination directory for the output files. Default is $FGMROOT/data/output/$coordposress.

-n filename, --name filename

The base name of the output file. Output file name will be CNfilename.dat. Default is CN_YYYYMMDD_hh:mm-hh:mm_coordPosRes.dat

-f fgmcalfile, --fgmcalfile fgmcalfile

Specify the fgmcal calibration file to use. It also sets the $FGMPATH environment variable to the directory where the calibration file resides.

-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. Has no effect if the calibration file is given using the -fgmcalfile option.

-a, --(no)archived

Use the archived calibration files. This is the default and sets the $FGMPATH environment variable to archived calibration files directory, $FGMROOT/archive/calfiles/fgmcal/YYYY/MM/. If this option is negated with --noarchived then the existing $FGMPATH environment variable is used, or falls back to the default path $FGMROOT/data/dcalf/ if $FGMPATH is not already set. Has no effect if the calibration file is given using the --fgmcalfile option.

-h, -?, --help

Prints a brief help message.


ENVIRONMENT

FGMROOT

Root for the FGM calibration directory structure. Default to /home/FGM/ if not set.

FGMPATH

Path to the fgmcal calibration files. Default to $FGMROOT/archive/calfiles/fgmcal/YYYY/MM/ or to $FGMROOT/data/dcalf/ if --noarchived option is used. The basename of the fgmcal file is used if this it is given via the -fgmcalfile option.

SATTPATH

Path to orbit parameters files. Default to $FGMROOT/log/atorb/ if not set.

ORBITPATH

Path to orbit parameters files. Default to $FGMROOT/log/atorb/ if not set.


FILES

$FGMROOT/data/raw/ICL/ - Imperial input path. Raw files are searched recursively in this directory.

$FGMROOT/data/raw/ESTEC/ - ESTEC (default) input path. Raw files are searched recursively in this directory.

/home/FGM/archive/calfiles/fgmcal/20$yy/$mm/ - calibration files path.

CN_YYYYMMDD_Vnn.fgmcal, CN_YYYYMMDDrange7.fgmcal - daily calibration files.

CN_range7.fgmcal - default range 7 calibration files.

$FGMROOT/data/output/coordPosRes - output directory unless -o option is used.

CN_YYYYMMDD_hh:mm-hh:mm_coordPosRes.dat - output file


DEPENDENCES

This script uses the following:

 ddsmrg,
 ddscut,
 fgmtel,
 fgmcal,
 fgmhrt,
 fgmav, 
 fgmpos,
 igmvec.


AUTHOR

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