doppinfo

This class computes Doppler shift information for each imset of a dataset. Keywords will be read from the science file and from the support file. The Doppler shift information is printed to the standard output by default, but this can be turned off by setting quiet to True. Three task parameters will be updated by doppinfo; these allow the user to compute the Doppler shift in high-res pixels or km/s at any time close to the time of the exposure.

The printed information will be in one of two formats, depending on the value of increment. If increment is zero, the average and extreme values of the Doppler shift during the exposure will be printed. If increment is greater than zero, the actual Doppler shift and radial velocity will be printed at the beginning of the exposure and at every increment seconds thereafter until the end of the exposure. Both the printed value of the Doppler shift and the doppmag parameter will be in high-res pixels.

Most of the Doppler shift information is computed directly from the orbital elements of HST, as given in the support file primary header. Some information, however, is computed based on the approximation of a circular orbit. This approximation is used for the average Doppler shift during the exposure (printed if increment is zero) and for the task parameters doppzero, doppmag and radvel that are updated by doppinfo. These parameters are applied as terms in a sine function, which inherently involves a circular-orbit approximation.

The parameters for the circular orbit are determined as follows. The HST orbital elements are gotten from the primary header of the support file. The target position is taken from the keywords RA_TARG and DEC_TARG in the science file primary header. The velocity of HST is computed from the orbital elements at 64 equally spaced times throughout an orbit, centered on the midpoint of the exposure, (EXPSTART + EXPEND) / 2, and the component of this velocity in the direction away from the target (i.e. the radial velocity) is taken. A sine function is fit to these radial velocities; the amplitude is radvel, and the amplitude and phase are used to compute doppmag and doppzero.

Examples

Doppinfo with dt of 100:

>>> import stistools
>>> stistools.doppinfo.Doppinfo("ocb6o2020_raw.fits", dt=100, spt="ocb6o2020_spt.fits")
# orbitper  doppzero      doppmag      doppmag_v    file
  5728.67  56752.114170  11.68643135   7.40391177   ocb6o2020_raw.fits[sci,1]
# time (MJD)   shift   radvel
56752.165175  -11.59   -7.345
56752.166333  -11.37   -7.203
56752.167490  -11.01   -6.975
56752.168647  -10.52   -6.663
56752.169805   -9.90   -6.272
56752.170962   -9.16   -5.805
56752.172120   -8.32   -5.269
56752.173277   -7.37   -4.669
56752.174434   -6.34   -4.014
56752.175592   -5.23   -3.311
56752.176749   -4.05   -2.568
56752.177907   -2.83   -1.794
56752.179064   -1.58   -0.998
56752.180222   -0.30   -0.190
# orbitper  doppzero      doppmag      doppmag_v    file
  5728.67  56752.180505  11.68734454   7.40449032   ocb6o2020_raw.fits[sci,2]
# time (MJD)   shift   radvel
56752.181784    1.42    0.902
56752.182941    2.68    1.700
56752.184099    3.91    2.477
56752.185256    5.09    3.225
56752.186413    6.21    3.935
56752.187571    7.26    4.598
56752.188728    8.22    5.205
56752.189886    9.08    5.750
56752.191043    9.83    6.227
56752.192200   10.46    6.628
56752.193358   10.97    6.950
56752.194515   11.35    7.189
56752.195673   11.59    7.342
56752.196830   11.69    7.406
class stistools.doppinfo.Doppinfo(input, spt=None, dt=0.0, update=False, quiet=False)

Compute Doppler parameters and information from HST orbital elements. This class previously supported both COS and STIS data, but now only supports STIS data. The class will print doppler shift information for all imsets contained in the input image.

Results will be printed to standard out. To have the DOPPZERO, DOPPMAG, and DOPPPMAGV keywords inserted/updated in the header you can set update to True.

Methods

printDopplerShift(dt)

Compute and print the Doppler shift at intervals of dt.

printDopplerShift(dt)

Compute and print the Doppler shift at intervals of dt.

Parameters:
dt: float

Time interval (seconds) for printing Doppler shift throughout the orbit, or if dt is zero print the min and max Doppler shift during the orbit.