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

More advanced ways to access the SOPHIE archive

The user interface of the SOPHIE archive has been designed to be used either from a web browser or by a program. This latter feature, a fundamental principle of the Virtual Observatory, allows web-based services to transparently access the archive.

Accessing the catalogue of observations

Suppose one is interested in the star HD 28307. The request below will return an ASCII-formatted page with a list of all spectra available in the archive for this star.,seq&c=o&o=HD028307

The parameters listed are : J2000 position, seq, date, fiber, dprtype, exptime and sn26 (see the parameter description or substitute a=htab for a=t in the command line to get the list in full HTML format). Although this plain-text format is the only machine-oriented format now available for the catalogue, we may provide a tab-separated format (tsv) or VO_table format in the future.

To download the content of an URL on a user's computer, it is very natural to use a browser, such as Firefox, but this is not the only solution. In practice, a browser is only one of the clients that may be used to access the Web. Other common clients are the so-called "crawlers" which can recursively download files from the web. A common one is wget, present on most recent Linux distributions (but several alternatives exist). In the following we will give examples with wget.

From a Unix shell window, you can download the list of observations of HD 28307 as a text file by writing :

wget ",seq&c=o&o=HD028307" -O HD028307.txt

Accessing radial velocity results

Complete cross-correlation function (ccf) results for a given star can be obtained by entering a command with parameters in your browser. For example the command below will generate a list in ASCII format of all public ccf results for HD 28307 :

The parameters listed are : seq, date, mask, rv, dvrms, fwhm, span, maxcpp, contrast, lines (see the parameter description or substitute a=htab for a=t in the command line to get the list in full HTML format). To submit a query concerning a specific group of stars, for example all stars in the Gliese catalog, or all Henry Draper stars, use instead the parameter o=GJ% or o=HD%.

Downloading series of FITS files

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 you can also issue the commands from the shell.

As each spectrum in the SOPHIE Archive is identified by its sequence number (a unique identifier of a given observation), you need these numbers, obtained from one of the previous http commands, to access the spectra directly. For example to get the spectrum in FITS corresponding to seq=1045721 write :

wget "[s1d,1045721]" -O 1045721_s1d.fits

To retrieve the CCF also in FITS format, we build the wget command in an analogous form. In this case we also need to specify which mask was used (it was K5) :

wget "[ccf,1045801,K5]" -O 1045801_ccf_K5.fits

You may construct similar URLs for any file in the archive. If you are a familiar with a text editor (such as vi, emacs, pico or nano) and with Unix shell commands, you can readily write a procedure to download all the files you desire.

An option has now been added to automatically generate a set of wget commands corresponding to all spectra meeting the given query criteria at the bottom of a query page, both for downloading s1d and e2ds spectra and for downloading cross-correlation functions.

Last updated on : 21.02.2014