Observation Planning

FunctionDescription
night_observability(facility, ra, dec, date)Compute observability windows, moon separation, etc.
best_pop(facility, dec, ha, config)Find best POP configurations for a target
print_pop_results(facility, config, results)Pretty-print best_pop results
obs_plan(target, facility, ra, dec, date, pop, config)Gantt-style observability plot
chara_plan(target, facility, ra, dec, date, pop, config)CHARA-plan style delay plot
compute_delays(facility, dec, ha, pop, config)Compute OPD delays for given POP/config
in_delay(facility, dec, ha, pop, config)Check which baselines are within delay limits
moon_illumination(jd)Fractional lunar illumination for a Julian Date
moon_radec(jd)Approximate lunar RA/Dec for a Julian Date
angular_separation(ra1, dec1, ra2, dec2)Angular separation in degrees
OITOOLS.night_observabilityFunction
night_observability(facility, ra, dec, obsdate; alt_limit=30.0, alt_max=90.0,
                    moon_min_sep=30.0, dark_offset=0.0, step_minutes=1)

Compute the observability grid for a target on a given night. Internally uses Float32 for LST, HA, alt, az arrays.

Returns a NamedTuple with fields:

  • utc: UTC hours vector (Float64)
  • lst: local sidereal time, hours (Float32)
  • ha: hour angle, hours (Float32)
  • alt: altitude, degrees (Float32)
  • az: azimuth, degrees (Float32)
  • lst_midnight: LST at local midnight (Float64)
  • good_alt: indices where alt_limit < alt < alt_max
  • moon_sep: Moon–target separation, degrees (Float32)
  • moon_fli: fractional lunar illumination (Float64, single value for the night)
  • good_moon: indices where moon_sep > moon_min_sep

Arguments:

  • facility: FacilityConfig (provides lat, lon)
  • ra: right ascension in degrees
  • dec: declination in degrees
  • obsdate: DateTime of the observing evening
  • alt_limit: minimum elevation in degrees (default 30)
  • alt_max: maximum safe elevation in degrees (default 90, e.g. 80 for CHARA)
  • moon_min_sep: minimum Moon separation in degrees (default 30)
  • dark_offset: hours after sunset / before sunrise for deeper twilight (default 0)
  • step_minutes: time resolution in minutes (default 1)
source
OITOOLS.best_popFunction
best_pop(facility, dec, ha, config; n_best=5, min_minutes=10, delay_length=nothing)

Brute-force search over all POP combinations.

Returns a vector of NamedTuples (pop, score) sorted by score (minutes observable), keeping up to n_best results with score ≥ min_minutes.

Arguments:

  • config: telescope configuration (0/1/2); only telescopes with config>0 are used
  • n_best: number of top solutions to return
  • min_minutes: discard solutions below this threshold
  • delay_length: override per-telescope delay limits with a uniform value (m)
source
OITOOLS.obs_planFunction
obs_plan(targetname, facility, ra, dec, obsdate, pop, config;
         alt_limit=30.0, alt_max=90.0, delay_length=nothing,
         dark_offset=0.0, step_minutes=1, figsize=(10,5), savefile="")

Produce a Gantt-style observability plot for one target on one night, showing dark time, altitude window, and delay feasibility.

Pass delay_length=43.0 for a conservative delay estimate. Pass savefile="path.png" to save to file and close the figure.

source
OITOOLS.chara_planFunction
chara_plan(targetname, facility, ra, dec, obsdate, pop, config;
           alt_limit=30.0, alt_max=90.0, delay_length=nothing,
           dark_offset=0.0, step_minutes=1)

Produce a delay-vs-LST plot with altitude overlay, similar to the classic chara_plan software from GSU.

Each baseline's delay cart position is plotted vs LST, with the altitude curve and elevation limit overlaid.

Pass delay_length=43.0 for a conservative delay estimate.

source
OITOOLS.compute_delaysFunction
compute_delays(facility, dec, ha, config, pop; pop_array=CHARA_POP_ARRAY, airpath=CHARA_AIRPATH)

Compute delay cart positions for all baselines over a time grid.

Returns (delay_carts, nbaselines, baseline_names, baseline_stations) where delay_carts is nbaselines × length(ha).

Arguments:

  • facility: FacilityConfig
  • dec: declination in degrees
  • ha: hour angle vector (hours)
  • config: telescope configuration vector (0=unused, 1=use, 2=reference)
  • pop: POP assignment vector (one per telescope)
source
OITOOLS.in_delayFunction
in_delay(facility, dec, ha, config, pop; delay_length=nothing, kwargs...)

Determine when the target is within delay-line limits for all baselines.

Returns a NamedTuple with:

  • delay_carts: delay cart positions (nbaselines × ntimes)
  • has_delay: BitVector, true where all baselines are within limits
  • good_delay: indices into the time grid where observing is feasible
  • nbaselines, baseline_names, baseline_stations

The per-telescope delay limits come from facility.delay_lengths. Pass delay_length=43.0 to override with a uniform (conservative) value.

source
OITOOLS.moon_radecFunction
moon_radec(jd)

Low-precision Moon RA/Dec (degrees) for a given Julian Date. Accuracy ~1° in position — sufficient for separation checks.

source

Simulation

FunctionDescription
simulate(facility, target, combiner, wave, dates, outfile)Simulate observations from array geometry
simulate_from_oifits(infile, outfile)Simulate using UV coverage of an existing OIFITS file
get_uv(facility, target, combiner, wave, dates)Compute UV coordinates for a given setup
read_facility_file(file)Read facility configuration (TOML)
read_obs_file(file)Read target configuration (TOML)
read_comb_file(file)Read combiner configuration (TOML)
read_wave_file(file)Read wavelength configuration (TOML)
gantt_onenight(facility, target, date)Observation planning Gantt chart
sunrise_sunset(facility, date)Sunrise/sunset times for a facility
alt_az(ha, dec, lat)Hour angle to altitude/azimuth
opd_limits(facility, target, ha)Delay-line OPD limits
TypeDescription
FacilityConfigArray facility configuration (telescopes, positions, atmosphere)
TargetConfigTarget configuration (coordinates, proper motion)
CombinerConfigBeam combiner configuration (throughput, noise, calibration)
WaveConfigWavelength/spectral configuration