Skip to content

Commit 7e58919

Browse files
authored
Merge pull request #5 from pyobs/develop
v0.13
2 parents 31dd1f9 + 97913f9 commit 7e58919

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

pyobs_fli/__init__.py

+5
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
1+
"""
2+
TODO: write doc
3+
"""
4+
__title__ = 'FLI camera modules'
5+
16
from .flicamera import FliCamera

pyobs_fli/flicamera.py

+8-6
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,16 @@
99

1010
from pyobs.interfaces import ICamera, ICameraWindow, ICameraBinning, ICooling
1111
from pyobs.modules.camera.basecamera import BaseCamera
12-
from .flidriver import *
12+
from pyobs.utils.enums import ExposureStatus
13+
from pyobs_fli.flidriver import *
1314

1415

1516
log = logging.getLogger(__name__)
1617

1718

1819
class FliCamera(BaseCamera, ICamera, ICameraWindow, ICameraBinning, ICooling):
1920
"""A pyobs module for FLI cameras."""
21+
__module__ = 'pyobs_fli'
2022

2123
def __init__(self, setpoint: float = -20, *args, **kwargs):
2224
"""Initializes a new FliCamera.
@@ -147,7 +149,7 @@ def _expose(self, exposure_time: int, open_shutter: bool, abort_event: threading
147149
self._driver.set_window(self._window[0], self._window[1], width, height)
148150

149151
# set some stuff
150-
self._change_exposure_status(ICamera.ExposureStatus.EXPOSING)
152+
self._change_exposure_status(ExposureStatus.EXPOSING)
151153
self._driver.init_exposure(open_shutter)
152154
self._driver.set_exposure_time(int(exposure_time))
153155

@@ -163,7 +165,7 @@ def _expose(self, exposure_time: int, open_shutter: bool, abort_event: threading
163165
while True:
164166
# aborted?
165167
if abort_event.is_set():
166-
self._change_exposure_status(ICamera.ExposureStatus.IDLE)
168+
self._change_exposure_status(ExposureStatus.IDLE)
167169
raise ValueError('Aborted exposure.')
168170

169171
# is exposure finished?
@@ -175,7 +177,7 @@ def _expose(self, exposure_time: int, open_shutter: bool, abort_event: threading
175177

176178
# readout
177179
log.info('Exposure finished, reading out...')
178-
self._change_exposure_status(ICamera.ExposureStatus.READOUT)
180+
self._change_exposure_status(ExposureStatus.READOUT)
179181
width = int(math.floor(self._window[2] / self._binning[0]))
180182
height = int(math.floor(self._window[3] / self._binning[1]))
181183
img = np.zeros((height, width), dtype=np.uint16)
@@ -212,7 +214,7 @@ def _expose(self, exposure_time: int, open_shutter: bool, abort_event: threading
212214

213215
# return FITS image
214216
log.info('Readout finished.')
215-
self._change_exposure_status(ICamera.ExposureStatus.IDLE)
217+
self._change_exposure_status(ExposureStatus.IDLE)
216218
return hdu
217219

218220
def _abort_exposure(self):
@@ -222,7 +224,7 @@ def _abort_exposure(self):
222224
ValueError: If an error occured.
223225
"""
224226
self._driver.cancel_exposure()
225-
self._camera_status = ICamera.ExposureStatus.IDLE
227+
self._camera_status = ExposureStatus.IDLE
226228

227229
def get_cooling_status(self, *args, **kwargs) -> Tuple[bool, float, float]:
228230
"""Returns the current status for the cooling.

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
# setup
2222
setup(
2323
name='pyobs-fli',
24-
version='0.12',
24+
version='0.13',
2525
description='pyobs component for FLI cameras',
2626
packages=['pyobs_fli'],
2727
ext_modules=cythonize(extensions),

0 commit comments

Comments
 (0)