\documentstyle[html,array,longtable,a4,11pt]{report}

\setlength{\parskip}{2.5pt}

\begin{latexonly}
\newcommand{\expl}[2]{\noindent{\parbox[t]{5.0cm}{\tt #1}}
{\parbox[t]{8.2cm}{#2}}}
\newcommand{\struc}[2]{\noindent{\parbox[t]{3.0cm}{\sf #1}}
{\parbox[t]{9.2cm}{#2}}}
\end{latexonly}

\begin{htmlonly}
\newcommand{\expl}[2]{\noindent{\tt #1} #2}
\newcommand{\struc}[2]{\noindent{\sf #1} #2}
\end{htmlonly}

\begin{document}

\setcounter{part}{1}
\part{HOW TO USE BDA}

\setcounter{chapter}{5}
\chapter{The command mode}
\section{Basic Commands}

The following description provides many examples of the command 
usage and some comments.

\subsection{Content of BDA}
To know which NGC clusters exist in BDA move to {\sf bda} and enter:\\
\expl{$>$ ngc}{}\\
\expl{$>$ ls}{}\\
\noindent This will produce a list of all NGC clusters appearing as subdirectories in the {\sf bda/ngc} directory. Similarily, enter:\\
\expl{$>$ ic}{} \\
\expl{$>$ ls}{} \\
\noindent or\\
\expl{$>$ anon}{} \\
\expl{$>$ ls}{}\\
\noindent to look at the {\sf ic} and {\sf anon} directories respectively.

\subsection{Moving within BDA}
To move to a cluster directory, simply enter:\\
\expl{$>$ ngc 2287}{}\\
\noindent when you are in {\sf bda} \\
\expl{$>$ ic 1805}{will put you in the cluster IC 1805}\\
\expl{$>$ anon mel022}{will transport you to the Pleiades directory.}

\noindent These motions are possible if cdpath has been set to ../..
as explains in 6.3.1. A few aliases have been created (see Appendix G)
to reach the directory of nearby clusters, and you can create more.

\subsection{List of data files}

\noindent When in a cluster directory, you can look at the data file:\\
$>$ {\tt ls} or {\tt ls -l}\\
\noindent Do not forget that the files are compressed, so they have the 
suffix ".Z". You can uncompress them with the {\tt uncompress} system 
command or with {\tt testfZ} which uncompresses the file and writes its name 
and path in the file {\it fich\_compr} located in {\sf bda/gestion/}. 
At the end of the work session the files are automatically recompressed if
the command {\tt recompress} has been added in the {\it .logout} file.

\expl{$>$ testfZ mkk.don}{}

\subsection{Looking at the file content}
Several commands have been prepared to handle compressed files.
The syntax is simply:

\noindent {\tt > command} {\it filename}

\expl{$>$ scl}{display a scale and the first ten lines of a file}

\expl{$>$ zp}{list a compressed file, one page at a time}

\expl{$>$ zhd}{list the first 15 lines of a file}

\expl{$>$ ztl}{list the last 15 lines of a file}

\expl{$>$ zpr}{print a file with {\tt lpr}}

\expl{$>$ wz}{count the number of lines}

\expl{$>$ vz}{uncompress a file and call the vi editor}

\noindent Note that the suffix ".Z" should not be present. Adding it 
will produce an error.

\section{Manual and help}

\subsection{Manual}
\paragraph{The command man}
Man pages have been written for many commands, and are accessible with 
the system command {\tt man}, provided the {\bf MANPATH} has been 
correctly set.
You may consult the manual information interactively from anywhere 
in the data base. The manual files are located in the directory 
{\sf bda/man/man1}. Use {\tt man -t command-name} to print the 
man pages.

\noindent {\tt man bda} produces a list of the commnads for which 
man pages are available.

\paragraph{ The command mnl}
You may consult the manual information interactively from anywhere 
in the data base. The manual files are located in the directory 
{\sf bda/manuel}. They all have the suffix ".mnl". After displaying 
the manual information, the shell script asks you if you want to see the 
source code of the command or function. These description are in French.

\noindent Interactive form for the command {\tt mnl}:

\expl{$>$ mnl ubv}{} 

{\tt Do you want a listing of the code (y/n) ?} {\tt y}

\subsection{Documentation}
A number of texts describe the database and they can be reached by 
entering {\tt dsc} which will display a menu. A shorter way is to enter 
directly {\tt doc} or {\tt help}. 

Most of these texts are still in french. Thus, they have to be 
translated, and also improved to give better information. The texts may 
be revised to take into account your experience and the problems you 
may face. 

A hypertext description of the database and commands is being developed.
The front page of the database is displayed with the command 
{\tt xhelp bda}. The user's guide is also accesible in hypertext form
from the front page.

If the command {\tt xhelp} does not work correctly, check the way NCSA
mosaic is called. Move to the directory {\sf bda/bin} and edit the
file {\it xhelp}.

\section{Command names, options and filenames}

\subsection{Command names}
The command {\tt ncm} display directly the small menu which drives the 
information on command names:

\expl{$>$ ncm}{display a menu arranged by datatypes}

\expl{$>$ ncm ddo}{display directly the information on {\tt ddo}}

\noindent The command names are listed in Appendix A.

\subsection{Command capabilities}
The description obtained with the command {\tt emploi} offers the best 
way to determine which syntax should be used to get the desired results:

\expl{$>$ emploi ubv}{display a small menu}

\begin{verbatim}
          which item?                4
          back to the menu (y/n)?    y
          which item?                7
          back to the menu (y/n)?    n
\end{verbatim}

\noindent The same menu may be displayed with the option -h: {\tt ubv -h}.
A hypertext version is available with NCSA Mosaic: the command name is 
{\tt xhelp} and it takes a command name as argument, like in {\tt xhelp ubv}.


\subsection{Option meaning}
The command "option" informs you about the option meaning:

\expl{$>$ option}{display the list of options}

\expl{$>$ option -d}{provide information on "-d" only}


\subsection{File names}
The command {\tt fichier} behaves like the previous one:

\expl{$>$ fichier}{display the list of filenames}

\expl{$>$ fichier wal.mes}{tell the content of that file}

\subsection{File fields}
The command {\tt field} informs on the field names used as parameters for 
selection or sorting.

\expl{$>$ field ubv}{display the data field in the file {\it ubv.peo}. It
gives the field designation, the position of the beginning and its length}
\expl{$>$ field ubv v}{display the information for v only}

\subsection{Datatypes}
The command {\tt dtype} explains which are the data concerned by a given
datatype.

\expl{$>$ dtype ubv}{display an explanation line concerning the ubv datatype}

This command may also be used to search for the datatype cooresponding to
some kind of data.

\expl{$>$ dtype UBV}{display the various datatypes that correspond to UBV
and related data}

\expl{$>$ dtype CCD}{display the various datatypes that correspond to CCD
data}

\section{Bibliography and References}

\subsection{The modern bibliography}
The command {\tt bib} handles the bibliography from 1969 to the
present day created from the Astronomy and Astrophysics Abstracts. 
The following example presents a typical interactive session; it corresponds 
also to the interrogation started from the main menu.

\expl{$>$ bib}{}
\begin{tabbing}
\hspace{2cm} \= {\tt which year?}  \hspace{2cm} \= {\tt 88} \\                                
\> {\tt which subject?} \> {\tt lithium} \\
\\
\> {\tt another year?}  \> {\tt 87} \\
\> {\tt another subject?} \> $<$return$>$ \\
\\
\> {\tt another year?} \> $<$return$>$ \\
\> {\tt another subject?} \> {\tt Coma\_Ber} \\
\\
\> {\tt another year?}  \> {\tt 0} (or n or fin) \\
\end{tabbing}

The first request searches the 1988 bibliography for references concerning
the lithium, the second one searches the 1987 bibliography for the same
topics, and the third one explores the bibliography of 1987 again, but
for references about the Coma Ber cluster.

This interrogation allows you to handle only one year and one 
subject at a time, which is limiting. Therefore, several options have 
been introduced to improve the efficiency. The option "-eq" permits  
to select one year and up to three different subjects simultaneously 
while the options "-i -lt -gt" allow to work within two limiting years. 
They also accept up to three keywords.

\noindent $>$ {\tt bib -i 84 88 Hyades Pleiades lithium}\\
\expl{\ }{display all references concerning the 
problem of lithium abundances in the Hyades and the Pleiades clusters 
published from 1984 to 1988.}

\expl{$>$ bib -eq 86 752 lithium}{displays the references relating to the 
lithium abundance in NGC 752 published in the year 1986.}

\expl{$>$ bib -gt 86 752 lithium}{display the references published
in 1986 and later}

\expl{$>$ bib -lt 75 Tr16}{display the references published between
1969 and 1975 for Trumpler 16}

\expl{$>$ bib -n Claria -eq 88}{list the references published in 1988
by Clari\'a.}

\expl{$>$ bib -k}{display the keywords which may be used. Cluster names are 
not listed in this file, but you can include all NGC and IC numbers as keywords.
Generally "NGC" and IC" are not necessary. The names of anon clusters are 
spelled as in the {\sf anon} directory, with the difference that the first character is upper case and there is no left padding with zeros.}

\expl{$>$ bib -km cluster}{display a list of the keywords which 
contains the string "cluster" (many keywords are composite).}

\expl{$>$ bib -ki stellar}{list all keywords beginning with the 
word "stellar".}

\expl{$>$ bib -ke mass}{list all keywords ending with "mass".}

\expl{$>$ bib -t 93}{count the number of references for the year 1993}

\expl{$>$ bib -c 93}{give access to the keyword list of the
references listed by the previous search. This command should therefore
be issued after a successful search only}

\subsection{The Budapest bibliography}
Information from the Catalogue of Star Clusters and Associations 
(Alter et al. 1970) and its first supplement (Ruprecht et al. 1981), available 
on tape, has been included for NGC, IC and anon clusters. The 
catalogue has been separated into smaller files, one for each cluster, 
which bears the name {\it bdp.cat}. 

The command {\tt bdp} offers a few options to select information from 
the Budapest bibliographic catalogue for one or several consecutive 
years with the options -eq, -gt -lt and -i, according to an author's name 
or a given topic (option -s). The abbreviating system is complex 
within this catalogue. The abbreviations for the subjects, the
journals and publications are described in the hypertext presentation of
he bibliography.

\expl{$>$ ngc 0129}{move to NGC 129. Notice the leading 0}

\expl{$>$ bdp}{list the complete file}

\expl{$>$ bdp tr16}{lists the bibliography for the cluster Trumpler 16. 
Can be called from anywhere in the database, for any cluster, even for
those which do not have their own directory.}

\expl{$>$ bdp -eq 1970}{Select the references for 1970}

\expl{$>$ bdp -gt 1960}{produce a listing of all references   
published later than 1960}

\expl{$>$ bdp -i 1950 1960}{list the references for the interval given.}

\noindent The option -s is used to make selections on:

\expl{$>$ bdp -s Trumpler}{a name (case is not important)}

\expl{$>$ bdp -s cepheids}{a subject}


\subsection{The information from Lyng{\aa}'s catalogue}
The information and global parameters from Lyng{\aa}'s (1987) catalogue 
are recorded in each cluster directory. The output format 
is similar to that of the edition on microfiche. In addition, it is 
possible to retrieve specific information according to the option 
used with the command {\tt lyn}.

\expl{$>$ ngc 2287}{move to the cluster NGC 2287}

\expl{$>$ lyn}{display the information for NGC 2287}

\expl{$>$ lyn 2516}{same, but for NGC 2516}

\expl{$>$ lyn -p}{summarize the parameters of NGC 2287:
distance, reddening and age}

\expl{$>$ lyn -c}{give the equatorial and galactic coordinates}

\expl{$>$ lyn -d}{display information on the diameter}

\noindent The syntax {\tt lyn cluster-name} is used to get the information
for clusters which do not have their own directory.

\subsection{The references}
The references may be obtained in several different ways with the command 
{\tt ref} which starts an interactive program. 
The references are written in distinct and uncompressed files located in 
the directory {\sf bda/references}. The filename are like "data type.ref", 
e.g. {\it ubv.ref} or {\it vsini.ref}. 

\expl{$>$ ref}{}

\begin{verbatim}
          For which kind of data?       vsn
          Give the reference number:      1
          Another reference?             10
          Another reference?             -1
          Precise your choice:          orb
          Give the reference number:      5
          Another reference?              0
\end{verbatim}

The answer "-1" displays the list of data types for which references
are available. It also permit to change the data type for further
query.

\expl{$>$ ref -h}{display information on the command capabilities.}

\expl{$>$ ref -n Hoag ubv}{display the references containing the 
name of Hoag among the authors' names in the UBV references.}

\noindent The next options work only with cluster data file, so you need 
to move to a cluster directory:

\expl{$>$ ngc 2287}{}

\expl{$>$ ref -t ubv}{list all references relating to the UBV 
photoelectric data}

\noindent The option -m is used to get the references after a data
query or a selection:

\expl{$>$ mk 103}{select the MK data for star \# 103}

\expl{$>$ ref -m}{list the corresponding references}

\expl{$>$ vsn V -gt 280}{select large Vsini}

\expl{$>$ ref -m}{list the references}

\subsection{Cluster numbering system}
\noindent The reference for the numbering system adopted in the
database is obtained with {\tt sysno}. 

\expl{$>$ sysno}{display the reference of the numbering system for the current
cluster}

\expl{$>$ sysno 2516}{display the reference of the numbering system for
NGC 2516 from anywhere in the database}

\subsection{Ongoing observations}
The command {\tt baas} simply displays the {\it baas.dat} file which
contains information on ongoing work and observations. It does not have
any option.


\section{Remarks}

The command {\tt rem} is used to query the remarks. It is most often used
with star numbers and has only one option "-k", used to search for a string 
of characters in the remark file.

\expl{$>$ ngc 2516}{}

\expl{$>$ rem}{list the file}

\expl{$>$ rem 10 27 29}{search for the stars number 10 27 and 29}

\expl{$>$ rem -k Delta Scuti}{list the stars classified as Delta Scuti 
variables.}


\section{Cross-Identifications}

\subsection{The cross-reference tables}
BDA contains cross-reference tables which provide the 
cross-identifications between many numbering systems. Information may 
be retrieved in both senses: either from the original numbering systems to
that adopted in BDA or from BDA's system to any other one.

\noindent If you are not in the directory of NGC 129, enter:

\expl{$>$ ngc 0129}{}

\expl{$>$ tab -r}{list the references of the numbering systems included in 
the cross-reference table.}

\expl{$>$ tab}{list the cross-reference table.}

\expl{$>$ tab 16 20 30}{display the line for stars 16 20 and 30.}

\expl{$>$ tab -r 4}{remind you of the reference corresponding to column 4.}

\expl{$>$ tab -l 3}{select the entries corresponding to column 3.}

\expl{$>$ tab -s 3}{extract couples of cross-identifications: BDA number -
 column 3 number, sorted by column order.}

\expl{$>$ tab -i}{print the references and the cross-reference table.}

\expl{$>$ tab -c}{start a cross-identification program in the reverse sense: 
from any column to the adopted system.}

\begin{verbatim}
          Give the reference number:   0 
 
                  (0 displays the reference list, when you need it.)

          Give the reference number:   2
          Which star?                  5
          Another star?               10
          Another star?               -1
          Give the reference number:   3
          Which star?                 20
          Another star?                0
\end{verbatim}

\noindent The entry "-1" allows to change the reference searched, here one
moves from reference 2 to 3.

\expl{$>$ tab -s}{produce an output sorted according to the selected column. 
May be redirected to any file.}

{\tt sort on which column?}   {\tt 2}

\noindent Special numbering systems may also be interrogated:

\expl{$>$ ngc 0457}{}

\expl{$>$ tab -k 22- 75}{look for "22- 75" in the table}


\subsection{The cross-identifications}

Information on cross-identifications with astronomical catalogues may be 
obtained with the command {\tt idm}. The cross-IDs are split into two files.
The first one contains the common identifications (HR, HD, DM, NLS, SLS,
GCVS), and the second one the IDS, ADS, SAO, and miscellanous IDs.

\noindent If you are not in the directory of NGC 129, enter

\expl{$>$ ngc 0129}{}

\expl{$>$ idm1}{list the first file.}

\expl{$>$ idm2}{list the second file.}

\expl{$>$ idm 164 170}{display the content of both files for both stars.}

\expl{$>$ idm1 164 170}{display the content of the first file only.}

\expl{$>$ idm -sort hd}{list the entries sorted by HD numbers. Arguments are: 
hd dm hr/bs sao ids ads lss nls}

\expl{$>$ idm 170 236429 113}{identifications can be mixed: star number 
HD or BS}


\subsection{The identification of double star components}

Systematic cross-referencing has been done for the identification 
of double star components of the IDS (1984.0) catalogue and cluster 
stars. This information may be reached with the command {\tt ids}. 

\expl{$>$ ngc 2422}{}

\expl{$>$ ids}{list the file.}

\expl{$>$ ids 45}{list all components associated with star no 45.}

\expl{$>$ ids ads -eq 6216}{list the lines containing the ADS number 6216.}

\expl{$>$ ids sep -lt 10}{select the systems having a separation 
smaller than 10 "arc. Options "-gt" and -i" can also be used.}

\expl{$>$ ids mult -eq AB}{select the entries for AB components.}

\section{Data queries}
Most commands that query data use the same syntax.
Without argument, the command lists the datafile; with one argument,
it returns the star data if the argument is numeric or execute the
appropriate option. 
To make a selection, enter the command followed by the parameter name
on which the selection is made, the comparator and the value:

{\tt command parameter comparator value}

\noindent The definition of the parameters for each datafile is given in
Appendix E. It may be obtained simply with the command {\tt field} described
above. The discussion of the command {\tt ubv} will illustrate this
syntax, which is the same for all selections.

\subsection{General case: the command ubv}

Start by going to the directory of the cluster NGC 129

\expl{$>$ ngc 0129}{}

\expl{$>$ ubv}{all commands entered without argument 
produce a listing of the entire file, one page at a time.}

\noindent Query by star number:

\expl{$>$ ubv 200}{list the UBV data of star 200 (DL Cas)}

\expl{$>$ ref -m}{display the references of these data.}

\expl{$>$ ubv -r 200}{equivalent to the preceding two commands.}

\expl{$>$ ubv 164 170 200}{list the UBV data of the three stars.}

\expl{$>$ ubv -u 1341 200}{select the data for star 200 from reference 1341.}

\expl{$>$ ubv -a 200}{compute the mean value.}

\expl{$>$ ubv hd -id 236429}{query by HD number.}

\expl{$>$ ubv -f no.lst}{search for the UBV data for a list of stars
contained in a file, here {\it no.lst}.}

\noindent Selection on UBV parameters or reference:

\expl{$>$ ubv v -lt 9.0}{select the stars with V $<$ 9.0.}

\expl{$>$ ubv b-v -gt 1.8}{select stars with B-V $>$ 1.8.}

\expl{$>$ ubv no -lt 10}{list the stars with numbers less than 10}

\expl{$>$ ubv ref -eq 1341}{select data from the reference 1341.}

\expl{$>$ ubv ref -ne 1341}{select data from any reference except 1341.}

\noindent Options common to most data commands:

\expl{$>$ ubv -d 10}{give the list of sources that have 10 stars or more 
and the number of stars.}

\expl{$>$ ubv -dr 10}{produce the same output as "ubv -d", but list also 
the corresponding references.}

\expl{$>$ ubv -nb 3}{list the stars with at least three sources.}

\expl{$>$ ubv -sort v}{produce an output sorted by V mag.}

\expl{$>$ ubv -t}{count the number of measurements and stars.}

\expl{$>$ ubv -h}{display the description of the command.}

\noindent Option specific to the {\tt ubv} command:

\expl{$>$ ubv -y}{give the results of the UBV data comparaison.}

\expl{$>$ ubv -plt}{plot photometric diagram.}
 
\noindent Most other commands handling photometric data (see Appendix A,
table A.1)) behave similarily. This is especially true for the commands 
that handle UBV type data {\tt pgh ccd sit cam}. The options -d, -dr, -nb, 
-t and -h are common to commands handling referenced data.

\subsection{The commands ubvm and cmd}
The commands {\tt ubvm} and {\tt cmd} have the special keyword "ns" which
means number of sources, because the data source is replaced by the
number of sources used in the computation of the mean.

\expl{$>$ cmd ns -gt 3}{list the mean values based on 3 sources or more.}

\subsection{The command hrd}
The datafile for the type hrd contains in addition to the dereddened UBV 
colours a column indicating the individual colour excesses. It is possible
to select the stars according to E(B-V).

\expl{$>$ hrd ebv -gt .65}{select the stars with E(B-V) $>$ 0.65.}

\subsection{The commands mk, mks and spt}
The parameter "ts" is specific to the command {\tt mk}, {\tt mks} and 
{\tt spt} and the options -eq, -lt, -gt and -i have their standard meaning.
The parameters no and ref can also be used to perform selections.

\expl{$>$ ngc 2516}{}

\expl{$>$ mk ts -eq B8 V}{select the stars with a spectral type like B8 V}

\expl{$>$ mk ts -lt B5}{select the stars earlier than B5}

\expl{$>$ mk ts -gt K0}{select the stars later than K0}

\expl{$>$ mk ts -i B8 A2}{select the stars with types between B8 and A2}

\expl{$>$ mk ref -eq 999}{select the classifications from reference 999}


\subsection{The commands coo and pos}

The commands {\tt coo} and {\tt pos} handle the coordinates. The option 
"-eq" changes the equinox from 1950 to any other one, and has the
meaning of "equinox" only for these two commands. The syntax is the same for
both:

\expl{$>$ ngc 0129}{~}

\expl{$>$ coo -eq 2000 200}{precess the coordinates to 2000}

\expl{$>$ pos -eq 1975 200}{precess the coordinates to 1975}

\noindent It should not be confused with

\expl{$>$ coo ref -eq 128}{Select coordinates from source 128 (GSC).}

\noindent It is possible to look for the stars which are in a given radius 
around a center specified by its right ascension and declination.

{\tt coo R -lt 1.5 6 44 30 -20 40 00}\\
\expl{~}{list the stars within 1.5 'arc around the position 
RA = 6$^{\mbox h}$ 44$^{\mbox m}$ 30$^{\mbox s}$, DEC = -20$^o$ 40' 00"}

\expl{$>$ coo -k 0 27 1}{search the stars having a coordinate between 
0h 27m 10s and 0h 27m 19s. The same can be done in declination.}

\noindent The option -k searches for strings of characters, even if they 
contain white space.

\expl{$>$ coo -info 10}{list information on reference 10}

\subsection{The commands apm and rpm}
These commands manipulate the absolute and relative proper motions.
These data are not yet very numerous, but their importance will grow
with the results of Hipparcos.
The option -info is interesting: it displays the information collected
by van Leeuwen on proper motion studies. The argument can be a reference
number or a cluster name.

\expl{$>$ apm -info 180}{display the information for reference 180}

\expl{$>$ apm -info NGC 2682}{display the information for NGC 2682}

\subsection{The command irv}
The command {\tt irv} has a few specific options to select and plot
radial velocities in function of observation time or Julian date.
The option -dn was made to look at the observations of each night to
check visually the stability of the radial velocity system.
The option -v is used to plot the radial velocities of a star in function
of the Julian date and -bin is used to extract the observations of one
star and start the program to determine an orbit. These actions are grouped
in the menu {\tt sbs}. The program is described in part III.

\expl{$>$ ngc 2516}{}

\expl{$>$ irv -dn}{produce a list of the observing nights, ordered by 
increasing Julian dates, with a minimum of 5 observations. These nights 
are numbered for display and plotting facilities.}

\begin{verbatim}
          Which night number?              5
          Do you want to plot the RVs?     y

          What do you want to do?          m
          Give the mean cluster RV:       15

          What do you want to do?          f

          Which night number?              0
\end{verbatim}

\noindent The level of selection may be modified by entering the new limit:

\expl{$>$ irv -dn 10}{}

\noindent The rest of the process is the same as the one described just above.

\expl{$>$ irv -v 5}{select the observations relating to star 
5 and plots the data versus the Julian dates.}

\begin{verbatim}
          Do you want to plot the RVs?     y

          What do you want to do?          m
          Give the mean cluster RV:       15

          What do you want to do?          f
\end{verbatim}

\expl{$>$ irv 5 $|$  page}{pipe with {\tt page} or {\tt more} for long output}

\expl{$>$ irv jd -eq 40191}{select and display the observations made
on  JD 24440191.}

\expl{$>$ irv -bin 25}{select the measurements of star 25 and run the
program to compute the binary orbit, for a SB1}

\expl{$>$ irv -bin2 34}{select the measurements of star 34 and run the
program to compute the binary orbit, for a SB2}

\subsection{The command prob}
The command {\tt prob} allows to make selections on the membership 
probabilities.

\expl{$>$ prob p -gt .75}{select stars with a membership probability larger than 75\%}

\noindent The options -i and -lt are also valid, as are selection on the star
numbers "no" and the reference "ref".

\subsection{The command hpd}
The command name is from the Hipad Plus$^{TM}$ the name of the Houston 
Instruments digitizing tablet used to measure the rectangular positions on 
cluster photographs. The positions were put in the {\it hipad.xy} file, as 
a distinct source with respect to author's names when the data were taken 
from the literature.

The command {\tt hpd} has a specific option -info.
It displays the entry for the given cluster in the file {\it info.hpd}
located in the directory {\sf bda/information/} containing the scale of the 
xy positions and the source of the data.
The cluster name has to be indicated on the command line.

\expl{$>$ hpd -info 2287}{extract the line relating to NGC 2287}

\expl{$>$ hpd -c}{display the number of the central star (0,0)}

\noindent Selection can be made on the x or y or both parameters (xy).

\expl{$>$ hpd xy -lt 20}{select the stars within a box of 20 units in size}

\expl{$>$ hpd r -lt 20}{select the stars within a circle of radius 20}

\noindent A cluster chart may be built from the (x,y) positions and the
magnitudes contained in the file {\it hipad.xy}. The same action may be
obtained with {\tt carte}.

\expl{$>$ hpd -plt}{plot a chart from (x,y) positions}

\subsection{The command gk and red giant data}
The command {\tt gk} displays the file containing the information on 
the cluster red giants. These files are part of an unpublished catalogue 
of about 3200 red giants in open clusters. The description of 
the record content is given in Appendix I.

\expl{$>$ ngc 0129}{move to NGC 129.}

\expl{$>$ gk}{list the file.}

\expl{$>$ gk 164}{display one star.}

\expl{$>$ gk ph -eq ubv}{select the stars with UBV data.}

\expl{$>$ gk ph -ne ddo}{select the stars without DDO data.}

\noindent Arguments for the keyword ph (photometry) are: ubv pgh gen ddo 
cmt ri egg iyz wing.

\noindent A tentative classification (ABCD) has been developed to indicate 
the evolutionary state of the red giants. (See Appendix I for further
comments. A selection can be performed on the classification with the 
keyword "cl".

\expl{$>$ gk cl -eq C}{list clump red giants}

\expl{$>$ gk cl -eq A}{list AGB giants}

\expl{$>$ gk cl -eq F}{list the field stars}

\expl{$>$ gk cl -eq sb}{list the spectroscopic binaries}


\subsection{Obtaining further information: aud}

The command {\tt aud} (for "autre donnees" = other data) obtains other 
kinds of data for a sample created with a data handling command, like 
{\tt ubv, mk, vsn} and so on. Let us first move to the NGC 2516 directory.

\expl{$>$ ngc 2516}{~}

\expl{$>$ vsn V -gt 270}{form a sample with stars having a rotational 
velocity larger than 270 km/s.}

\expl{$>$ aud mk}{list the spectral types for that sample}

\expl{$>$ aud prob}{list the membership probabilities.}

\expl{$>$ aud -s rem}{list the remarks, but the sample has been redefined 
by the output of the preceding command. This is useful whenever data are not
found for all stars.}

\expl{$>$ rem -k SB}{search for the spectroscopic binaries.}

\expl{$>$ aud vsn}{list the Vsini for the binaries.}

\expl{$>$ mk ts -eq B8 V}{select the B8 V stars.}

\expl{$>$ aud betam}{display the mean H$\beta$ values.}

\noindent The command {\tt aud} is also used to extract data for a 
predefined list of stars, or stars contained in a BDA file.

\expl{$>$ aud -f gK ddo}{display the DDO data for the red giants contained
in the file {\it gK}. Even if the file is normally compressed, do not add 
the .Z suffix}

\expl{$>$ aud -v gK ddo}{list the red giants which do not have DDO data}

\expl{$>$ aud -t cmd coo}{display the coordinates for the stars that have
mean UBV data.}

\expl{$>$ aud -v cmd coo}{list the stars that have mean UBV data, but no
coordinates. The argument to -v is a data type.}

\subsection{Obtaining several kinds of data at a time: multi}
One can obtain several kinds of data for one star in a simple way 
by using the command {\tt multi}:

\expl{$>$ ngc 0129}{~}

\expl{$>$ multi 200 ubv mk pos}{list the UBV data, spectral types 
and coordinates for star 200.}

\section{Cluster map and chart}
Cluster maps have been scanned and installed in the database. The maps
scanned (output file in the tiff format) have been displayed with {\tt xv},
captured with {\tt xwd} and compressed with {\tt gzip}. The result is that
they occupy about 10 kB on the disk instead of some 300kB in the tiff
format. They are uncompress on the fly and displayed with {\tt xwud}.
The command {\tt ximage} is doing the display business. It needs the
map author's name as argument.

\expl{$>$ ngc 3572}{~}

\expl{$>$ ximage moffat}{display Moffat's map}

\expl{$>$ ximage steppe}{display Steppe's map}

\noindent The image may be moved only, but the size cannot be changed.
A single click on the mouse left button, when the pointer is located
within the map will make it disappear. It is of course possible to
keep two maps on the screen.

\expl{$>$ xprimage moffat}{make a hardcopy of Moffat's map}

\noindent As discussed under command {\tt hpd}, the command {\tt carte}
plots a cluster chart from the (x,y) rectangular positions and magnitude.
By default, {\tt carte} looks for the file {\it hipad.xy}. If none is
existing you can enter any other ---.xy filename.

Maps and charts can be displayed simultaneously on the screen.

\section{Cluster Selection}
\subsection{The command {\tt slm}}
It is sometimes useful to have a list of those clusters which 
have many stars observed in one kind of data, or to know which 
clusters lack data. The command {\tt slm} allows this kind of 
queries. The {\sf bda} directory contains a sub-directory {\sf contenu}
 which collects files (one per data type) containing the name of the
cluster, the number of stars and the number of measurements available. 
The selection is made only on the number of stars. This command may 
be run from anywhere in the database. It always needs at least one 
argument, i.e. the data type.


\expl{$>$ slm ubv}{lists the whole file.}

\expl{$>$ slm ubv -gt 200}{select the clusters having more than 200 
stars observed in UBV.}

\expl{$>$ slm gpo}{list the file containing the information 
on radial velocities from objective prism spectra.}

\expl{$>$ slm map}{list the cluster for which a scanned map is available}

\expl{$>$ slm ubv -histo}{display the UBV database content in a histogram.}

\expl{$>$ slm ubv 2287}{display the information for NGC 2287.}

\noindent It is also possible to answer the question: "Which are the clusters
that have at the same time red giants and DDO data" with the option -int
and the indication of both datatypes.

\expl{$>$ slm gk -int ddo}{list cluster with red giants and DDO data}

\expl{$>$ slm gk -int ddo ngc}{restrict the output to NGC clusters}

\noindent One can refine the intersection by setting a condition to the
first datatype, by asking, for example that te number of red giants must
be larger than ten.

\expl{$>$ slm -gt 10 gk -int ddo}{list cluster with at least 10 red giants 
and DDO data. No selection is made on the DDO data}

\expl{$>$ slm -gt 10 gk -int ddo ngc}{restrict the output to NGC clusters}

\noindent Finally, constraints can be placed on both selections to avoid
selecting clusters with many data in one datatype and few in the second one.

\expl{$>$ slm -gt 10 gk -int ddo -gt 10}{list cluster with at least 10 red 
giants and DDO data for at least 10 stars.}


\subsection{The command {\tt ocl}}
BDA offers also the possibility of performing selections on cluster 
parameters such as distance, reddening, age, diameter and equatorial or 
galactic coordinates, on the basis of the results catalogued by 
Lyng{\aa}. The command name is {\tt ocl}. The output is sorted by increasing 
order of the selected parameters.

\expl{$>$ ocl}{list the whole file, page by page.}

\expl{$>$ ocl Berkeley}{list the Berkeley clusters}

\expl{$>$ ocl d -lt 500}{select clusters nearer than 500 pc, 
and displays a list sorted by increasing distance.}

\expl{$>$ ocl l -i 0 90}{select clusters with galactic 
coordinates between 0$^o$ and 90$^o$ degrees.}

\expl{$>$ ocl lb -i 0 30 -5 5}{select clusters according to the 
conditions: 0$^o$ $<$ l $<$ 30$^o$, -5$^o$ $<$ b $<$ +5$^o$}

\expl{$>$ ocl -t d}{list the whole catalogue, sorted by increasing distance}

\noindent The permitted options are: -gt -lt -i, arguments are from the 
following list: 

\expl{alf \ dec \ ad}{right ascension and declination, or both.}

\expl{l \ b \ lb}{galactic coordinates or both,}

\expl{z}{distance from the galactic plane,}

\expl{d}{distance in pc,}

\expl{m-M}{distance modulus,}

\expl{ebv}{colour excess E(B-V),}

\expl{t}{log of the age,}

\expl{D}{cluster apparent diameter}

\noindent Try also {\tt emploi ocl} for further explanations and examples. 

\section{Statistics}
One can get statistical information on several topics.

For each data file, one can obtain the number of stars observed 
for each reference, using the option -d:

\expl{$>$ ngc 0129}{~}

\expl{$>$ ubv -d}{detailed content}

\expl{$>$ ubv -d 10}{detailed content, sources with more than 10 stars}

\expl{$>$ ubv -dr}{detailed content and references}

\noindent One can also obtain the number of data sources per star, and 
fix some cutoff level if necessary:

\expl{$>$ ubv -nb}{~}
     
\expl{$>$ ubv -nb 3}{select only those stars which have more 
than three UBV sources.}

\noindent One can also get global information on the database content:

\expl{$>$ stcn ubv}{display the number of stars and UBV measurements.}

\expl{$>$ stcn bda}{display a complete table of the database content.}

\section{Further commands}
\subsection{The command post}
The command {\tt post} has been designed to prepare data from the database
before sending them by mail. {\tt post} takes datatypes as arguments and
produce a file called {\it f.exp} written in the directory {\sf .T}.

{\tt post lyn tab ubv mk vsn}\\
\expl{~}{prepare a file containing a header and the required data, with the
references when relevant.}

\subsection{The command moyen}
The command {\tt moyen} is used to compute mean values for the UBV data
because no avera data are kept in the database. It takes a datatype as
argument.

\expl{$>$ moyen ubv}{compute mean ubv data}

The command first displays the detailed content of the file and asks
if weights are desired. If yes it presents each reference and ask for the
weight. It computes the mean values and displays a table showing the
number of stars with 1 or more data sources.

\subsection{The command olps}
The command {\tt olps} (one line per star) is designed to reduce the 
data to one line per star by a selection on the data sources. This
command is used for example to keep one position only (datatype pos)
or to prepare the file {\it mkk.sel}.

\expl{$>$ olps mk}{~}

\noindent The program first presents the detailed content and references
and asks for a list of references to consider. They should be entered by 
order of decreasing importance. It finally asks for the output filename.


\section{Alternative commands}
Other forms of some commands are also available which in principle 
shortens the answer delay. They require an indication of the type of data 
to be processed. No options are available. They are:

\begin{center}
{\tt meas list detail detref extrf compar slct}
\end{center}

\expl{$>$ meas ubv 1 2}{display the UBV data of star 1 and 2;
(identical to {\tt ubv 1 2}).}

\expl{$>$ list doo}{list the ddo data file; (identical to {\tt ddo}).} 

\expl{$>$ detail mk}{give the number of stars per reference;
(identical to {\tt mk -d}).}

\expl{$>$ detref vsn}{list in addition the relevant references; (identical to
{\tt vsn -dr}).}

\expl{$>$ extrf ubv 1341}{select the data from reference 1341
(identical to {\tt ubv ref -eq 1341}).}

\expl{$>$ compar ubv pgh}{start the program for comparing the UBV 
pe data with the pg ones; (identical to {\tt ubv -c pgh}).}

\expl{$>$ slct ubv v -lt 7.5}{select star with V $<$ 7.5; (identical
to {\tt ubv v -lt 7.5}).}


\chapter{The menu mode}
\section{Introduction}
The menu mode is more indicated when one wants to perform an action which is 
driven by a menu. Instead of remembering all menu names, it is easier to
look at the desired option. A second menu is often presented, and even as
third one may appear.

When the end of the action, a triple choice is sometimes presented:
{\tt continue (y/n/f)?}. If the answer is {\tt yes} the same menu is
proposed again. If {\tt no} is prefered, then the previous menu is
presented again, and finally the answer {\tt fin} made you quit the
whole process. 

In a cascade of menu, as for example the sequence {\tt go}, with selection
{\tt dsc} and {\tt doc}, when entering {\tt fin} to put an end to the work with
the menu, the previous menu appears again. Thus entering {\tt fin} to the
menu "doc" will come back to the calling menu "dsc". {\tt fin} to "dsc" will
finally bring the user back to the starting point "go".

\section{The menu go}
One possibility is to start with the main menu which offers a 
simple way to interrogate the database.

\noindent To display the main menu, enter:

\expl{$>$ go}{}
\begin{figure}

\caption{Listing of the menu "go"}

\begin{verbatim}
          Welcome to the Open Cluster Data Base 

          What do you want to do today?

          Look at the documentation on BDA  ........ dsc
          Query BDA interactively .................. bda
          Query BDA with a program ................. int
          Query the bibliography ................... bib
          Query the references ..................... ref
          Query Alter's bibliography ............... bdp
          Look at the man pages .................... man
          Look at the french manual ................ mnl
          Analyse the data ......................... ana
          Investigate a cluster .................... atp
          Plot photometric diagrams ................ pho
          Work on co-ordinates ..................... trc
          Update the Data Base ..................... maj
          Come back to the UNIX shell .............. sh 
          Look at the menu system information ...... hlp
          End of interrogation ..................... fin
\end{verbatim}
\end{figure}

A number of preliminary texts describe the database and they can 
be reached by answering "dsc" to the main menu choice
\expl{$>$ dsc}{displays the general menu}

\begin{verbatim}
          Which subject?                    doc
               Which subject?                 f
               Other information (y/n/f)?     y
               Which subject?                 n
                    Which subject?            1
                    Autre information?        y
                    Which subject?            2
                    Autre information?        n
               Which subject?               end
\end{verbatim}

The command {\tt bdp} may be started from the main menu: the action 
then corresponds to the syntax {\tt bdp} and one only gets a listing of 
the file.

\expl{$>$ go}{}
\begin{verbatim}
          Express your wish:     bdp
          For which cluster:     ngc/0457 
          suite (y/n)?           y
          For which cluster?     ngc/0581
          suite (y/n)?           n
          Express your choice:   fin
\end{verbatim}

\noindent {\tt lyn} can be called from the main menu "go". In this case 
one should give the complete name of the cluster, as for example: ngc/2516 or 
anon/tr16.

The main menu "go" offers a simple interactive interrogation for {\tt ref}.


\section{Other menus}

\chapter{The prompt mode}
\section{Starting and ending}
Enter {\tt dbms} to initiate the prompt mode. The program will display the
prompt bda> with the cluster name inside the prompt. It is ready
to work. An on-line help is offered each time a new prompt is presented 
to tell you about the allowed agents or parameters. What you enter at the
bda> prompt is not really a command, although the text is similar, but
what I called an agent. It does not execute the job, but the agent comes
behind the prompt and you can enter further information to perform the
action.

{\tt dbms} offers the option -v (verbose). If it is set, a comment line
is displayed at any new prompt to inform the user about the kind of entry
that is expected. 

The agent prompt is left by {\tt bye}, you should come back to bda>. If 
there are any parameter or star number you need to enter <return> or 0.
To end with the program, enter <return> or {\tt bye} at the prompt bda>.

When an agent is waiting for a cluster name, the default value is the
current cluster name. It is presented in square brackets. To get the 
information for another cluster, enter another cluster name.

\section{On-line help}
A help is provided at every level. If you enter {\tt help} (or simply h) at
the promp bda>, it will open a new window and you get the prompt
help> [dbms], dbms being the default value. It displays information about 
the program, and suggests to continue reading the text on bda, which in
turn proposes yo to continue with agent, to discover the allowed agents.

If you for example chose {\tt meas}, your prompt is now measure>. Typing 
{\tt help} will display a list of the datatypes for which you can get data. 
After you selected a datatype, let us say {\tt mk}, the prompt becomes
measure mk>. Entering {\tt help} again will inform you that the program is 
waiting for one or several star numbers. This help facility will guide
you at every prompt during your database query session.

It may be useful to keep the help window that is opened when you enter 
{\tt help} at the prompt bda> to look at the list of agents and get
information on them. You can also close it and you'll get an icone with the
label "BDA help". When you say {\tt bye} to the prompt help>, the window
will close.



\chapter{The graphical user interface}
\section{The panel "Interrogation"}
To use it, move first to a cluster directory, and enter {\tt xbda}. On-line 
help has been prepared for most buttons. To read it, locate the mouse cursor 
on the chosen button and press $<$help$>$ on the keyboard. Basically, the 
right hand settings define the type of data you want from the database, and
the command button executes the action. A dialogue line allows you to enter
star numbers when required. You can change of cluster by entering a 
cluster number, changing also from NGC to IC or anon (abbreviated menu 
button) and clicking on the button labelled "chdir". "Next" presents
either a menu or moves you to the next panel. "Quit" terminates the
work.


\end{document}
