spacer link to MAST page spacer logo image spacer
 
link to STScI page


Analysis of Individual Copernicus Scans of a Star

One the useful aspects of the Copernicus archive is that it can be used in searches for spectral variability of bright stars. Using gamma Cas as an example, let's say we want to check the results of <Slettebak and Snow (1978)> who reported the amazing development of emission in the UV resonance lines of Si IV and Mg II in just a few minutes. The feature was not present in the first spectral line Copernicus scanned, yet it was found to develop over the time it took the scan to reach the second (bluer) line in each doublet. Do we believe this? To check out this claim, we can access and compare individual Copernicus scans from the original study.

This can be done in a variety ways, either interactively on Copernicus Web pages, or using the IDL-based FITS readers mrdfits or ifitsrd (IRAF/STSDAS tasks do not yet read most Copernicus FITS files because these files generally contain variable array lengths. The IDL-based routine fxbread also works, but only on one file row (scan) per read. It is impractical to use it for reading many rows). It is usually convenient to determine first the scan numbers needed, e.g. by inputting the observing times into the Copernicus search page.

One should recall that Copernicus scans are stored in 5- or 6-row groups. This is because Copernicus observations were made with simultaneous U1 (U2, U3) and V1 (V2, V3) tubes. U3 and/or V3 were used to monitor particle backgrounds empirically. An alternate tube (e.g. U2 for U1, V2 for V1, or vice versa) was employed to shield the tube used for data collection from scattered light. Data for each of these tubes was recorded as a separate binary row (scan). Additionally, the tback field in each data scan is a modeled radiation background spectrum. This background can be subtracted from the tcounts array to produce a "net" spectrum.



Step 1: get object number and the scan numbers

The first step is to determine the object number of interest. A single FITS file for the object contains all the observations done by Copernicus. This file contains a 3-digit number corresponding to the object name for the mission. (This number is given by the star_num field.) To do this, go to the <complete target list> page. For gamma Cas, one finds the filename c084.pep, so the object number is 084.

Next one should determine the range of scan numbers. This can be best learned from the search Web page under "Co-added Scans" by putting in the starname, wavelength limits, and rage of observation dates. For our present query, enter "gamma Cas," "1380," "1415," and "27 Jan 1977 .. 29 Jan 1977), respectively, and run the search. One record is returned with the scan range 1974--2273. We may now download the software and work on it with our favorite IDL-based FITS reader.



Step 2: get the times

The REC_* keywords indicate only the time for a reference position in that Copernicus orbit during which observations were made, not the exact observation time (the difference between these times may be up to one orbital period of about 96 minutes). A conveninent way of getting the correct time of observation is to download the program coptime from the ftp area ) (<ftp://archive.stsci.edu/pub/copernicus>) and use it for the scan(s) of interest to determine these times. This is shown for scans 1974-2273 as follows:

i  = indgen(300) +1974
coptime,'c084.pep',i

The output provides a listing of start and end times which are accurate to about 1s.



Step 3: read the file in your IDL session

Here are three examples of reading in scans 1974-2273 in mrdfits or ifitsrd. Of the two routines, mrdfits reads in multiple file rows much faster, but ifitsrd permits an alternative to IDL structures and working with selected data fields. (For a primer on IDL structures, click <here.>)

Example 1, with mrdfits (structure only):

p  = mrdfits('c084.pep',1,h,range=[1973,2272])

(Note the 0-based indexing.)


Example 2, with ifitsrd (structure option)

i  = indgen(300) + 1974
ifitsrd,'c084.pep',i,h,e,p,/struc,/sil,/nvla

The array i contains the indices corresponding to the 300 scans of potential interest. The array h contains keywords unique to the object gamma Cas and is the header of the primary array record (which contains only this header, no data). The parameter e is the keyword header for each of the 40 data fields and includes the field name for each. The parameter p is the data structure containing the observations. The IDL keyword /struc specifies the data are to be packed into an IDL structure, while /sil suppresses a summary of the data contents to the screen. In this case, /nvla is critical for Copernicus files because it suppresses an optional keyword array which would attempt to report the number of elements in the variable length arrays. For Copernicus data this value, the number of wavelength points scanned, often varies from observation to observation. If /nvla is not specified, the run of ifitsrd will abort if the number of array elements in successive scans differs from the first scan read.

An alternative way of examining the data structure contents is to type:

help,/struct,a

By either printing out of the keywords in the string array e or by this "help" command one obtains the field-name convention needed to work with data fields.


Example 3, with ifitsrd (selected fields option):

Let's suppose we want work with the following fields: rec_num, tube_name, nnn (array length), yr_obs, day_obs, hr_obs, min_obs, tlambda (wavelength array), tcounts (raw counts), tback (background). These are, respectively field numbers 3, 14, 15, 16, 17, 18, 19, 36, 37, 39), which we will designate as variables with the letter f. In the call to ifitsrd, we use the keyword efld to list these field numbers corresponding to the extracted data fields, as follows:

i   = indgen(300) + 1974
ifitsrd,'c084.pep',h,ex,i,f3,f14,f16,f17,f18,f19,f36,f37,f38, $
  efld=[3,14,16,17,18,19,36,37,38],/sil



Step 4: Work with the data

At this point it's a good idea to check on the wavelength direction of the scan, e.g. by printing out the first and last wavelength element. These elements are numbered in the sense they were observed, with the first element (either shortest or longest wavelength) being the one first recorded in time.

From coptime and the Slettebak and Snow paper, we find that the observations of interest are scans 2144 (Si IV doublet) and 2145 (Mg II) doublet. These are monitored by the U2 and V2 tubes, respectively. We may compare these, for example, to the immediately preceding observations, 2139 and 2140, by printing or plotting them out. Note here that all arrays are padded to 176 elements (except for arrays already containing 176 scanned elements). Thus, generally we must first determine the number of actual (nonzero) data points; for these two pairs of observations these array lengths are 148, 176, respectively. Finally, we plot out the arrays of interest. For example:

plot,a(170).tlambda(0:147),a(170).tcounts(0:147) - a(170).tback(0:147)
oplot,a(165).tlambda(0:147),a(165).tcounts(0:147) - a(165).tback(0:147), linesty=2

and so forth.

Do you see the published variations?