pyobs-core 2.0.0.dev44__py3-none-any.whl → 2.0.0.dev45__py3-none-any.whl

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.
@@ -180,11 +180,16 @@ class FocusModel(Module, IFocusModel):
180
180
  if self._update_model:
181
181
  await self._calc_focus_model()
182
182
 
183
- # publish initial states
183
+ # publish initial state -- dependencies (e.g. the weather module) may not be reachable
184
+ # yet at this point in startup, so fall back to a placeholder rather than leaving
185
+ # IFocusModel's state unpublished entirely; _update() overwrites it with a real
186
+ # measurement once dependencies are reachable
184
187
  try:
185
- await self.comm.set_state(IFocusModel, OptimalFocusState(focus=await self._get_optimal_focus()))
186
- except ValueError as e:
187
- log.warning("Could not publish initial focus model state: %s", e)
188
+ focus = await self._get_optimal_focus()
189
+ except (ValueError, exc.FocusError) as e:
190
+ log.warning("Could not compute initial focus model state, publishing placeholder instead: %s", e)
191
+ focus = 0.0
192
+ await self.comm.set_state(IFocusModel, OptimalFocusState(focus=focus))
188
193
 
189
194
  async def _update(self) -> None:
190
195
  # wait a little
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyobs-core
3
- Version: 2.0.0.dev44
3
+ Version: 2.0.0.dev45
4
4
  Summary: robotic telescope software
5
5
  Author-email: Tim-Oliver Husser <thusser@uni-goettingen.de>
6
6
  License-Expression: MIT
@@ -215,7 +215,7 @@ pyobs/modules/flatfield/pointing.py,sha256=3uMVlgq0l-HEyZ-ahouyOJz2kuYTAI87CLzWB
215
215
  pyobs/modules/flatfield/scheduler.py,sha256=ThO0s39MjXI4iCy35ybxW_rNl0VpKK52umKiCcW02Oc,4193
216
216
  pyobs/modules/focus/__init__.py,sha256=Fw8RCjlBB6r-BQaqbxTitdD1_MKMF54gx8U6pig9Fgs,261
217
217
  pyobs/modules/focus/dummyautofocus.py,sha256=gAiRWW_LNI1uOIE65WhiV23RtGQMonB2-vOtIwSU79I,3862
218
- pyobs/modules/focus/focusmodel.py,sha256=JY_JgOe9XJuAUGjhUN_W5WkcJ1dUJ-sXFOnsAA39n9w,21087
218
+ pyobs/modules/focus/focusmodel.py,sha256=-w1IBn3E5tFdIDPS6biJmyYnlQ9xMGqK-96jc4c1mOM,21477
219
219
  pyobs/modules/focus/focusseries.py,sha256=t3wHdWxYE2nV-DJF-INxgsZWb9QPl4CLBF7IkXvh0zA,12042
220
220
  pyobs/modules/image/__init__.py,sha256=mXKuMx9oLSREDe-moHzT2tJEQAEztrGdZOlnX0xSRRw,286
221
221
  pyobs/modules/image/imagewatcher.py,sha256=KEaHZ6rYFJYd0-7dBmDh2NTzBIo_2VWrjpk3gLqufYc,8380
@@ -439,8 +439,8 @@ pyobs/vfs/vfs.py,sha256=buHTmO6VUjSypkEMVxY8rDKrpMz65AY2OE2hGEsQsLI,10780
439
439
  pyobs/vfs/filelists/__init__.py,sha256=NaTGFjLGh043j_F7kWEx_cXaII7t3CbYguRk2g5hEqw,111
440
440
  pyobs/vfs/filelists/filelist.py,sha256=kCco_5G2gLH-nxWik-wcs6lGuc_-3LeeyR9L4_srf30,201
441
441
  pyobs/vfs/filelists/testing.py,sha256=M8f2BULdjRCc7JFOKhAH7Kwre_uVQC0xLcv9xGTfNFw,425
442
- pyobs_core-2.0.0.dev44.dist-info/METADATA,sha256=SF8m0xv5aEqsa6gXVUEH285AI4pXmWdcWdmX8hTLA_A,1990
443
- pyobs_core-2.0.0.dev44.dist-info/WHEEL,sha256=lCkmxWfQsSc9CfIClYeavTdQeEX2toPqufh9gI35EQA,87
444
- pyobs_core-2.0.0.dev44.dist-info/entry_points.txt,sha256=0ceIn3dTDwWdGdJ5VdTvYim7vKkdTe6aqqpoaG065UY,109
445
- pyobs_core-2.0.0.dev44.dist-info/licenses/LICENSE,sha256=gC8djBliCENDmuRvzCoejpWbsn8eqKx61Hc8bmDZ2LI,1099
446
- pyobs_core-2.0.0.dev44.dist-info/RECORD,,
442
+ pyobs_core-2.0.0.dev45.dist-info/METADATA,sha256=1XyRb2dUXGaVR74fnemz1Syc0eRl4tJoIuyxaAKnK_A,1990
443
+ pyobs_core-2.0.0.dev45.dist-info/WHEEL,sha256=lCkmxWfQsSc9CfIClYeavTdQeEX2toPqufh9gI35EQA,87
444
+ pyobs_core-2.0.0.dev45.dist-info/entry_points.txt,sha256=0ceIn3dTDwWdGdJ5VdTvYim7vKkdTe6aqqpoaG065UY,109
445
+ pyobs_core-2.0.0.dev45.dist-info/licenses/LICENSE,sha256=gC8djBliCENDmuRvzCoejpWbsn8eqKx61Hc8bmDZ2LI,1099
446
+ pyobs_core-2.0.0.dev45.dist-info/RECORD,,