panoptes.utils.cli namespace

Submodules

panoptes.utils.cli.config module

Typer commands for the config server.

panoptes.utils.cli.config.config_getter(key: str | None = <typer.models.ArgumentInfo object>, host: str = <typer.models.OptionInfo object>, port: int = <typer.models.OptionInfo object>, default: str | None = <typer.models.OptionInfo object>, parse: bool = <typer.models.OptionInfo object>) None[source]

Get a config value by dotted key name (e.g. ‘location.elevation’).

Returns the entire config if no key is given.

panoptes.utils.cli.config.config_setter(key: str = <typer.models.ArgumentInfo object>, new_value: str = <typer.models.ArgumentInfo object>, host: str = <typer.models.OptionInfo object>, port: int = <typer.models.OptionInfo object>, parse: bool = <typer.models.OptionInfo object>) None[source]

Set a config value by dotted key name (e.g. ‘location.elevation’).

panoptes.utils.cli.config.run(host: str = <typer.models.OptionInfo object>, port: int = <typer.models.OptionInfo object>, config_file: str = <typer.models.OptionInfo object>, load_local: bool = <typer.models.OptionInfo object>, save_local: bool = <typer.models.OptionInfo object>, heartbeat: float = <typer.models.OptionInfo object>, startup_timeout: float = <typer.models.OptionInfo object>) None[source]

Run the config server and block until it stops.

panoptes.utils.cli.config.stop(host: str = <typer.models.OptionInfo object>, port: int = <typer.models.OptionInfo object>) None[source]

Stop the config server.

panoptes.utils.cli.image module

panoptes.utils.cli.image.cr2_to_fits(cr2_fname: Path, fits_fname: str = None, overwrite: bool = True, remove_cr2: bool = False) Path[source]

Convert a CR2 image to a FITS, return the new path name.

panoptes.utils.cli.image.cr2_to_jpg(cr2_fname: Path, jpg_fname: str = None, title: str = '', overwrite: bool = False, remove_cr2: bool = False) Path | None[source]

Extract a JPG image from a CR2, return the new path name.

Parameters:
  • cr2_fname (Path) – Path to the CR2 file.

  • jpg_fname (str) – Path to the JPG file.

  • title (str) – Title to use for the JPG file.

  • overwrite (bool) – Overwrite existing JPG file.

  • remove_cr2 (bool) – Remove the CR2 file after conversion.

panoptes.utils.cli.image.solve_fits(fits_fname: Path, **kwargs) Path | None[source]

Plate-solve a FITS file.

panoptes.utils.cli.image.watch_directory(path: Path, to_jpg: bool = True, to_fits: bool = True, solve: bool = True, overwrite: bool = False, remove_cr2: bool = False) None[source]

Watch a directory for changes and process any new files.

The files will be processed according to the boolean flags, with the flag names corresponding to other image commands.

By default, all the flags are enabled, which will:

  • Extract JPG files from a CR2.

  • Convert CR2 files to FITS.

  • Plate-solve FITS files.

panoptes.utils.cli.main module

panoptes.utils.cli.main.main(verbose: bool = False)[source]

PANOPTES Utilities CLI.

Parameters:

verbose – Enable DEBUG-level logging. Defaults to False (INFO level).

panoptes.utils.cli.telemetry module

Typer commands for the telemetry server.

panoptes.utils.cli.telemetry.current(event_type: str | None = <typer.models.ArgumentInfo object>, host: str = <typer.models.OptionInfo object>, port: int = <typer.models.OptionInfo object>, follow: bool = <typer.models.OptionInfo object>, interval: float = <typer.models.OptionInfo object>) None[source]

Display the current telemetry reading.

panoptes.utils.cli.telemetry.run(host: str = <typer.models.OptionInfo object>, port: int = <typer.models.OptionInfo object>, site_dir: Path = <typer.models.OptionInfo object>, heartbeat: float = <typer.models.OptionInfo object>, startup_timeout: float = <typer.models.OptionInfo object>, verbose: bool = <typer.models.OptionInfo object>) None[source]

Run the telemetry server and wait for readiness.

panoptes.utils.cli.telemetry.stop(host: str = <typer.models.OptionInfo object>, port: int = <typer.models.OptionInfo object>) None[source]

Stop the telemetry server via the shutdown endpoint.