Events (pyobs.events)
TODO: write doc
BadWeatherEvent
Event
ExposureStatusChangedEvent
- class ExposureStatusChangedEvent(current: ExposureStatus, last: ExposureStatus | None = None, **kwargs: Any)
Event to be sent, when the exposure status of a device changes.
FileWrittenEvent
- class FileWrittenEvent(filename: str, **kwargs: Any)
Event to be sent after a file has been written to its destination.
The filename is a VFS path, not a local path, so a receiver needs the same VFS root to open the file.
Initializes new FileWrittenEvent.
- Parameters:
filename – VFS name of the written file.
FilterChangedEvent
FocusFoundEvent
GoodWeatherEvent
LogEvent
ModeChangedEvent
ModuleClosedEvent
ModuleOpenedEvent
MotionStatusChangedEvent
- class MotionStatusChangedEvent(status: MotionStatus, interfaces: dict[str, MotionStatus] | None = None, **kwargs: Any)
Event to be sent when the motion status of a device has changed.
MoveAltAzEvent
MoveEvent
MoveRaDecEvent
NewDataEvent
- class NewDataEvent(filename: str, **kwargs: Any)
Event to be sent on new data, e.g. a file that is neither an image nor a spectrum.
filenameis a VFS path.NewImageEventandNewSpectrumEventderive from this class, so a handler registered forNewDataEventalso receives those; usetype(event) is NewDataEventto select only generic data. RegisteringNewDataEventwithout a handler declares only this class as sent, not the derived events.Initializes new NewDataEvent.
- Parameters:
filename – Name of new data file.
NewImageEvent
- class NewImageEvent(filename: str, image_type: ImageType | None = None, raw: str | None = None, **kwargs: Any)
Event to be sent on a new image.
Initializes new NewImageEvent.
- Parameters:
filename – Name of new image file.
image_type – Type of image.
raw – Only for reduced images, references raw frame.
NewSpectrumEvent
OffsetsAltAzEvent
OffsetsEvent
OffsetsRaDecEvent
RoofClosingEvent
RoofOpenedEvent
TaskFailedEvent
- class TaskFailedEvent(name: str, id: Any, obsnum: str | None = None, **kwargs: Any)
Event to be sent when a task has failed.
Initializes a new task failed event.
- Parameters:
name – Name of task that just failed
id – Unique identifier for task
obsnum – Per-night observation number of the run that just failed, e.g. “20260810-001”
TaskFinishedEvent
- class TaskFinishedEvent(name: str, id: Any, obsnum: str | None = None, **kwargs: Any)
Event to be sent when a task has finished.
Initializes a new task finished event.
- Parameters:
name – Name of task that just finished
id – Unique identifier for task
obsnum – Per-night observation number of the run that just finished, e.g. “20260810-001”
TaskSkippedEvent
- class TaskSkippedEvent(name: str, id: Any, reason: str, **kwargs: Any)
Event to be sent when a scheduled task is skipped without running.
Initializes a new task skipped event.
- Parameters:
name – Name of task that was skipped
id – Unique identifier for task
reason – Human-readable reason why the task was skipped
TaskStartedEvent
- class TaskStartedEvent(name: str, id: Any, eta: Time | None = None, obsnum: str | None = None, **kwargs: Any)
Event to be sent when a task has started.
Initializes a new task started event.
- Parameters:
name – Name of task that just started
id – Unique identifier for task
eta – Predicted ETA for when the task will finish
obsnum – Per-night observation number assigned to this run, e.g. “20260810-001”