SET_ORIENTATION_KEYWORDS(3)
NAME
append_MDI_data_comment, set_DPC_keywords,
set_ephemeris_keywords, set_imgscale_keywords,
set_orientation_keywords - functions for setting essential
ancillary information into MDI data files.
Syntax
#include <MDI.h>
void append_MDI_data_comment (img)
void set_DPC_keywords (img, dpc)
int set_ephemeris_keywords (img, t, tmod)
int set_imgscale_keywords (img, t, code, obsdist)
int set_orientation_keywords (img, t, dpc, offset, xc, yc, tmod)
SDS *img;
struct DPC dpc;
TIME t, *tmod;
double obsdist, xc, yc;
unsigned int code, offset;
DESCRIPTION
These functions all add certain standard calibrating key-
words or other information to MDI data images or records,
based on observing time and certain other required confi-
guration information.
append_MDI_data_comment merely adds certain comment lines to
the FITS files containing the data. These comments give the
source of the data and a URL for additional information on
data rights, keyword definitions, data quality, etc. It is
a good idea to call it in any module producing export MDI
data that does not copy over the comments from its input
data. It is run from mdical, and the comments are automati-
cally preserved at least through level 1.5.
set_DPC_keywords sets the keywords: DPC_OBSR, DPC_FORM,
DPC_CROP, DPC_LIM0, DPC_LIM1, DPC_ORGN, DPC_RATE, DPC_SMPL,
DPC_VERS, DPC_CONF, BUNIT, DATASIGN, and INTERVAL, based on
the struct corresponding to a particular MDI data product
code.
set_ephemeris_keywords sets the keywords: OBS_DIST, OBS_B0,
OBS_L0, OBS_VR, OBS_VN, OBS_VW, R_SUN, and R_SOLAR, based on
the observation time t and (for R_SUN and R_SOLAR) the image
scale. The appropriate image scale keywords are expected to
already be in the data; if they are not found, the last two
keywords are not set.
set_imgscale_keywords sets the keywords: FD_SCALE, HR_MAG,
S_MAJOR, S_MINOR, S_ANGLE, MAGNIFY, IM_SCALE, X_OPAXIS,
Y_OPAXIS, PLATE_X, PLATE_Y, X_SCALE, Y_SCALE, XSCALE, and
YSCALE, based on the observation time, the MDI data product
code, and the SOHO-sun distance in AU. If appropriate key-
words for any of the arguments are in the data header (DPC
and either T_OBS or T_REF are all that are really necessary)
the corresponding argument values can be set to 0. If they
are non-zero they will over-ride the corresponding keyword
values in the data. The full-disc mode plate scale is table
driven, based on observing time and a polynomial fit in
observing distance. A fixed nominal value is supplied if
the requested observing time is outside the range of the
table, which begins at 1995.12.21_12:00 UT. This value can
thus be forced by specifying an argument time value before
the beginning of the table (but greater than 0!) (As usual,
time is assumed specified in seconds since the internal SOI
epoch of 1977.01.01.) The other non-nominal values are
either DPC-driven or derived.
set_orientation_keywords sets the keywords: X_OFFSET,
Y_OFFSET, MDI_X0, MDI_Y0, X0, Y0, XCEN, YCEN, SOLAR_P,
SOLAR_P0, and P_ANGLE, based on the observation time, the
DPC struct, a binary code representing the subraster offset
for certain data products, and optional override values for
xc and/or yc (corresponding to MDI_X0 and MDI_Y0 respec-
tively). If these values are not specified, values will be
supplied from either the smoothed or the raw pointing
tables, or a nominal value, as available, in order of
preference. To use the best available tabulated or nominal
values, xc (and/or yc) must be set equal to -32768.0. As
with set_ephemeris_keywords, appropriate image scale key-
words are expected to already be in the data; but if they
are not found they will be determined based on the observing
time and DPC. The offset code is only needed for sub-raster
type data products.
DIAGNOSTICS
set_imgscale_keywords returns the value returned by a call
to MDI_plate_scale_adjustment(). set_ephemeris_keywords
returns the value returned by a call to soho_ephemeris().
set_orientation_keywords always returns 0.
BUGS
The functions described here put extra explanatory and
status information in the comment field of the relevant FITS
header card images; this information is not propagated when
the data are read and rewritten by most modules, however,
due to a conceptual limitation (flaw) in the vds library
approach to data record management.
The ellipse and high-resolution field magnification values
supplied by set_imgscale_keywords are purely nominal. So
too are the position- angle values supplied by
set_orientation_keywords.
Unlike set_imgscale_keywords, set_orientation_keywords
requires that the DPC and offset arguments be supplied; the
function will not search for them in the data if necessary.
Despite the names, these are highly MDI-specific functions.
FILES
~CM/tables/calib/geom/scale_corrections
~CM/tables/ephemeris/mdi_pointing.raw
~CM/tables/ephemeris/mdi_pointing.smooth
~CM/tables/ephemeris/eof/mdi_pointing.raw
~CM/tables/ephemeris/mdi_roll.raw
~CM/tables/ephemeris/summary
~CM/lib/libMDI.a
~CM/lib/libastro.a
SEE ALSO
MDI_plate_scale_adjustment(3), mdi_DPC_decode(3),
mdi_point(3), mdi_roll(3), soho_ephemeris(3)
AUTHOR
Rick Bogart
HISTORY
2001-02-27 SOI Version 4.8