[AIT logo]

Institut für Astronomie und Astrophysik

Abteilung Astronomie

Sand 1, D-72076 Tübingen, Germany
[Uni logo]


readorbit Source code in readorbit.pro

readorbit

Name
                   readorbit
Purpose
                   Read mission orbit file and compute ephemerides for
                   given times.
Category
                   barycenter correction, fits
Calling Sequence
                   orbit = readorbit(filename, date,exten=exten, reftime=reftime)
Input Parameters
                   filename - The orbit file name. An orbit fits file must
                              contain the following
                              - TSTART, TSTOP
                              - TIMEDEL or DELTAT
                              - MJDREFI, MJDREFF - reference times in
                                                    MJD
                              - The columns X, Y, Z and VX, VY, VZ of
                                the spacecraft in FK5 coordinates in
                                respect of the geo center, values
                                given in m and m/sec.
                              It is possible to enter more than orbit
                              file by setting file name as an array
                              of strings. If the date is not covered
                              by the orbit files an error message is
                              raised.
                  date      - a list of dates for which the orbit
                              should be computed. The date must be
                              given in modified julian date [MJD]
                              (= JD - 2400000.5).
Optional Input Parameters
                  exten     - The extension to use in the orbit
                              file. Default is 1.
                  reftime   - Reference time to be assumed for start
                              time (MJD). Default is the reference
                              time from input fits file (keywords:
                              MJDREFI+MJDREFF+TIMEZERO). This input
                              may be used if no such keywords exist
                              in the fits file (as in reconstructed
                              orbit case for XMM).
Keyword Parameters

Output Parameters
                  READORBIT returns a 2-dim array containing the
                  spacecraft positions for each date input. The
                  position is given in kilometer (!) within the FK5
                  reference frame.
                  Each point maps to the input date given in Modified
                  Julian Date [MJD].
Optional Output

Side Effects
                   None.
Restrictions
                   This procedure needs a lot of memory because we
                   read all orbit information before starting any
                   processing.
                   But: in case of several orbit files only the
                   matching part will be read.
Procedure
                   This function may be used to compute the orbit
                   input for the barycen command.
                   The function first reads the entries of an orbit
                   file, checks the range, looks for appropriate
                   intervals for each date and interpolates the
                   position.
                   If several orbit files are used all covered part
                   of the data will be interpolated and afterwards
                   checked wether all data points are covered.
Example
                   Typical lightcurve processing would look like:
                    > readlc, time,rate,"test.lc", /mjd
                    > orbit = readorbit("xte_orbit",$ ; read orbit
                                        time)         ; in km (!)
                    > time_bary = $
                       barycen(time,ra,dec,orbit=orbit)
                    -> perform bary center correction with given
                       orbit file.
Revision History
                   $Log: readorbit.pro,v $
                   Revision 1.4  2003/12/29 13:00:28  goehler
                   added external setting of reference time
                   Revision 1.3  2003/07/09 08:35:30  goehler
                   Major change: - date input now MJD instead RJD
                                 - return value now in kilometer instead meter
                   Revision 1.2  2003/04/29 09:34:09  goehler
                   updated missleading description concerning the example using m/km units
                   Revision 1.1  2002/09/17 12:38:33  goehler
                   Initial but tested version (in conjunction with barycen)

Last modified by pro2html on 2005 January 04 at 16:34 UTC

[Home Page] [Software, Documentation] [IDL Documentation] [Quick Reference] [Feedback]

Jörn Wilms (wilms@astro.uni-tuebingen.de)
Updated automatically