NAME:
occplotlc
PURPOSE: (one line only)
Plot a single site lightcurve from an occultation dataset
DESCRIPTION:
CATEGORY:
Occultations
CALLING SEQUENCE:
occplotlc,team,binfac
INPUTS:
team - name of the team to process (needs to match database or file)
OPTIONAL INPUT PARAMETERS:
binfac - optional when there is data from only one binning factor recorded
in the database. If there are two, this must be specified.
Having two is rare but possible.
KEYWORD INPUT PARAMETERS:
FNCONFIG - name of configuration file (default is config.ini)
FNXTRACK - Name of the file with the crosstrack position information,
default='crosstrack.dat'
FNSITES - Name of the file with the site locations.
default='sites.dat'
NOSAVE - Flag if set suppresses saving the final graphics
EXTERNAL - Flag, if set the binfac is forced to 1 and it is assumed that
a lightcurve file is already present with the right file
name to be read and processed. This is used to bring in
externally generated lightcurves (like from IOTA).
REGEN - Flag, if set, will regenerate the lightcurve in case the database
has changed since the last run. This flag and EXTERNAL are
mutually exclusive.
OUTPUTS:
KEYWORD OUTPUT PARAMETERS:
CONFIGURATION:
File: config.ini (default)
[global]
event - string with short ID name of event (ex: OR20200914)
dir - relative directory for this data set added to the root dir
date - YYYY-MM-DD both date and directory name part of path
xrange - val1 val2 (xrange, 0 0 means full range)
[TEAM] - name of the team (input variable)
xrange - override on value in [global]
[ddir] - section to list potential root directories to find data
XXX -
XXX is a unique string (eg., D01)
is a directory path
for additional details see getddir.pro
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
PROCEDURE:
The real purpose of this routine is to create and save the lightcurve
to a file. It is plotted as well but occtime.pro is a far more
important lightcurve analysis tool. The plotting this tool does is
just for reassurances.
The lightcurve files have the form of _binfac.dat, Example:
T81_2.dat would be a lightcurve from team T81 with a binning factor
of two. If the binning factor is one, the name is just .dat
If there are lightcurves using multiple binning factors for the same
team, the database setting selects which to use unless you override
with the BINFAC keyword.
MODIFICATION HISTORY:
Written by Marc W. Buie, Southwest Research Institute, 2020/09/24
2021/12/03, MWB, added REGEN, FNCONFIG keywords
2023/03/19, MWB, converted to use sites.dat instead of chords.dat
Also changed to write the lightcurve file with JD not
the time of day in seconds