SOPHIE Archive | SOPHIE Spectrograph | SOPHIE data products

Set constraints on multiple parameters

The form to set constraints, and choose which parameters to display, needs some expertise... It is powerful, but we recommend to read the following introduction before getting discouraged by the lack of success.

Constrain the parameters

When issued after a first selection, this form allows the user to combine the initial constraints with further restrictions, or when starting directly with this form, the constraints will apply to the whole catalogue.

For example, you may have selected all the spectra for the stars HD190007 and HD400, and then you want to select only those with a S/N exceeding 200.
At the bottom of the result page of the first request appears a list of all the fields of the table, with a form offering to set constraints. In this form, simply fill the constraint for sn26 as: > 200 and submit. You will get the list of spectra for HD190007 and HD400 having S/N > 200

Suppose now that you want to retrieve all the high S/N spectra (say sn26 > 250 ) for equatorial stars (say -1 > dec < +1 deg). In the form, you will fill the constraints for dec and sn26 respectively with BETWEEN -1 and +1 and > 250. When you submit it, you will get this.

The constraints have to be written directly in SQL, the language of the database server. Some of the most common constraints you may like to use are:
SQL statementExampleExplanation
= fiber = 'HR' equality
!= view_spec != 'not public' not equal
IS NULL get_spec IS NULL does not have a value
IS NOT NULL get_spec IS NOT NULL has a value
IN mask IN ('F8', 'G0') is in a list of values
< sn26 < 200 less than, also ≤
> exptime > 300 greater than, also ≥
BETWEEN ra BETWEEN -10 AND 10 in a range of values
LIKE mask LIKE 'G2%' pattern matching, % is a wildcard

Note that the different constraints are combined into a single SQL statement included in the URL. For more complex constraints, you can prepare directly this string and compose the URL.

Choose the parameters to display

By default, only a selection of the most useful parameters are displayed but the form exposes all the parameters from the table. You can use the checkboxes to unselect some defaulted fields you want to hide, or at the contrary select others.