driver.py

Module for executing AstroQ functions based on command line interface inputs.

astroq.driver.bench(args)[source]

Benchmark the AstroQ pipeline using a toy model.

Parameters:

args (argparse.Namespace) – the command line arguments with flags: -cf (str): the path to the config file. -ns (int): the number of slots needed to complete each of the single shot requests in program 6. -thin (int): the factor to thin the request frame by (for very fast testing).

Returns:

None

astroq.driver.kpfcc_prep(args)[source]

Prepare the KPF-CC program for a new semester. This function is specific to the KPF-CC program and the observatory’s infrastructure. If you are adapting AstroQ for a new observatory, you will need to write your own module to connect to a new prep <your observatory> command.

Parameters:

args (argparse.Namespace) – the command line arguments with flags: -cf (str): the path to the config file. -band_number (int): the band number to filter the request.csv by. -is_full_band (bool): whether this is a full-band that should update allocation.csv. -allo_source (str): the source of the allocation information, either ‘db’ or a file path. -past_source (str): the source of the past history information, either ‘db’ or a file path. -request_source (str): the source of the request information, either ‘db’ or a file path. -filler_programs (str): the semester ID for the filler program. Ex. 2025B_E473.

Returns:

None

astroq.driver.kpfcc_webapp(args)[source]

Launch web app to view interactive plots.

Parameters:

args (argparse.Namespace) – the command line arguments with flags: -uptree_path (str): the path to the uptree directory below which the folder structure is <semester_code>/<date>/<band>/.

Returns:

None

astroq.driver.plan_night(args)[source]

Run the slew path optimization using the TTP package for a given night’s selected targets.

Parameters:

args (argparse.Namespace) – the command line arguments with flags: -cf (str): the path to the config file.

Returns:

None

astroq.driver.plan_semester(args)[source]

Run the core optimization algorithm for determining what stars to observe on what nights.

Parameters:

args (argparse.Namespace) – the command line arguments with flags: -cf (str): the path to the config file. -run_band3 (bool): whether to run the band 3 filler program.

Returns:

None

astroq.driver.plot(args)[source]

Generate html and png files of the standard AstroQ output plots. Mirrors those produced by the webapp.

Parameters:

args (argparse.Namespace) – the command line arguments with flags: -cf (str): the path to the config file.

Returns:

None

astroq.driver.requests_vs_schedule(args)[source]

Compare the request.csv file to the schedule.csv file to ensure that the schedule is valid. This is a sanity check to ensure that the schedule is not violating any of the constraints.

Parameters:

args (argparse.Namespace) – the command line arguments with flags: -cf (str): the path to the config file. -schedule_file (str): the path to the schedule file.

Returns:

None