	These are the installation/operating instructions for Roche
version 1.4 (12/24/03).

	There are two .tgz's in the top directory of my Atlas account: 
Limbdarkening.tgz and Roche_1.4-12_24_03.tgz.  Get them and put them 
somewhere where they can't hurt anything.  The second one will create a 
directory called Roche_1.4/.  Do that.  

	Then put the LimbDarkening one into that directory (and make 
sure that link to LimbDarkening has been "rm -rf"'d) and untar 
LimbDarkening.tgz.  It will create the necessary subdirectory for the 
model atmosphere data (plus lots of other stuff you won't need - but 
it's the models that take up the room).  

	Make sure that the Makefile is the correct one - copy 
Makefile.atlas into Makefile.  Then "make roche".  Assuming all you get 
are the handfull of warnings I see, try "Roche Vega 17".  When it 
asks, say you want to "s" (See) it.  You should be thrilled and 
delighted.


	More general instructions:  The command line really has two 
modes.  The one you used, above, tells Roche that you want to do a 
polychromatic calculation ("17" means do channels 0-16, "32" is maximum).  
That only makes sense if you mean to do visibility curve simulations and 
the code looks for the relevant baseline, plotting, etc information to 
do complete triangle calculations.  (Doing individual baselines without 
closure quantities is on the drawing board).  More on this kind of 
calculation below.

	If on the command line the integer is negative, 0, or a number 
larger than 32 you go into monochromatic mode.  A negative integer 
between from -1 to -32 means do the monochromatic calculations at that 
NPOI channel wavelength.  "0" means 500nm.  Anything smaller 
than -32 or larger than 32 means take the absolute value as a 
wavelength in nanometers.  Monochromatic limb-darkening coefficients 
are only available between 300 - 10,000nm (0.3 to 10 microns).  If you 
are outside that range it will complain and quit (I think).  If you are 
inside that range but not exactly at a tabulated wavelength, it 
interpolates between tabulated points.  The limbdarkening coefficients 
in this mode are only 10nm wide averages so be careful about over 
interpreting the results.

	In monochromatic mode the first thing the code does is 
calculate a variety of quantities about the star and its rotational 
characteristics.  The data are taken from the model data file 
("Vega.dat" in the above case) and from the inclinations file.  One set 
of these quantities is calculated for each inclination.

	The inclinations file is simply a list of the inclination, 
fractional angular velocity and angular size of the polar diameter on 
each line (keep the labels on each variable intact and in place).  The 
first line tells how many to use (max of 10), any more lines than that 
won't be read.  

	After model data are calculated you will be asked if you want 
to see the spheroid.  Answering yes and giving it a Position Angle will 
take you through the same set of inclinations, etc with the false color 
drawings you've seen.  I have a contouring program that can replace the 
false color, but haven't integrated it into the options list yet.  
During this you may see the code complaining about convergence.  If you 
look at the numbers you'll see a variable called "adr".  Convergence is 
achieved when adr gets below 10^-5 and invariably it's only barely 
missing that criterion.  Worry if it misses by a lot.

	That's it for monochromatic mode.  The remaining things to know 
affect the interferometer simulations.  All the parameters for a 
calculation are contained in four flat files.  I've already described 
the "inclinations" file.  

	There are .dat files for the stars,  In the above, we used 
Vega.dat.  On the command line you only use the star name, it fills in 
the ".dat".  In those files it expects to find: a name, mass (solar), 
radius (solar), Teff (K), which limb-darkening law to use ("Sqrt"), 
which wavelength set to use ("Reg"), which instrument is involved 
("NPOI", this is not trivial since I'm working up PTI, too), RA, Dec 
and epoch of the star.  These were originally in the program so the 
key words look a little weird, but keep them intact, change only the 
variable values.  (Order is not important).

	The "baselines" file brings in instrument data.  First the 
latitude, longitude and alititude, then the number of apertures 
involved followed by their specifications.  The names can be up to 
three characters each, I think.  Index values are important because the 
line(s) after the last aperture spec give(s) specifications for the 
closure triangles and the ordering of the indices sets the signs on the 
phase angles and the order in which the baselines are plotted.  
Examples of other baselines files can be found in the "FlatFiles" 
subdirectories.  In particular, you can have more than one triangle 
(more than three baselines) specified, consistent with how the 
spectrographs are set up.  Ordering is important in this file.

	Finally there is the "plot" file.  Here you can set whether you 
want plots by wavelength or channel number (IfWave).  The main function 
is to lay out the choices of Position Angles plotted.  This is done in 
two levels.  There are "Position Angle Groups" (iPAnot of them, <=6).  
When this index is changed you go to a new plot page.  These angles are 
set individually and are the zeros for the second level.  The idea is 
that you can identify several specific PA regions you want to inspect.  
You set the beginning points of each of those regions using the Group 
values above and then set a "delta" value and index (fPAdel, iPAdel 
<= 6) to fine step through each region.  

	The exact plots that are produced are controlled by the IfPlot 
parameter.  It binary encodes whether for each PA group and triangle 
you want to see the Summary page (1), and/or various full page version 
of plots from the summary page: Closure phase/amplitude (2), the three 
baseline visibilities (squared) separately (4) or the three baseline 
phases separately (8).  0 is off, 1 is on.  For example if you wanted 
to see the summary page and the details on closure phase/amplitude, 
IfPlot=3.  If you wanted to skip the summary page, closure information 
and just wanted the individual baseline squared visibilities and 
phases, IfPlot=12.  And so forth.  IfPlot=0 produces no output but uses 
up a lot of cpu.

        Normally you want to look at the plots in real time, in which
case you choose "S" (See) when asked.  Note that this assumes certain
environment variables are set for PGPLOT.  The settings I use (tcsh)
are:

	setenv PGPLOT_DEV /xwin
	setenv PGPLOT_DIR /usr/local/pgplot
	setenv PGPLOT_FOREGROUND black
	setenv PGPLOT_BACKGROUND white

but directories (and taste) may vary.

	If you want hard copy (you choose "Plot" instead of "See") the 
routine will give you separate files only as it changes the inclination 
index.  All other plots you've asked for become individual pages in a 
file for that specific inclination.

	I think that's it.  Ask if it isn't clear.

						Deane
