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

General Search Options and Operators

Search values can be specified in several different ways, depending on the data type of the field. In all cases, a single value can be entered (although this is not recommented for floating point values). In addition, various operators can be included depending on the data type of the field as described below.

The data types for each column can be displayed using the "Field Descriptions" link at the top of all MAST search forms.

  • Numerical fields - Real (i.e., real, numeric, float, or double) and Integer (i.e., long) fields can be specified as a single value, as a single value with numerical operators such as:

    • "< n", less than
    • ">= n", greater than or equal
    • "!= n", not equal to
    • "\null", is NULL
    • "n..m", an inclusive range (e.g., "1990 .. 2000").

    Bcause of small differences in stored floating point values, specifying a single floating point value may not return the expected results. Therefore, numerical or range operators are recommended with floating point fields queries. Integers may be requested either way.

    The number of digits displayed to the right of the decimal point for floating point numbers is determined solely by the data type. If the data type is "real" only 1 digit is displayed, and for "numeric" 2 digits are displayed. "Float" data types have 3, and "double" can have up to 8 or more.

  • String fields - String fields, also known as "char" or "varchar" fields, can use the following operators:

    • = (equal) which is the default,
    • != (not equal, e.g., != SMALL),
    • \null for IS NULL ,
    • !\null for IS NOT NULL,
    • "*" or "%" wildcard operators (e.g. "Jup*").

    By default, string searches use equals ("=") which runs faster without wild cards but implies matches must be exact. For example, searching on Target description = "Planet" will not return an entry for "Planet:Jupiter". (There are some exceptions though such as searching on Kepler Investigation ID will automatically include wild cards.) Wildcards are allowed and encouraged when an exact match is not desired, so in the previous example, searching on Planet* would return all entries beginning with the word Planet. Quotes are not necessary for string values.

    Since moving to the Microsoft SQL Server database system in 2009, string searches are no longer case-sensitive. Values will still be displayed in the same case they were originally entered, but entries will be found regardless of the case of the searched string (i.e., searching for HST id "go-5916" or "GO-5916" will return the same entries).

    Also, as with any data type, commas can be used to search for multiple entries. For example, to search for all O3 and B3 stars from the Skiff catalog, just enter O3*,B3*. Likewise, entering \null,<5 will return values that are either null or less than 5. However, if nulls are used with comma-separated strings, specify the strings first and in single quotes (e.g., 'hrs',\null ).

  • Substring fields - A few fields have a data type of "substring" for which wildcard operators are automatically added at the beginning and end of the input string. For example, entering "Comets" for the K2 Object type will search for "*comets*". Commas still work as with other data types, so entering "Exoplanet,red" for the Kepler condition flag (another substring field) will search for condition flags = "*exoplanet*" or condition flags = "*red*". Note these special cases do not apply to casjob searches.

  • Bibstring fields - Bibstrings are a special string field for storing ADS bibcodes. A bibstring value has 19 characters, and its assumed that no operators other than wild cards are included in queries. This data type was mainly added because ".." was normally interpreted as a range search request. For a bibstring field, specifying 2101ApJ..* means find all entries whose bibcode begins with 2010ApJ..

  • Coordinate fields - Generally you can specify a variety of formats for Right Ascension and Declination using either decimal degrees or sexagesimal values (RA in decimal hours is also available, but only as an output format option). The allowed search formats are described in detail below.

  • Date fields - Dates can also be specified in a variety of formats and can also use operators and inclusive range searches. Here are some allowed/recommended examples:
    • > Jul 15 1994
    • < 01-jan-2010
    • Dec 1 1995 .. Dec 6 1995
    • 01-jan-2009 .. 15-feb-2010
    • 2009-05-11 17:51:31 (but date match must be exact)
    • 20090115 .. 20100101
    • dec 2009 .. jan 2010
    • 2009 jan .. 2010 jan
    • 2009 .. 2010

    Formats found not to work or not recommended include:
    • 15 Jul 2005 (valid format but only returns entries with a value of 15 Jul 2005 00:00:00)
    • 15JUL2009 (same problem as above)
    • 15-jul-2009 (same problem as above)
    • 2009-01 (same problem as above)
    • 2009-10 .. 2010-01 (doesn't seem to work)
    • 2009-10-01 .. jan-01-2010 (don't mix formats in range searches)
    • jan-15-2009 .. feb-01-2010 (putting month before day doesn't work with dashes!)
    • Dec 15 2009 .. Dec 01 2009 (earlier date should be listed first)

    Often queries on a single date will fail because the database can store datetime fields to the millisecond and the matches must be exact. It is preferable to use a range or the <, > operators. Note that when the time is not specified, the query will default to 00:00:00. Therefore without specifying times, a range search would include the starting date but exclude the ending date. Leaving off the day or month would work similarly.

To see the data type of a particular field, click on the form element label or any of the help page links. Note quotes are not needed for any values. Note, searches on "null" values in fields of any data type are now possible by entering \null.

By default, the various search criteria will be submitted using logical AND's. Logical OR's are not supported on most mission search forms except when using commas within a single form element such as entering "hc230,srhlw" for IUE program ID to return entries with ID hc230 OR srhlw.. Information on individual search form elements is listed below. Note that specific examples given below do not necessarily apply to all missions. The examples are merely intended to show valid formats for data entry.

The Right Ascension and Declination values are specified in either decimal degrees or sexagesimal notation. If single values are entered, a cone search is performed using the specified search radius The usual default radius is 3 arcminutes, but this varies with mission. For example, for Kepler the default is only 0.02 arcminutes while for VLAFIRST it's 20. Although decimal hours is NOT an allowed input format, Right Ascension search results may optionally be displayed as decimal hours (see the "Output Coords" form element).

Note the examples listed below (and elsewhere) are only intended to show the format of the form entries. There is no guarantee that entering these specific values will return any search results.

You may also enter ranges of right ascension or declination, using the ".." operator. For example, you can enter 21h 51m .. 21h 52m for the right ascension, and 28 51 .. 29 51 for the declination. Comparators can also be used, i.e. ">", ">=", "<", "<=". For example, "> 85" as a declination value will return all observations with declination larger than 85 degrees. (Note when ranges of coordinates are specified the search radius will be ignored. Also, searches on ranges can be quite time consuming.)

Coordinate values may be specified using a number of formats. Examples of accepted values include:

    Decimal Degrees
       	185.63325 29.8959861111111
    Hours, minutes and Seconds
        12 22 31.98      29 53 45.55
        12h22m31.98s     29d53m45.55s
        12:22:31.98     +29:53:45.55
        12h22'31.98"     29d53'45.55"
        12h 22m 31.98s   29d 53m 45.55s
        12h 22' 31.98"   29d 53' 45.55"
        12h 22' 31.98"  -29d 53' 45.55"
        12h22'31".98    -29d53'45".55
        12h22m31s.98    -29o53m45s.55
        12h 22' 31".98  -29d 53' 45".55
    Hours/Degrees and Minutes (no seconds)
        12 22     29 53
        12h22m   +29d53m
        12h22m    29d53m
        12:22m    29:53m
        12h22'    29d53'
        12h 22m   29d 53m
        12h 22'   29d 53'
        12h 22'  -29d 53'

    The RA may be given in decimal degrees by indicating
    a D or d after the degrees:
        12d 22m   29d 53m
Spacing is not important, as long as the value is unambiguous. You can delimit the hours/degrees, minutes, and (optional) seconds with letters, colons, spaces, or any character that's not a digit or a decimal point. Like target names, multiple coordinates can be entered if separated by commas.

On output, coordinates from all missions are displayed with the same number of digits to the right of the decimal point. As of June 2012, the number of digits displayed was increased from 5 to 7 for decimal degrees, from 2 to 3 for RA in sexigesimal notatation and from 1 to 2 for Declination in sexigesimal notation. For some missions, this may imply more precision than warranted, and trailing 0's may not be significant.