Skip to content

Commit

Permalink
v1.2.2
Browse files Browse the repository at this point in the history
version 1.2.2
  • Loading branch information
thusser authored Dec 4, 2024
2 parents d192e25 + d5d6497 commit a400f7f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 11 additions & 1 deletion pyobs_qhyccd/qhyccdcamera.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,11 +213,21 @@ async def _expose(self, exposure_time: float, open_shutter: bool, abort_event: a
log.info("Starting exposure with %s shutter for %.2f seconds...", "open" if open_shutter else "closed", exposure_time)
date_obs = datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%S.%f")
self._driver.expose_single_frame()
await event_wait(abort_event, exposure_time-0.5)
await self._wait_exposure(abort_event, exposure_time, open_shutter)
loop = asyncio.get_running_loop()
image_data = await loop.run_in_executor(None, self._driver.get_single_frame)
return await self._get_image_with_header(image_data, date_obs, exposure_time)

async def _wait_exposure(self, abort_event: asyncio.Event, exposure_time: float, open_shutter: bool) -> None:
"""Wait for exposure to finish.
Params:
abort_event: Event that aborts the exposure.
exposure_time: Exp time in sec.
open_shutter: Whether shutter should be opened.
"""
await event_wait(abort_event, exposure_time - 0.5)

async def _abort_exposure(self) -> None:
"""Abort the running exposure. Should be implemented by derived class.
Raises:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pyobs-qhyccd"
version = "1.2.1"
version = "1.2.2"
description = "pyobs module for QHYCCD cameras"
authors = ["Tim-Oliver Husser <[email protected]>"]
license = "MIT"
Expand Down

0 comments on commit a400f7f

Please sign in to comment.