Flatfielding (pyobs.modules.flatfield)
Modules for performing flatfields. TODO: write doc
FlatField
- class FlatField(telescope: str | ITelescope, camera: str | ICamera, flat_fielder: dict[str, Any] | FlatFielder, filters: str | IFilters | None = None, log_file: str | None = None, **kwargs: Any)
Bases:
Module,IFlatField,IBinning,IFiltersModule for auto-focusing a telescope.
Initialize a new flat fielder.
- Parameters:
telescope – Name of ITelescope.
camera – Name of ICamera.
flat_fielder – Flat field object to use.
filters – Name of IFilters, if any.
log_file – Name of file to store flat field log in.
- async callback(datetime: str, solalt: float, exptime: float, counts: float, filter_name: str, binning: tuple[int, int]) None[source]
Callback for flat-field class to call with statistics.
- async flat_field(count: int = 20, **kwargs: Any) tuple[int, float][source]
Do a series of flat fields in the given filter.
- Parameters:
count – Number of images to take
- Returns:
Number of images actually taken and total exposure time in ms
- async init(**kwargs: Any) None[source]
Initialize device.
- Raises:
InitError – If device could not be initialized.
- async list_binnings(**kwargs: Any) list[tuple[int, int]][source]
List available binnings.
- Returns:
List of available binnings as (x, y) tuples.
- async list_filters(**kwargs: Any) list[str][source]
List available filters.
- Returns:
List of available filters.
- async park(**kwargs: Any) None[source]
Park device.
- Raises:
ParkError – If device could not be parked.
- async set_binning(x: int, y: int, **kwargs: Any) None[source]
Set the camera binning.
- Parameters:
x – X binning.
y – Y binning.
- Raises:
ValueError – If binning could not be set.
FlatFieldPointing
- class FlatFieldPointing(telescope: str | IPointingAltAz, pointing: dict[str, Any] | SkyFlatsBasePointing, **kwargs: Any)
-
Module for pointing a telescope.
Initialize a new flat field pointing.
- Parameters:
telescope – Telescope to point
pointing – Pointing for calculating coordinates.
FlatFieldScheduler
- class FlatFieldScheduler(flatfield: str | IFlatField, functions: str | dict[str, str | dict[str, str]], priorities: dict[str, Any] | SkyflatPriorities, min_exptime: float = 0.5, max_exptime: float = 5, timespan: float = 7200, filter_change: float = 30, count: int = 20, **kwargs: Any)
-
Run the flat-field scheduler.
Initialize a new flat field scheduler.
- Parameters:
flatfield – Flat field module to use
functions – Dict with flat functions
priorities – Class handling priorities
min_exptime – Minimum exposure time [s]
max_exptime – Maximum exposure time [s]
timespan – Time to scheduler after start [s]
filter_change – Time required for filter change [s]
count – Number of flats to take per filter/binning