pyobs-brot 2.0.0.dev2__tar.gz → 2.0.0.dev5__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (20) hide show
  1. {pyobs_brot-2.0.0.dev2 → pyobs_brot-2.0.0.dev5}/PKG-INFO +3 -3
  2. {pyobs_brot-2.0.0.dev2 → pyobs_brot-2.0.0.dev5}/pyobs_brot/brotdome.py +6 -5
  3. {pyobs_brot-2.0.0.dev2 → pyobs_brot-2.0.0.dev5}/pyobs_brot/brotroof.py +3 -2
  4. {pyobs_brot-2.0.0.dev2 → pyobs_brot-2.0.0.dev5}/pyobs_brot/brottelescope.py +19 -12
  5. {pyobs_brot-2.0.0.dev2 → pyobs_brot-2.0.0.dev5}/pyproject.toml +3 -3
  6. {pyobs_brot-2.0.0.dev2 → pyobs_brot-2.0.0.dev5}/uv.lock +9 -9
  7. {pyobs_brot-2.0.0.dev2 → pyobs_brot-2.0.0.dev5}/.github/workflows/pypi.yml +0 -0
  8. {pyobs_brot-2.0.0.dev2 → pyobs_brot-2.0.0.dev5}/.github/workflows/ruff.yml +0 -0
  9. {pyobs_brot-2.0.0.dev2 → pyobs_brot-2.0.0.dev5}/.gitignore +0 -0
  10. {pyobs_brot-2.0.0.dev2 → pyobs_brot-2.0.0.dev5}/.pre-commit-config.yaml +0 -0
  11. {pyobs_brot-2.0.0.dev2 → pyobs_brot-2.0.0.dev5}/.readthedocs.yml +0 -0
  12. {pyobs_brot-2.0.0.dev2 → pyobs_brot-2.0.0.dev5}/LICENSE +0 -0
  13. {pyobs_brot-2.0.0.dev2 → pyobs_brot-2.0.0.dev5}/README.md +0 -0
  14. {pyobs_brot-2.0.0.dev2 → pyobs_brot-2.0.0.dev5}/docs/Makefile +0 -0
  15. {pyobs_brot-2.0.0.dev2 → pyobs_brot-2.0.0.dev5}/docs/make.bat +0 -0
  16. {pyobs_brot-2.0.0.dev2 → pyobs_brot-2.0.0.dev5}/docs/requirements.txt +0 -0
  17. {pyobs_brot-2.0.0.dev2 → pyobs_brot-2.0.0.dev5}/docs/source/_static/pyobs.gif +0 -0
  18. {pyobs_brot-2.0.0.dev2 → pyobs_brot-2.0.0.dev5}/docs/source/conf.py +0 -0
  19. {pyobs_brot-2.0.0.dev2 → pyobs_brot-2.0.0.dev5}/docs/source/index.rst +0 -0
  20. {pyobs_brot-2.0.0.dev2 → pyobs_brot-2.0.0.dev5}/pyobs_brot/__init__.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyobs-brot
3
- Version: 2.0.0.dev2
3
+ Version: 2.0.0.dev5
4
4
  Summary: pyobs module for BROTlib telescopes
5
5
  Author-email: Tim-Oliver Husser <thusser@uni-goettingen.de>, Lukas Melzig <lukas.melzig@stud.uni-goettingen.de>
6
6
  License-Expression: MIT
@@ -8,5 +8,5 @@ License-File: LICENSE
8
8
  Requires-Python: >=3.11
9
9
  Requires-Dist: astropy<8,>=7.0.1
10
10
  Requires-Dist: paho-mqtt>=2.1.0
11
- Requires-Dist: pybrotlib>=1.0.0
12
- Requires-Dist: pyobs-core<3,>=2.0.0.dev6
11
+ Requires-Dist: pybrotlib>=1.1.1
12
+ Requires-Dist: pyobs-core<3,>=2.0.0.dev20
@@ -9,6 +9,7 @@ from pyobs.events import RoofClosingEvent, RoofOpenedEvent
9
9
  from pyobs.interfaces import AltAzState, IDome, IPointingAltAz
10
10
  from pyobs.modules import timeout
