Institut für Astronomie und AstrophysikAbteilung AstronomieSand 1, D-72076 Tübingen, Germany |
fits_binarycor
Apply binary correction to time columns and time keywords of a fits file
light curves, event files, FITS
fits_binarycor, infile, outfile, asini=asini, porb=porb, $ eccentricity=ecc, omega=omega_d, t90=t90, t0=t0, $ pporb=pporb, limit=limit, maxiter=maxiter, $ columnlist=columnlist, keywordlist=keywordlist, $ extensionlist=extensionlist, /silent, $ maxsize=maxsize
INFILE : Name of the lightcurve/eventfile to be read OUTFILE: Name of the new lightcurve/eventfile to be written asini, porb, ecc, omega_d, t90, t0, pporb, limit, maxiter: Parameters that will be passed to routine 'binarycor' to perform the binary star time correction (see description of 'binarycor')
columnlist : Array containing the names of the columns which will be corrected (default: ['TIME', 'START', 'STOP']) keywordlist : Array conzaining the names of header keywords which will be corrected (default: ['TSTART', 'TSTOP']) extensionlist: Array containing the names of the extensions which will be corrected (default: all fits extensions) /silent : will stop any printed output maxsize : maximum size of time array used for call to routine 'binarycor' (default: 2L^20). In case of memory allocation errors this value will be reduced by a factor of 2 (until a value of 1024 is reached).
none
none
It is assumed, that the time keywords to be changed are given in the same time units as the time columns. Runs out of memory for very large fits files (>~ 1 GB). In those cases try to split light curves or event files into smaller ones. Problems are caused by MRDFITS and MWRFITS which produce and need large data structures.
This routine reads the given fits file and applies a binary star correction to those columns of a binary table which are called by default 'TIME', 'START' or 'STOP'. If the unit for these column is 's', a conversion to days is done. Also, if in the table header the keywords 'MJDREFI' and 'MJDREFF' or only 'MJDREF' are found, a conversion to MJD is done. Note that the parameters t0 or t90 have to be in same time reference system (MJD resp. JD)! The orbital parameters are passed without any change to the routine 'binarycor'! After correction of the time columns the corresponding header time keywords are also corrected (by default 'TSTART' and 'TSTOP'). It is assumed, that these keywords are given in the same time reference system as the time columns. The header keyword 'TIMEREF' is set to 'BINARYCORRECTED'. The orbit parameters used for correction are written as keywords into the header. The time values are converted back into the original units before the new fits file is written. A STOP is executed in case of a memory allocation error (if maxsize has reached a value of less than 1024).
An existing outfile will be overwritten! ======================================== Send bug reports or comments to: barnstedt@astro.uni-tuebingen.de
infile='lightcurve.fits' outfile='lightcurve_corrected.fits' fits_binarycor, infile, outfile, asini=asini, porb=porb, $ eccentricity=ecc, omega=omega_d, t90=t90, $ pporb=pporb, limit=limit, maxiter=maxiter, $ columnlist=['START','STOP'], $ extensionlist=['GTI'], $ keywordlist=['TSTART', 'TSTOP'], $ /silent
$Log: fits_binarycor.pro,v $ Revision 1.5 2006/04/13 06:33:13 barnsted bug fix: division by zero in case of only one entry Revision 1.4 2006/04/11 13:20:19 barnsted improved handling of very large files Revision 1.3 2006/04/04 12:47:07 barnsted handles now also empty HDUs Revision 1.2 2006/04/04 11:37:04 barnsted fixed some typos Revision 1.1 2006/04/04 11:33:32 barnsted Initial release (Juergen Barnstedt)
[Home Page] [Software, Documentation] [IDL Documentation] [Quick Reference] [Feedback]