DOPCAL(1)



NAME

     mdical


SYNOPSIS

     mdical [-v]
          in={datacollection}
          out={datacollection}
          mdical={doppler calibration dataset}
          cal_ord={0-5} (0)
          mul= (1.0)
          add= (0.0)
          [badpixel={MDI bad pixel dataset}
          OBS_PROG={observation type, DYNAMICS, STRUCTURE, CAMPAIGN, ...}
          OBS_MODE={MDI mode, FD_OBS, HR_OBS, FD_CAL, HR_CAL, STRUCT}
          OBS_SEQ={MDI observing sequence: VEL_XXX}
          OBS_QUANT=VELOCITY]


DESCRIPTION

     MDI level_1 calibrations are  done  by  the  general-purpose
     mdical  program.   This  program deals with dynamics, struc-
     ture, and campaign program observations.  It also  can  deal
     with  both  low- and high-resolution data.  The OBS_XXX key-
     words can come from either the argument list or the overview
     file.

     mdical writes SOI conforming datasets  of  either  TS_EQ  or
     TS_BLOCKED types, matching the input datasets.

     The calibration consists of  a  correction  to  the  initial
     calibration  done on MDI prior to telemetry.  The correction
     is computed using a polynomial  in  the  level-0  quantities
     with coefficients for each pixel coming from the input "mdi-
     cal" dataset(s).

     The input "mdical" dataset(s) must be of the  same  observa-
     tion  type  as the input data.  Only one observation type of
     data may be present in the set of datasets in the "in"  data
     collection for any one call of the program.

     The "mdical" dataset may be  multivariate  with  the  coefi-
     cients  stored  in  the different variables: v0, v1, v2, v3,
     etc.  The calibration is:

         Calibrated_value = v0 + v1*V + v2*V^2 + v3*V^3 + ...

     where V is the input value, optionally prescaled by the con-
     stant  terms  "add" and "mul" (V = "add" + "mul"*V_in.  Only
     terms up through "cal_ord" are used.  If  "mdical"  datasets
     are  not supplied (or missing), default values of 0.0 every-
     where are used, except for v1, which defaults to 1.0  every-
     where.

     [When the  matching  bad  pixel  map,  from  the  "badpixel"
     dataset is zero, the output value is replaced with the miss-
     ing data flag, a NaN if the output dataset is floating  type
     data.   The  "mdical" dataset must have the same OBS_MODE as
     the input datasets.]

     [In the case of extracted region datasets, e.g.  VEL_2_X_nnn
     sequences,  the rectangular extraction box must be specified
     with the XXXXX keywords.]

     [In the case of VEL_BIN_nnn  which  are,  for  example,  the
     medium-l  binned  data  in  the  structure  program, the nnn
     refers to the binset and should be the same as  the  dataset
     series series_number for the calib data.]

     [In the case of OBS_MODE=STRUCT, the badpixel  map  must  be
     the same one that was used on-board.]


FILES

     calibration datasets
     MDI bad_pixel datasets


KEYWORDS

     CONFORMS must be TS_EQ or TS_BLOCKED
     OBS_PROG may be STRUCTURE, DYNAMICS, or CAMPAIGN
     OBS_MODE may be STRUCT, FD_OBS or HR_OBS
     OBS_SEQ  may be VEL_1, VEL_2, VEL_4, VEL_BIN_nnn, VEL_LOI, VEL_2_X_nnn, ...
     OBSQUANT must be VELOCITY


SEE ALSO


DIAGNOSTICS


BUGS

     The badpixel, OBS_PROG, OBS_MODE, OBS-SEQ, & OBS_QUANT argu-
     ments are not implemented.