11
11
  from pyobs.modules.roof.basedome import BaseDome
12
+ from pyobs.utils import exceptions as exc
12
13
  from pyobs.utils.enums import MotionStatus
13
14
 
14
15
  log = logging.getLogger(__name__)
@@ -80,7 +81,7 @@ class BrotDome(BaseDome, IDome):
80
81
  return
81
82
  elif self.brot.dome.status == DomeStatus.ERROR:
82
83
  await self._error_state("Dome is in error state. Cannot open.")
83
- return
84
+ raise exc.InitError("Dome is in error state. Cannot open.")
84
85
 
85
86
  await self._change_motion_status(MotionStatus.INITIALIZING)
86
87
 
@@ -101,7 +102,7 @@ class BrotDome(BaseDome, IDome):
101
102
  break
102
103
  case DomeStatus.ERROR:
103
104
  await self._error_state()
104
- return
105
+ raise exc.InitError("Dome entered error state while starting tracking.")
105
106
  case _:
106
107
  pass
107
108
  await asyncio.sleep(1)
@@ -114,7 +115,7 @@ class BrotDome(BaseDome, IDome):
114
115
  return
115
116
  elif self.brot.dome.status == DomeStatus.ERROR:
116
117
  await self._error_state("Dome is in error state. Cannot close/park.")
117
- return
118
+ raise exc.ParkError("Dome is in error state. Cannot close/park.")
118
119
 
119
120
  await self._change_motion_status(MotionStatus.PARKING)
120
121
  await self.comm.send_event(RoofClosingEvent())
@@ -125,7 +126,7 @@ class BrotDome(BaseDome, IDome):
125
126
  pass
126
127
  case DomeStatus.ERROR:
127
128
  await self._error_state()
128
- return
129
+ raise exc.ParkError("Dome entered error state while stopping tracking.")
129
130
  case _:
130
131
  break
131
132
  await asyncio.sleep(1)
@@ -146,7 +147,7 @@ class BrotDome(BaseDome, IDome):
146
147
  break
147
148
  case DomeStatus.ERROR:
148
149
  await self._error_state()
149
- return
150
+ raise exc.ParkError("Dome entered error state while parking.")
150
151
  case _:
151
152
  pass
152
153
  await asyncio.sleep(1)
@@ -8,6 +8,7 @@ from pybrotlib.transport import MQTTTransport
8
8
  from pyobs.events import RoofClosingEvent, RoofOpenedEvent
9
9
  from pyobs.modules import timeout
10
10
  from pyobs.modules.roof.baseroof import BaseRoof
11
+ from pyobs.utils import exceptions as exc
11
12
  from pyobs.utils.enums import MotionStatus
12
13
 
13
14
  log = logging.getLogger(__name__)
@@ -64,7 +65,7 @@ class BrotRoof(BaseRoof):
64
65
  return
65
66
  elif self.brot.roof.status == RoofStatus.ERROR:
66
67
  await self._error_state("Roof is in error state. Cannot open.")
67
- return
68
+ raise exc.InitError("Roof is in error state. Cannot open.")
68
69
 
69
70
  await self._change_motion_status(MotionStatus.INITIALIZING)
70
71
 
@@ -83,7 +84,7 @@ class BrotRoof(BaseRoof):
83
84
  return
84
85
  elif self.brot.roof.status == RoofStatus.ERROR:
85
86
  await self._error_state("Roof is in error state. Cannot close.")
86
- return
87
+ raise exc.ParkError("Roof is in error state. Cannot close.")
87
88
 
88
89
  await self._change_motion_status(MotionStatus.PARKING)
89
90
  await self.comm.send_event(RoofClosingEvent())
