panoptes.pocs.scheduler.observation package

Submodules

panoptes.pocs.scheduler.observation.base module

Observation base classes and types for the scheduler.

Defines the Exposure record and the Observation class used by the scheduler to represent an observing block (target field, exposure timing/sets, and progress).

class panoptes.pocs.scheduler.observation.base.Exposure(image_id: str, path: Path, metadata: dict, is_primary: bool = False)[source]

Bases: object

Metadata for a single exposure produced during an observation.

image_id: str
is_primary: bool = False
metadata: dict
path: Path
class panoptes.pocs.scheduler.observation.base.Observation(field: Field, exptime: float | Quantity | None = None, min_nexp: int = 60, exp_set_size: int = 10, priority: int | float = 100, filter_name: str | None = None, dark: bool = False, constraints: list | None = None, tags: list[str] | None = None, *args, **kwargs)[source]

Bases: PanBase

Represents a scheduled observing block for a specific field.

Tracks exposure configuration (exptime, set size, counts), progress, and metadata such as priority and filter. Provides helpers for status, paths, and serialization used by the scheduler and cameras.

add_to_exposure_list(cam_name: str, exposure: Exposure)[source]

Add the exposure to the list and mark as most recent

property current_exp_num: int

Return the current number of exposures.

Returns the maximum size of the exposure list from each camera.

Returns:

The size of self.exposure_list.

Return type:

int

property directory: Path

Return the directory for this Observation.

This return the base directory for the Observation. This does not include the subfolders for each of the cameras.

Returns:

Full path to base directory.

Return type:

str

exposure_list: dict[str, list[Exposure]]
property exptime

Exposure time per image for this observation (Quantity in seconds).

property exptimes

Exposure time as a list.

property first_exposure: list[dict[str, Exposure]] | None

Return the first exposure information.

Returns:

image_id and full path of the first exposure from the primary camera.

Return type:

tuple

classmethod from_dict(observation_config: dict, field_class='panoptes.pocs.scheduler.field.Field', observation_class='panoptes.pocs.scheduler.observation.base.Observation')[source]

Creates an Observation object from config dict.

Parameters:
  • observation_config (dict) – Configuration for Field and Observation.

  • field_class (str, optional) – The full name of the python class to be used as default for the observation’s Field. This can be overridden by specifying the “type” item under the observation_config’s “field” key. Default: panoptes.pocs.scheduler.field.Field.

  • observation_class (str, optional) – The full name of the python class to be used as default for the observation object. This can be overridden by specifying the “type” item under the observation_config’s “observation” key. Default: panoptes.pocs.scheduler.observation.base.Observation.

get_exposure(number: int = 0) list[dict[str, Exposure]] | None[source]

Returns the given exposure number.

property last_exposure: list[dict[str, Exposure]] | None

Return the latest exposure information.

Returns:

image_id and full path of most recent exposure from the primary camera

Return type:

tuple

property minimum_duration

Minimum amount of time to complete the observation

property name

Name of the ~pocs.scheduler.field.Field associated with the observation.

property pointing_image

Return the last pointing image.

Returns:

image_id and full path of most recent pointing image from

the primary camera.

Return type:

tuple

pointing_images: dict[str, Path]
reset()[source]

Resets the exposure information for the observation

property seq_time

The time at which the observation was selected by the scheduler.

This is used for path name construction.

property set_duration

Amount of time per set of exposures.

property set_is_finished

Check if the current observing block has finished, which is True when the minimum number of exposures have been obtained and and integer number of sets have been completed. :returns: True if finished, False if not. :rtype: bool

property status: dict

Observation status.

Returns:

Dictionary containing current status of observation.

Return type:

dict

to_dict()[source]

Serialize the object to a dict.

panoptes.pocs.scheduler.observation.bias module

Bias frame observation helper.

Constructs a zero-exposure (bias) observation block with configuration-driven counts and set size, storing results under an images/bias subdirectory.

class panoptes.pocs.scheduler.observation.bias.BiasObservation(position, min_nexp=None, exp_set_size=None)[source]

Bases: Observation

Observation subclass for taking a set of bias frames.

panoptes.pocs.scheduler.observation.compound module

Compound observation that cycles through a set of exposure times.

class panoptes.pocs.scheduler.observation.compound.Observation(*args, **kwargs)[source]

Bases: Observation

An observation that consists of different combinations of exptimes.

property exptime

Return current exposure time as a u.Quantity.

property exptimes

The sequence of exposure times to cycle through.

Type:

List[Quantity | float]

classmethod from_dict(*args, **kwargs)[source]

Creates an Observation object from config dict.

panoptes.pocs.scheduler.observation.dark module

Dark frame observation helper.

Constructs a dark observation consisting of a sequence of configured exposure lengths, saving outputs under an images/dark subdirectory.

class panoptes.pocs.scheduler.observation.dark.DarkObservation(position, exptimes=None)[source]

Bases: Observation

Observation subclass for taking a set of dark frames.

property exptime

Return current exposure time as a u.Quantity.

Module contents