next up previous contents
Next: BROWSE Display Up: HEASARC Users Guide Previous: Browse Basics

Subsections


Searching Databases

This chapter describes how to search a database.

Databases

The ldb command is used to provide a summary of the available databases. The listing gives the name and description of the database. The listing can be restricted to the databases for a particular observatory. For example, ldb rosat will list only ROSAT related databases. The database is changed using the cdb command. In the following example, the current database is changed to ME:


CMA_SOURCES_DEC > cdb me
Loading ME database sample TOTAL indexed on DEC
ME_TOTAL_DEC >
Typing only cdb would cause a prompt for the database name to be given.

Coordinate Search

A search for all entries within a given cone-angle around a given point on the sky is made with sc (search in a cone). The RA, Dec, and cone-radius can be given either on the command line or in response to questions. The input is context sensitive such that RA and Dec can be specified either as hr mn sc, deg mn sc or as decimal degrees. The with a cone-radius given in arc min. Both an outer and an inner cone radius can be given. The default for the inner radius is zero, non-zero values allow an annulus on the sky to be searched (this is useful for gamma ray burst positions derived from time of arrival). The following example illustrates a question-and-answer session for the sc command:


HEASARC> browse cma
CMA_SOURCES_DEC 15> sc
R.A. (1950 d/f= 03 52 15.20 or  58.063): 3 52
Dec  (1950 d/f= 30 52 42.69 or  30.879): 30.88
Radius arcmin (outer inner d/f=   60.00    0.00):
Notice that in this example the RA was entered in hrs and mins whereas the dec is given in decimal degrees. The default values are taken from a file in the current user's directory. Each time a search is made, the coordinates of the first entry found are written to this file for subsequent searches. The RA and Dec can also be given on the command line, with a comma used to separate the RA, Dec, and radius fields. The RA and Dec can be abbreviated to omit the seconds or minutes. For example,


CMA_SOURCES_DEC > sc 18 20,-30,60
to make the same coordinate search, but with the cone radius increased to 60 arc minutes. All entries within the specified cone are selected as the subsample and a line summary is given for the entries found. The output from this search is:


 
      name       seq   off  expos   time    count filt   ra        dec   inst
  (field name)   (#)  (min) (sec) (yr.day)   rate      (1950)    (1950)
 
> 1 4U1820-30   1813    1   21492  85.265  2.5E+00  7 18 20 27.9 -30 23 20 L1
  2 1820-303    1077    1    4757  84.270  1.8E+00  7 18 20 27.9 -30 23 16 L1
  3 1820-303    1077    1    7116  84.270  8.3E-01  8 18 20 27.9 -30 23 16 L1
  4 1820-303    1077    1    3648  84.270  1.3E+00  6 18 20 27.9 -30 23 15 L1
  5 4U1820-30   1759    1    6305  85.231  1.3E+00  7 18 20 27.6 -30 23 14 L1
  6 4U1820-30   1759    1    8698  85.231  5.5E-01  8 18 20 27.4 -30 23 14 L1
  7 1820-303    1513    2   12462  85.106  1.1E+00  8 18 20 27.5 -30 23 14 L1
  8 1820-303    1513    2   16565  85.106  1.7E+00  6 18 20 27.4 -30 23 13 L1
CMA_SOURCES_DEC 8>
The entry number is given on the left hand side. This number refers to the entry number in the subsample. The > refers to the default entry. Once a subsample containing one or more entries has been selected, the RA and Dec of the first entry will become the default for the next search. Several search qualifiers are used to modify the search. Using /default will take the default values for the position and cone angle, written from the previous search. The /radius=x uses the default RA and Dec and sets the radius to x arc minutes, /nodefault stops the default RA and Dec being updated after the search and /full lists the search results without pagebreaks.

Equinox Year

The input and output equinox year for coordinates are changed using the command cey (change equinox year). For example, cey 2000 will change it to year 2000. This command can be used at any point in the session, before or after a search has been made. Thus the search coordinates can be entered in 1950, the equinox year can be changed to 2000, and then the coordinates displayed precessed to the new equinox. NOTE: proper motions are not calculated and will be at the epoch of the original catalog.

Name Search

The command sn[ame] 3c382 searches for all names matching 3c382. The search is not case sensitive. Wild cards can be used in name searches. The command sn 3c* lists all objects with a name beginning with 3c. Typing sn *x-1 lists all objects ending in x-1, or sn m*5 searches for all names beginning with m and ending with 5. Wildcard searches in which the * is not the last character will be slow because a sequential search of all or part of the database is made. An object may be called by a different name or by several names in a single database (if several observers with different naming tastes observed the same source). It is always advisable to try several popular naming conventions first, and when successful, use sc/d to search the same coordinates.

Parameter Search

To search for any other parameter, use the sp command as follows:


sp [parameter] [min] [max]
This searches for all values of the given parameter within the specified min-max range (inclusively). A listing of the names, numbers, and descriptions of the parameters and their associated numbers can be obtained from the BROWSE command line with the lparm (list parameter) command. The default lists all of the parameters available for the current database. The parameters in another database can also be listed by typing lpa dbname, where dbname specifies the required database name. To list the attributes of each parameter (the data type) type lpa/att dbname. A description of each parameter is given by typing dbhelp par xxx, where xxx is the parameter name. A typical parameter search might be to find all EXOSAT LE count rates between 0.1 and 0.2 as follows:


CMA_SOURCES_NAM 10> sp count 0.1 0.2
OR


CMA_SOURCES_COU 213> sp
Enter parameter name: count
Enter minimum numeric value: 0.1
Enter maximum numeric value: 0.2
A list of the parameters can be obtained by typing <CR> in response to the prompt for the parameter name. If the parameter to be searched is a character string, a range or a single value can be specified. For example, the command sp name mkn766 searches for all occurrences of mkn766. Alternatively, sp name 3c100 3c120 searches for all the 3c objects between 100 and 120, inclusive.

Samples

A sample represents a subset of a table, and save the user having to make the same search many times. There is always a default sample called TOTAL which contains all the valide entries in a table. But for many databases there are a number of predefined samples provided. The lsam command lists all the available system samples for the current database. For example,


ME_TOTAL_DEC > lsam
 
 Sample  type      Description                       Available indexes
 -----------------------------------------------------------------------
>TOTAL     S All ME observations           | DEC COU RA  TIM CLA NAM
 GOOD      S observations with good QFLAG  | DEC RA  COU NAM TIM
 AGN       S AGN observations              | DEC COU RA  NAM TIM
 HLX       S High luminosity gal. sources  | DEC COU RA  NAM TIM
 LLX       S Low luminosity gal. sources   | DEC COU RA  NAM TIM
 SNR       S Supernova remnants            | DEC COU RA  NAM TIM
The type refers to whether the sample is a system (S), or user (U) generated sample. Also given are the indexes currently available for each sample and a description of the contents of the sample. The GOOD sample represents all ME observations with a good quality flag. The AGN sample represents all AGN observed by the ME and so on. To change sample, use the csam command.

Indexes

The current index defines the order in which the entries in a database are listed. The index is also used by the search routines discussed in the next chapter. The most commonly used parameters are always indexed. The lind command lists all of the system indexes that exist for the current database and sample. Also displayed are the number of distinct entries and total number of entries in the sample. The former is the number of unique matches for the indexed parameter. Indexes are created by using the mind command and are changed with the cind command.
next up previous contents
Next: BROWSE Display Up: HEASARC Users Guide Previous: Browse Basics
Michael Arida
1998-04-10