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 | None, filters: str | IFilters | None = None, log_file: str | None = None, **kwargs: Any)¶
Bases:
Module
,IFlatField
,IBinning
,IFilters
Module 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 get_binning(**kwargs: Any) Tuple[int, int] [source]¶
Returns the camera binning.
- Returns:
Tuple with x and y.
- async get_filter(**kwargs: Any) str [source]¶
Get currently set filter.
- Returns:
Name of currently set filter.
- async get_motion_status(device: str | None = None, **kwargs: Any) MotionStatus [source]¶
Returns current motion status.
- Parameters:
device – Name of device to get status for, or None.
- Returns:
A string from the Status enumerator.
- async init(**kwargs: Any) None [source]¶
Initialize device.
- Raises:
InitError – If device could not be initialized.
- async is_ready(**kwargs: Any) bool [source]¶
Returns the device is “ready”, whatever that means for the specific device.
- Returns:
Whether device is ready
- 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 | ITelescope, 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: 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