Auto-guiding (pyobs.modules.pointing)
Modules for performing auto-guiding. TODO: write doc
BasePointing
- class BasePointing(camera: str | ICamera, telescope: str | ITelescope, pipeline: list[dict[str, Any] | ImageProcessor], apply: dict[str, Any] | ApplyOffsets, **kwargs: Any)
Bases:
Module,PipelineMixinBase class for guiding and acquisition modules.
Initializes a new base pointing.
- Parameters:
telescope – Telescope to use.
pipeline – Pipeline steps to run on new image. MUST include a step calculating offsets!
apply – Object that handles applying offsets to telescope.
Acquisition
- class Acquisition(exposure_time: float, target_pixel: tuple[float, float] | None = None, attempts: int = 5, tolerance: float = 1, max_offset: float = 120, log_file: str | None = None, oneshot: bool = False, broadcast: bool = False, **kwargs: Any)
Bases:
BasePointing,CameraSettingsMixin,IAcquisitionClass for telescope acquisition.
Create a new acquisition.
- Parameters:
exposure_time – Default exposure time.
target_pixel – (x, y) tuple of pixel that the star should be positioned on. If None, center of image is used.
attempts – Number of attempts before giving up.
tolerance – Tolerance in position to reach in arcsec.
max_offset – Maximum offset to move in arcsec.
log_file – Name of file to write log to.
oneshot – For a oneshot the number of attempts is automatically set to 1 and the method finishes whether successful or not.
broadcast – Whether to broadcast acquisition images.
- async acquire_target(**kwargs: Any) AcquisitionResult[source]
Acquire target at given coordinates.
If no RA/Dec are given, start from current position. Might not work for some implementations that require coordinates.
- Returns:
Result with time, ra, dec, alt, az, and an offset in whichever frame the mount supports.
- Raises:
ValueError – If target could not be acquired.
BaseGuiding
- class BaseGuiding(max_exposure_time: float | None = None, min_interval: float = 0, max_interval: float = 600, separation_reset: float | None = None, pid: bool = False, reset_at_focus: bool = True, reset_at_filter: bool = True, guiding_statistic: dict[str, Any] | GuidingStatistics[Any, Any] | None = None, **kwargs: Any)
Bases:
BasePointing,IAutoGuiding,IFitsHeaderBefore,IFitsHeaderAfterBase class for guiding modules.
Initializes a new science frame auto guiding system.
- Parameters:
max_exposure_time – Maximum exposure time in sec for images to analyse.
min_interval – Minimum interval in sec between two images.
max_interval – Maximum interval in sec between to consecutive images to guide.
separation_reset – Min separation in arcsec between two consecutive images that triggers a reset.
pid – Whether to use a PID for guiding.
reset_at_focus – Reset guiding, if focus changes.
reset_at_filter – Reset guiding, if filter changes.
- async get_fits_header_after(namespaces: list[str] | None = None, **kwargs: Any) dict[str, FitsHeaderEntry][source]
Returns FITS header for the current status of this module.
- Parameters:
namespaces – If given, only return FITS headers for the given namespaces.
- Returns:
Dictionary containing FITS headers.
- async get_fits_header_before(namespaces: list[str] | None = None, **kwargs: Any) dict[str, FitsHeaderEntry][source]
Returns FITS header for the current status of this module.
- Parameters:
namespaces – If given, only return FITS headers for the given namespaces.
- Returns:
Dictionary containing FITS headers.
GuidingStatistics
BaseGuiding’s guiding_statistic parameter takes a
GuidingStatistics subclass
(e.g. GuidingStatisticsSkyOffset, GuidingStatisticsPixelOffset, GuidingStatisticsUptime).
- class GuidingStatistics[source]
Calculates statistics for guiding.
- add_data(input_data: IN) None[source]
Adds data to all client measurement sessions. :Parameters: input_data – Image witch metadata
- add_to_header(client: str, header: dict[str, FitsHeaderEntry]) dict[str, FitsHeaderEntry][source]
Add statistics to given header.
- Parameters:
client – id/name of the client
header – Header dict to add statistics to.
AutoGuiding
- class AutoGuiding(exposure_time: float = 1.0, broadcast: bool = False, **kwargs: Any)
Bases:
BaseGuiding,CameraSettingsMixinAn auto-guiding system.
Initializes a new auto guiding system.
- Parameters:
exposure_time – Initial exposure time in seconds.
broadcast – Whether to broadcast new images.
ScienceFrameAutoGuiding
- class ScienceFrameAutoGuiding(**kwargs: Any)
Bases:
BaseGuidingAn auto-guiding system based on comparing collapsed images along the x&y axes with a reference image.
Initializes a new science frame auto guiding system.
DummyAutoGuiding
- class DummyAutoGuiding(exposure_time: float = 1.0, interval: float = 2.0, **kwargs: Any)
Bases:
Module,IAutoGuidingAn auto-guiding system.
Create a new dummy auto-guiding system.
- Parameters:
exposure_time – Initial exposure time, in seconds.
interval – Time between simulated guide corrections, in seconds.
- async set_exposure_time(exposure_time: float, **kwargs: Any) None[source]
Set the exposure time in seconds.
- Parameters:
exposure_time – Exposure time in seconds.
- Raises:
ValueError – If exposure time could not be set.
NotSupportedError – If this module doesn’t support setting exposure time directly (e.g. it’s dictated by something else, like incoming science frames).