NAME

modcalf.pl - Propagate changes through FGM daily calibration files.


SYNOPSIS

modcalf.pl --month month [--year year] [--from yymmdd[vNN]] --begin day_begin|--day day [--end day_end] --spacecraft spacecraft --parameter name [--line line] --column column --group parameter group [--Value value] -r-ange range [--version version] [--(no)log] [--(no)idl] [--(no)ask] [--help]


DESCRIPTION

This script propagates a given parameter value through FGM cfgnew daily calibration files. If no value (--Value) or initialization day (--from) is given, the value to propagate is read from the first file in sequence. By default, the changes are also reflected in the corresponding fgmcal file. Groups of more parameters corresponding to range changes, higher harmonics, or entire ranges can also be changed.


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.

-b day_begin, --begin day_begin

First day in sequence. One or two digits. Either this argument or (--day day) has to be used.

-d day, --day day

Only this day will be changed. Takes precedence over -b and -e options.

-e day_end, --end day_end

Last day in sequence. Default is end of month.

-s spacecraft, --spacecraft spacecraft

The spacecraft number (1-4). Mandatory argument.

-p name, --parameter name

The name of the parameter to be modified. This name is the GUI parameter name and NOT the name in the calibration file. Valid names are:

 offset_r2,
 offset_r3,
 offset_r4,
 offset_r5,
 offset_r6,
 offset_r7,
 offset_sc,
 Matrix_r2,
 Matrix_r3,
 Matrix_r4,
 Matrix_r5,
 Matrix_r6,
 Matrix_r7,
 Matrix_sc,
 Matrix_dr,
 Angle_xyz.
-l line, --line line

The matrix line (1-3). Default is 1.

-c column, --column column

The matrix column (1-3). Mandatory argument if -g option is not used.

-f yymmdd, --from yymmdd[vNN]

Initialization day and version. Day from which the the values to be propagated are red. If the version part is omitted the version given by the environment variable FGMVERSION is used unless overwritten by the -version. Deafault version is 03. Without the -from option, the values are red from the first day in the sequence unless the -Value option is given.

-V value, --Value value

The value to be assigned. Takes precedence over the -from option. Default value is read from the first file if neither -Value or -from options are given.

-g parameter_group, --group parameter_group

Specify a group of parameters to propagate. Valid values are:

 rNM  ->  -p offset_rM -c 1
          -p offset_rM -c 2
          -p offset_rM -c 3
 rNMP ->  rNM and rMP
 
 hhN  ->  -p Matrix_rN -l 3 -c 2
          -p Matrix_rN -l 3 -c 3
 angle -> -p Angle_xyz -c 1
          -p Angle_xyz -c 2
          -p Angle_xyz -c 3
 
 sco  ->   -p offset_sc -c 2
           -p offset_sc -c 3
 RN   ->  -p offset_rN -c 1
          -p offset_rN -c 2
          -p offset_rN -c 3
          -p Matrix_rN -l 1 -c 1
          -p Matrix_rN -l 1 -c 2
          -p Matrix_rN -l 1 -c 3
          -p Matrix_rN -l 2 -c 1
          -p Matrix_rN -l 2 -c 2
          -p Matrix_rN -l 2 -c 3
          -p Matrix_rN -l 3 -c 1
          -p Matrix_rN -l 3 -c 2
          -p Matrix_rN -l 3 -c 3

N,M,P can take values from 2 to 6 and must be consecutive.

-r range, --range range

If given, changes are propagated only from and to the given range. Otherwise all ranges are modified.

-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.

--log

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

-i, --idl

Change the fgmcal files to reflect the new cfgnew files. This option is enabled by default. To disable it, negate: --noidl.

-a, --ask

Ask for confirmation before proceeding to propagate the changes. This option is enabled by default. To disable it, negate: --noask.

-h, -?, --help

Prints a brief help message.


EXAMPLE

propagate sc 1 offset_sc, z value, from february 20 to 28:

modcalf.pl -s 1 -m 2 -b 20 -e 28 -p offset_sc -c 3

propagate the parameters corresponding to higher harmonic calibration for range 4 (Matrix_r4, line 3, columns 2 and 3) for spacecraft 3 from 21 june to the end of the month:

modcalf.pl -s 3 -m 6 -b 21 -g hh4


ENVIRONMENT

FGMROOT

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

FGMPATH

Path to calibration files (*.fgmcal and *.cfgnew). Default to $FGMROOT/data/dcalf/ if not set.


FILES

$FGMPATH - working directory

c$sc_$yy$mm$dd_hhmmr$rV01.cfgnew - daily calibration files

$FGMROOT/log/dailycal/dailycal_$yy$mm.log - Dailycal log file.

FGMROOT/cfg/cfgnew2fgmcal.lst - list of changed files. Used by cfgnew2fgmcal.pro to produce the corresponding fgmcal files.


DEPENDENCES

This script depends on the cfgnew2fgmcal.pro IDL script.


AUTHOR

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