Archive page | Spectrograph page | Data products page | SOPHIE server | OHP web site

Downloading and using the SOPHIE FITS files

The archived data products of the SOPHIE spectrograph can be downloaded in the FITS format. This is the usual format used for astronomical data.

Content of the FITS files

Different data-products can be downloaded in FITS. They are:

  • e2ds These are partly processed data, where the different orders were extracted from the origninal CCD frame and are packed in a 2D files whose Y-axis is the order number (there are 39 orders in SOPHIE data). Beside this array, the file contains two other arrays: IOne gives the wavelength for each of the pixels of the first array, and the second gives the blaze functions that describe how the response of the spectrograph changes along each order.
  • s1d These are the result of the resampling in wavelength of the e2ds data, and of the reconnection of all the orders in a single 1D spectrum. The wavelength of each pixel can be obtained from the World Coordinate System (WCS) of the FITS file.
  • ccf There are the results of corss-correlating the e2ds spectra with a mask. A given observation may have been cross-correlated with more than one mask, hence producing more than one ccf.

Depending on the observation template, the fiber B data may also be included in file. This is the case when fiber = 'SKY', or fiber = 'WAVE'. When fiber='SKY', the ccf of the B fiber is always computed using a G2 mask (beside the telluric emission, the sky spectrum contains diffracted Solar light).

A SOPHIE FITS file may therefore contain the following extensions:
extname description
E2DS_A e2ds spectrum for the main fiber(array 4077 x 39 pix)
WAVE_A Wavelengh of each pix of the e2ds spectrum
BLAZE_ABlaze functions of the e2ds spectrum
E2DS_B E2DS for the sky fiber (fiber B)
WAVE_B Wavelength for the E2DS fiber B
BLAZE_BBlaze for E2DS fiber B
S1D_A1D re-connected spectrum for fiber A
S1D_B1D re-connected spectrum for fiber B
CCF_<mask>_ACross-correlation function with <mask> for fiber A
CCF_<mask>_BCross-correlation function with <mask> for fiber B
CCFTABLE_A and CCFTABLE_BResults of the CCF fits for each order

Downloading series of FITS files: Use wget

Suppose you are interested in all the reconnected (s1d) spectra of HD028307 and want to download the FITS files to your disk. You can naturally go to the web interface with your favorite browser and download each spectrum one by one. But this can become tiresome.

An alternative is to run a script from your machine to download all the files, and we recommand the widely used wget program, probably available on your machine if it is running Linux.If it is not available, you may easily and freely install it, as it is a GNU open source utility.

The web interface of the archive offers the possiblity to obtain the list of wget commands that would download all the files for a selection of observations. To obtain this list, simply click on the proper link at the bottom of the result page. To download a single s1d file, the command looks like:
wget "[s1d,1045721]" -O 1045721_s1d.fits

You can download the list of wget command, or copy and paste it into a file, and you can execute it doing for example sh <file> (if you are using the sh shell)...

Advanced usages

To encapsulate the the access to the archive in a script or in an application program, you need to understand some of the parameters of the URL. Those which may be the most interesting to play with are:

  • c= c=o is for a request to a table, c=i is for a FITS pipeline
  • a= a=t produce plain text output (no HTML tags), a=html and htab are HTML layouts.
  • d= List of the fields to display. The list of wget commands discussed above is generated by setting a proper d parameter.
  • other...o= gives the list of astronomical objects to query, p= a celestial position, f= a field, sql= an sql 'where' statement that restrinct the selection, ob= an 'order by' clause...

Downloading a FITS file (c=i), consists in (i) injecting the data in a pipeline, (ii) processing this file along the pipeline and (iii) streaming the FITS flow to the htpp answer. The injection command has the form: o=sophie:[s1d,1045721], where the first argument in the square brackets is the 'dataproduct' (s1d, e2ds or ccf), and the second is 'seq', the unique sequence number of the SOPHIE spectra. For ccf there is a third parameter which is the name of the cross-correlation mask, for example: o=sophie:[ccf,1045801,K5].

The FITS processing pipeline is described by the z= parameter. You can find the various commands and the syntax by observing the URL created when you edit a pipeline using the 'customize' link. For example:
z=ext[c,w4800,n1,w4900,n1] cut-out the region between 4800 and 4900 Angstrom.
z=ext[c,w4800,n1,w4900,n1]|vsg[,50,] cut-out this region and then convolve with a Gaussian to a velocity broadening of 50 km/s.
Such pipeline actions may be inserted in the download command...

Last updated on : 28.02.2014