@@ -9,6 +9,7 @@ from pybrotlib.transport import MQTTTransport # type: ignore
9
9
  from pyobs.interfaces import (
10
10
  AltAzOffsetState,
11
11
  AltAzState,
12
+ FitsHeaderEntry,
12
13
  FocuserState,
13
14
  IFocuser,
14
15
  IOffsetsAltAz,
@@ -27,6 +28,7 @@ from pyobs.interfaces import (
27
28
  from pyobs.mixins import FitsNamespaceMixin
28
29
  from pyobs.modules import timeout
29
30
  from pyobs.modules.telescope.basetelescope import BaseTelescope
31
+ from pyobs.utils import exceptions as exc
30
32
  from pyobs.utils.enums import MotionStatus
31
33
  from pyobs.utils.publisher import CsvPublisher
32
34
  from pyobs.utils.time import Time
@@ -185,6 +187,9 @@ class BrotBaseTelescope(
185
187
  return
186
188
  await asyncio.sleep(1)
187
189
 
190
+ async def _set_tracking_rate(self, ra_rate: float, dec_rate: float) -> None:
191
+ raise NotImplementedError
192
+
188
193
  async def set_focus(self, focus: float, **kwargs: Any) -> None:
189
194
  await self._change_motion_status(MotionStatus.SLEWING, interface="IFocuser")
190
195
  await self.brot.focus.set(focus + self.focus_offset)
@@ -219,7 +224,7 @@ class BrotBaseTelescope(
219
224
  return
220
225
  case TelescopeStatus.ERROR:
221
226
  await self._error_state("Telescope can not be initialized, it has errors.")
222
- return
227
+ raise exc.InitError("Telescope can not be initialized, it has errors.")
223
228
 
224
229
  log.info("Initializing telescope...")
225
230
  await self.brot.telescope.power_on()
@@ -230,7 +235,7 @@ class BrotBaseTelescope(
230
235
  return
231
236
  case -1.0:
232
237
  await self._error_state("Error during powerup of telescope.")
233
- return
238
+ raise exc.InitError("Error during powerup of telescope.")
234
239
  case 0.0:
235
240
  pass
236
241
  await asyncio.sleep(1)
@@ -245,7 +250,7 @@ class BrotBaseTelescope(
245
250
  pass
246
251
  case TelescopeStatus.ERROR:
247
252
  await self._error_state("Telescope can not be parked, it has errors.")
248
- return
253
+ raise exc.ParkError("Telescope can not be parked, it has errors.")
249
254
 
250
255
  log.info("Parking telescope...")
251
256
  await self.brot.telescope.park()
@@ -256,7 +261,7 @@ class BrotBaseTelescope(
256
261
  return
257
262
  case -1.0:
258
263
  await self._error_state("Error during parking of the telescope.")
259
- return
264
+ raise exc.ParkError("Error during parking of the telescope.")
260
265
  case _:
261
266
  pass
262
267
  await asyncio.sleep(1)
@@ -305,11 +310,12 @@ class BrotRaDecTelescope(BrotBaseTelescope, IOffsetsRaDec):
305
310
 
306
311
  async def get_fits_header_before(
307
312
  self, namespaces: list[str] | None = None, **kwargs: Any
308
- ) -> dict[str, tuple[Any, str]]:
313
+ ) -> dict[str, FitsHeaderEntry]:
309
314
  hdr = await BrotBaseTelescope.get_fits_header_before(self)
310
- hdr["TEL-FOCU"] = (self.brot.focus.position, "Focus position [mm]")
311
- hdr["HAOFF"] = (self.brot.telescope._telemetry.POSITION.INSTRUMENTAL.HA.OFFSET, "Hour Angle offset")
312
- hdr["DECOFF"] = (self.brot.telescope._telemetry.POSITION.INSTRUMENTAL.DEC.OFFSET, "Declination offset")
315
+ tel = self.brot.telescope._telemetry
316
+ hdr["TEL-FOCU"] = FitsHeaderEntry(self.brot.focus.position, "Focus position [mm]")
317
+ hdr["HAOFF"] = FitsHeaderEntry(tel.POSITION.INSTRUMENTAL.HA.OFFSET, "Hour Angle offset")
318
+ hdr["DECOFF"] = FitsHeaderEntry(tel.POSITION.INSTRUMENTAL.DEC.OFFSET, "Declination offset")
313
319
  return self._filter_fits_namespace(hdr, namespaces=namespaces, **kwargs)
314
320
 
315
321
  async def add_pointing_measurement(self, **kwargs: Any) -> None:
@@ -352,11 +358,12 @@ class BrotAltAzTelescope(BrotBaseTelescope, IOffsetsAltAz, IPointingSeries):
352
358
 
353
359
  async def get_fits_header_before(
354
360
  self, namespaces: list[str] | None = None, **kwargs: Any
355
- ) -> dict[str, tuple[Any, str]]:
361
+ ) -> dict[str, FitsHeaderEntry]:
362
+ tel = self.brot.telescope._telemetry
356
363
  hdr = await BrotBaseTelescope.get_fits_header_before(self)
357
- hdr["TEL-FOCU"] = (self.brot.focus.position, "Focus position [mm]")
358
- hdr["HAOFF"] = (self.brot.telescope._telemetry.POSITION.INSTRUMENTAL.HA.OFFSET, "Hour Angle offset")
359
- hdr["DECOFF"] = (self.brot.telescope._telemetry.POSITION.INSTRUMENTAL.DEC.OFFSET, "Declination offset")
364
+ hdr["TEL-FOCU"] = FitsHeaderEntry(self.brot.focus.position, "Focus position [mm]")
365
+ hdr["HAOFF"] = FitsHeaderEntry(tel.POSITION.INSTRUMENTAL.HA.OFFSET, "Hour Angle offset")
366
+ hdr["DECOFF"] = FitsHeaderEntry(tel.POSITION.INSTRUMENTAL.DEC.OFFSET, "Declination offset")
360
367
  return self._filter_fits_namespace(hdr, namespaces=namespaces, **kwargs)
361
368
 
362
369
  async def add_pointing_measurement(self, **kwargs: Any) -> None:
@@ -1,15 +1,15 @@
1
1
  [project]
2
2
  name = "pyobs-brot"
3
- version = "2.0.0.dev2"
3
+ version = "2.0.0.dev5"
4
4
  description = "pyobs module for BROTlib telescopes"
5
5
  authors = [{ name = "Tim-Oliver Husser", email = "thusser@uni-goettingen.de" }, { name = "Lukas Melzig", email = "lukas.melzig@stud.uni-goettingen.de" }]
6
6
  requires-python = ">=3.11"
7
7
  license = "MIT"
8
8
  dependencies = [
9
9
  "astropy>=7.0.1,<8",
10
- "pyobs-core>=2.0.0.dev6,<3",
10
+ "pyobs-core>=2.0.0.dev20,<3",
11
11
  "paho-mqtt>=2.1.0",
12
- "pybrotlib>=1.0.0",
12
+ "pybrotlib>=1.1.1",
13
13
  ]
14
14
 
15
15
  [dependency-groups]
@@ -1521,14 +1521,14 @@ wheels = [
1521
1521
 
1522
1522
  [[package]]
1523
1523
  name = "pybrotlib"
1524
- version = "1.0.0"
1524
+ version = "1.1.1"
1525
1525
  source = { registry = "https://pypi.org/simple" }
1526
1526
  dependencies = [
1527
1527
  { name = "aiomqtt" },
1528
1528
  ]
1529
- sdist = { url = "https://files.pythonhosted.org/packages/18/72/bd0880c7512761e3afdd96d4eec0453cae9858c3ed7426e92d6a735ce60b/pybrotlib-1.0.0.tar.gz", hash = "sha256:958d14780d81f6b3362021aaab34be15bff41bfb7dfddb81e3164b9bee878220", size = 4968, upload-time = "2026-05-26T16:38:34.291Z" }
1529
+ sdist = { url = "https://files.pythonhosted.org/packages/b6/34/cb6cc4cee0fc7cd88df27e09535e91599a45c3090fb8ea191cb7702e49ca/pybrotlib-1.1.1.tar.gz", hash = "sha256:170b7fc0c29c3f703fb027b505f54f9b9a7778cbb7ade7a8e3e4803d0d5af660", size = 4988, upload-time = "2026-07-13T13:52:44.913Z" }
1530
1530
  wheels = [
1531
- { url = "https://files.pythonhosted.org/packages/af/2c/f0ab674fbb5d0ae4ea8914e59adb4cdac31ada95cd91741a44c52a4479eb/pybrotlib-1.0.0-py3-none-any.whl", hash = "sha256:03363136f6062cd678953dcba61db402126d15aa39d6d6b5f11a3760adfeead1", size = 9481, upload-time = "2026-05-26T16:38:33.447Z" },
1531
+ { url = "https://files.pythonhosted.org/packages/78/1c/eb4ec2c7523844f29057887b78741ca0f20456d81825877f6dc9a7067e30/pybrotlib-1.1.1-py3-none-any.whl", hash = "sha256:a6cde54aae0833761fecb1044bf749d79f9bdafff4ff478b894825db93b203a6", size = 9575, upload-time = "2026-07-13T13:52:43.97Z" },
1532
1532
  ]
1533
1533
 
1534
1534
  [[package]]
@@ -1783,7 +1783,7 @@ wheels = [
1783
1783
 
1784
1784
  [[package]]
1785
1785
  name = "pyobs-brot"
1786
- version = "2.0.0.dev2"
1786
+ version = "2.0.0.dev5"
1787
1787
  source = { editable = "." }
1788
1788
  dependencies = [
1789
1789
  { name = "astropy" },
@@ -1804,8 +1804,8 @@ dev = [
1804
1804
  requires-dist = [
1805
1805
  { name = "astropy", specifier = ">=7.0.1,<8" },
1806
1806
  { name = "paho-mqtt", specifier = ">=2.1.0" },
1807
- { name = "pybrotlib", specifier = ">=1.0.0" },
1808
- { name = "pyobs-core", specifier = ">=2.0.0.dev6,<3" },
1807
+ { name = "pybrotlib", specifier = ">=1.1.1" },
1808
+ { name = "pyobs-core", specifier = ">=2.0.0.dev20,<3" },
1809
1809
  ]
1810
1810
 
1811
1811
  [package.metadata.requires-dev]
@@ -1818,7 +1818,7 @@ dev = [
1818
1818
 
1819
1819
  [[package]]
1820
1820
  name = "pyobs-core"
1821
- version = "2.0.0.dev6"
1821
+ version = "2.0.0.dev20"
1822
1822
  source = { registry = "https://pypi.org/simple" }
1823
1823
  dependencies = [
1824
1824
  { name = "aiohttp" },
@@ -1848,9 +1848,9 @@ dependencies = [
1848
1848
  { name = "tenacity" },
1849
1849
  { name = "typing-extensions" },
1850
1850
  ]
1851
- sdist = { url = "https://files.pythonhosted.org/packages/ca/1f/f3ff220ff8cc908198a130f98aacb2bd0c9963befd9d0757bcff13800f84/pyobs_core-2.0.0.dev6.tar.gz", hash = "sha256:ee8f98c4299064a2383666b349cf87af98f9c3de437048e8b56dcb2817e0024b", size = 299899, upload-time = "2026-06-30T17:39:36.203Z" }
1851
+ sdist = { url = "https://files.pythonhosted.org/packages/86/ce/29738c727e1a5ccc723365892f308b24641ff3211f2718a40beb56f62b9e/pyobs_core-2.0.0.dev20.tar.gz", hash = "sha256:aceee8391e9f16520004c2bd08da0e5c2ab3550901777410feeff9535845c8c1", size = 323624, upload-time = "2026-07-15T08:59:47.278Z" }
1852
1852
  wheels = [
1853
- { url = "https://files.pythonhosted.org/packages/17/b6/3875a77f1206ef5d02d5ac43ae9fd90ba96be7857fe4308dfc0c599eec16/pyobs_core-2.0.0.dev6-py3-none-any.whl", hash = "sha256:542a78b069cac525cc72b9fc5fce8983629f8f0a240ff5ee722617886a8c9c13", size = 508486, upload-time = "2026-06-30T17:39:34.739Z" },
1853
+ { url = "https://files.pythonhosted.org/packages/e2/2e/a28066bd81ff4995502d35a4a855fa1e5b9f724c828defab67c6430a4eaf/pyobs_core-2.0.0.dev20-py3-none-any.whl", hash = "sha256:501e91bc9f2a30b216180d7a1e25ecd214fcc512f905c7b9950c2c0a1f903f23", size = 541148, upload-time = "2026-07-15T08:59:45.826Z" },
1854
1854
  ]
1855
1855
 
1856
1856
  [[package]]
File without changes