Do infostis and catfits on the files to check the contents. The primary task, INTTAG, that STIS team members are using with time-tag data is available in iraf.stsdas.hst_calib.stis. For barycentric time corrections apply the task ODELAYTIME (available in iraf.hst_calib.stis) to _tag.fits files (it overwrites the file). In running ODELAYTIME you will need HST ephemeris data that is available via the STARVIEW interface to the HST Archive. unsetenv LD_LIBRARY_PATH /soft/APT/APT150/runStarView From the StarView startup screen choose the Searches menu, choose HST, and choose Data File On the Data Files pane, click on the button labelled "Static." It will change to Edit. As for searching for the ephemeris files, a range of dates in the Start Time field, and ORB as the class: 03/25/1999..04/04/1999 'Begin' the search with only those constraints. Then page through the matches that starview returns until you find the one that has a start date of less than two days prior to your observation. If there are no others with start times closer to your observation then you have found the one to retrieve. Once you have marked the data you want for retrieval and are on the retrieval options page, you will need to specify which extensions using the "Show Override" option. For ORB data, these extensions are ASC, FIT POD, ORX. For data after April 2000 you can use the *.fit file directly in ODELAYTIME. For data before April 2000 the *.orx file which must be processed by the HSTEPHEM task befor use in ODELAYTIME. You'll want to read the help files for ODELAYTIME and then HSTEPHEM. HSTEPHEM will produce a .tab file (which can be viewed with tdump). To Access IRAF: go into /home/saku/iraf setenv LD_LIBRARY_PATH /opt/SUNWspro/lib setiraf mkiraf use VT100 for term type cl It is important to feed odelaytime a spacecraft ephemeris that covers the full exposure time of the given dataset. After you have converted each .orx file to an iraf table with hstephem, you will be able to confirm the start and stop times of that file to see if they apply to a given dataset. If none of your datasets go past 2400 UT for a given day, then I think that you won't have to do any concatenation. If one or more does go past midnite into the next day AND that next day's ephemeris is in a _new_ orx.tab then you will need to tmerge the two relevant orx.tab files. I think that the syntax is tmerge last.tab first.tab opt=append The times are given in the TIME column, and they are relative to the FIRSTMJD table header keyword. If you run tlcol on the table with nlist=4, you will see the column names and units (plus other info). Since the obs_ephem tables (ORB tables) typically cover a range of a few days, it should be clear what the units of the TIME column are, but it's good to check by using tlcol. Here is an example for getting the range of MJD for your pm180000r.fit: # check the units of the TIME column st> tlcol pm180000r.fit # get the value of the FIRSTMJD table header keyword st> catfits pm180000r.fit long+ | match FIRSTMJD or st> thedit pm180000r.fit firstmjd . # get the range of times covered by the table, relative to firstmjd st> tstat pm180000r.fit time tstat will show the minimum and maximum values of the TIME column. They could be 0 and 259200., for example, if the table covers a range of three days and the units are seconds. The table would then cover the range of dates from firstmjd to firstmjd+3. The only complication that may need fixing is that there are two keywords in the header of the orx.tab (produced by hstephem) that contain start and stop mjd for the given table. I don't know if odelaytime cares about the values there or note. Perhaps when you merge two tables, you will need to use 'tupar' and correct the appropriate keyword value. (This segment is not tested since I never had to append the orx.tab files). ODELAYTIME has a default path and filename in the parameter, earth_emphem that may need some editing. Our local version shows the value in that field as stsdas$data/scidata/de200 At a minimum you will probably need to add .fits to the de200 filename. And possibly your local installation may have the file in stsdas$data/fits/. You should dir stsdas$data/ and confirm where de200.fits is kept. at SAO use: earth_ep= stsdas$data/fits/de200.fits table name of earth's state vectors Image Reduction and Analysis Facility PACKAGE = stis TASK = odelaytime input = o4v403030_tag.fits Input table template name earth_ep= stsdas$data/fits/de200.fits table name of earth's state vectors obs_ephe= pijul10.tab table name of observer's state vectors distance= 5500 distance of the target dist_uni= pc unit of distance (in_col = TIME) input time column name (out_col= HTIME) output (corrected) time column name (mode = al) After applying the barycentric correctins as above you can follow two paths. For timing and period analysis convert the _tag.fits files to qp files and use PROS. To separate the _tag.fits files (which are one per HST orbit) into smaller time intervals use inttag and calstis. PACKAGE = stis TASK = inttag input = o4v405010_tag.fits File containing TIMETAG event stream output = int5010_tag Name of output file (startti= INDEF) Starting time (in seconds) (increme= 247.) Time increment (in seconds) (rcount = 9) Number of time intervals (highres= no) highres output? (alleven= no) include all events in input? (verbose= yes) Print verbose messages? (Version= 7Nov1997) Date of Installation (mode = al) This will convert the data from o4v405010_tag.fits which is 2227 seconds long into 9 files that are 247 secs each. They all appear in 5010_int.fits as different events. ----------- Calstis looks in the headers of the raw data for the names and locations of the calibration reference files it needs to calibrate the data. You will need to retrieve the correct reference files for your data from the HST archive. When you retrieve your raw data, on the last screen of the retrieval process, you have the option to get the used or best reference files for that observation. In your raw data header, you'll need to define a directory called oref and put all the reference files there. Since CALSTIS and all of its modules do not access IRAF environment variables. before invoking the cl, you will need to define an environment variable from the host command line (see below) that is appropriate to your host machine. For Unix systems, the appropriate command is: % setenv oref /data/saku/herx1.hstjul99.ref.dir/ (The final / is an absolute must!) Then start IRAF. See chapter 21 of the STIS Data Handbook, starting with page 30, for more detailed explanations on how to do these steps. http://www.stsci.edu/documents/data-handbook.html The task 'chcalpar' is what you'll need to use to change the headers. You can specify one file or a list of file to change, if they will all be the same. We need *_int_tag.fits and *_wav.fits. st> lpar chcalpar images = "int3010_tag.fits,o4v403010_wav.fits" List of images to modify (template = "") Image to read header from (keywords = "") Pset to use if not reading from an image (add = yes) Add keywords if not present in header? (verbose = yes) Print out files as they are modified? (Version = "21Jul97") Date of Installation (mode = "al") Then run CALSTIS st> lpar calstis input = "int3010_tag.fits" Input STIS _raw FITS files (wavecal = "o4v403010_wav.fits") Input raw wavecal image files (outroot = "3010_int") Root for output file names (savetmp = no) Save temporary files? (verbose = no) Print verbose time stamps? (Version = "26Oct1998") calstis version (mode = "al") To convert *_x1d.fits files from CALSTIS into ascii files: keiko-49: idl IDL> .compile combstis IDL> .compile mrdtable IDL> .compile readidl % Compiled module: READIDL. combstis,'5010_int_x1d.fits','ROOT',5,psmooth=7,pfile=' ' Above generates both ROOT_asc and ROOT_idl files. For conversion of the _tag.fits files to qp files for using PROS timing analysis. Need IRAF packages XRAY, XDATAIO, and XTIMING. First need to adjust mispelled and missing keywords: cl> tupar o4v403010_tag.fits[1] inplace=yes :pi talen2 2048 :pi talen3 2048 :e (At one point we had to do (under tupar) :k tctype2 tctyp2 :k tctype3 tctyp3 But this seems to be no longer necessary since tctype2 and tctype3 are not found?) The major caveat seems to be that if a given time-tag dataset has more than 1 EVENTS table, i.e. the exposure lasted long enough to require more than one buffer dump from the instrument, that fits2qp only converts the first one. To correct for this you have to merge all events files into one (you want tmerge.option = "append"): cl> imcopy xxx_tag.fits[0] m.fits cl> tmerge xxx_tag.fits[1],xxx_tag.fits[2] m.fits cl> tcopy xxx_tag.fits[gti] m.fits (This takes forever!!) Adjust the fits2qp par file as follows: fits2qp.key_x="axis1" fits2qp.key_y="axis2" After running fits2qp, run timsort, and then period I R A F Image Reduction and Analysis Facility PACKAGE = xtiming TASK = timsort image = m5020qp.qp input qpoe file name soutfile= timor5020 Output time-ordered file name sregion = source region descriptor boutfile= NONE Output time-ordered bkgd file name bregion = background region descriptor (exp = NONE) exposure mask (ethresh= 0.) min. percent of exp time for inclusion (esize = ) QPOE event size (clobber= no) OK to delete existing output file? (display= 0) 0=no disp, 1=header (ssize = 1000000) max number of events per sort (qpi = yes) prompt for qp internals? (psize = 4096) page size for qpoe file (bsize = 8192) bucket length of qpoe file (debug = 0) qpoe debug level (mode = ql) xt> timsort input qpoe file name (m5020qp.qp): Output time-ordered file name (timor): source region descriptor: Output time-ordered bkgd file name (NONE): starting source creation - timor5020_sti.qp xt> I R A F Image Reduction and Analysis Facility PACKAGE = xtiming TASK = period source_f= timor5020_sti.qp Input Source Timing File backgrou= NONE Input Background Timing File out_tabl= per5020 Root name for output files [root_fld.tab, root_c period_s= 1.237 Period start period_s= 1.238 Period stop incr = 3.0000000000000E-4 Increment (0 for auto increment) (pdot = 0.) Pdot (search_= 0.33) Search Density (chisq_t= 0.) Chisq threshold bins = 10 Number of Bins (save_tw= yes) Save Fold Twice (display= 1) Display Level (clobber= no) Clobber (get_gin= yes) get good intvs from qpoe (bk_norm= 1.) Bkgd normalization factor (mode = ql) xt> period Input Source Timing File (timor5020_sti.qp): Input Background Timing File (NONE): Root name for output files [root_fld.tab, root_chi.tab] (per5020): Period start (1.237): Period stop (1.238): Increment (0 for auto increment) (3.0000000000000E-4): Number of Bins (10): Creating Fold file : per5020_fld.tab Creating Chisq file : per5020_chi.tab you can plot these using xt> fldplot per5020_fld.tab xt> chiplot per5020_chi.tab