pyobs-gui 2.0.0.dev7__py3-none-any.whl → 2.0.0.dev9__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.
@@ -70,7 +70,9 @@ def _build_generic_grammar_namespace() -> types.ModuleType:
70
70
  stub_dir = Path(tempfile.gettempdir()) / "pyobs_gui_astropy_ply_stub"
71
71
  stub_dir.mkdir(parents=True, exist_ok=True)
72
72
 
73
- ns = types.ModuleType("_pyobs_gui_generic_grammar")
73
+ # Typed as Any, not types.ModuleType: every t_*/p_* attribute below is bolted on
74
+ # dynamically for PLY's benefit, which a real ModuleType's static shape can't express.
75
+ ns: Any = types.ModuleType("_pyobs_gui_generic_grammar")
74
76
  ns.__file__ = str(stub_dir / "generic.py")
75
77
  ns.tokens = tokens
76
78
 
@@ -123,19 +123,28 @@ class AcquisitionWidget(BaseWidget, Ui_AcquisitionWidget):
123
123
  xlabel, ylabel = "Offset 1 [deg]", "Offset 2 [deg]"
124
124
  if points:
125
125
  xs, ys = zip(*points, strict=True)
126
- self.ax2.axhline(0, color="gray", linewidth=0.5)
127
- self.ax2.axvline(0, color="gray", linewidth=0.5)
128
126
  self.ax2.plot(xs, ys, marker="o", color="tab:orange")
129
127
  self.ax2.plot(xs[0], ys[0], marker="s", color="tab:red", markersize=8, linestyle="", label="start")
130
128
  self.ax2.plot(xs[-1], ys[-1], marker="*", color="tab:green", markersize=12, linestyle="", label="latest")
131
129
  self.ax2.legend(fontsize="small")
132
- self.ax2.set_aspect("equal", adjustable="datalim")
133
130
  self.ax2.set_xlabel(xlabel)
134
131
  self.ax2.set_ylabel(ylabel)
135
132
  self.ax2.grid(linestyle=":", alpha=0.5)
136
133
  self.ax2.set_axisbelow(True)
137
134
 
138
135
  self.figure.tight_layout()
136
+
137
+ if points:
138
+ # lock in the aspect/view from the actual data -- after tight_layout, so the axes
139
+ # box size is already final -- before adding the crosshair lines below, which
140
+ # otherwise feed (0, 0) into the data limits and force the plot to zoom out to
141
+ # include the origin even when every point is far from it
142
+ self.ax2.set_aspect("equal", adjustable="datalim")
143
+ self.ax2.apply_aspect()
144
+ self.ax2.autoscale(False)
145
+ self.ax2.axhline(0, color="gray", linewidth=0.5, zorder=0)
146
+ self.ax2.axvline(0, color="gray", linewidth=0.5, zorder=0)
147
+
139
148
  self.canvas.draw()
140
149
 
141
150
  @qasync.asyncSlot() # type: ignore
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyobs-gui
3
- Version: 2.0.0.dev7
3
+ Version: 2.0.0.dev9
4
4
  Summary: A remote GUI for pyobs
5
5
  Author-email: Tim-Oliver Husser <thusser@uni-goettingen.de>
6
6
  License-Expression: MIT
@@ -1,8 +1,8 @@
1
1
  pyobs_gui/__init__.py,sha256=-dWRQNdj92V-bOMUj0h-ojzZp0b5DABuxCsATkVc-sE,515
2
2
  pyobs_gui/__main__.py,sha256=zHmI8NjLqjfDpJnE8rzf70HRk-Q0RlOoN6ObjDC9EdE,628
3
- pyobs_gui/_nuitka_astropy_patch.py,sha256=7QKHNi6t7VSFqsVZHCCzWaIhOkydHqu1mBWjo8PZpHw,14946
3
+ pyobs_gui/_nuitka_astropy_patch.py,sha256=_vy2jLA8g3ysZkJCJDmj4N_rjwojN6sl_PFj-QqXUFs,15127
4
4
  pyobs_gui/accounts.py,sha256=U3-0XRHnbz3OXRzETPg79pON_tc7KlDcsC5i6Ae6ZFc,5387
5
- pyobs_gui/acquisitionwidget.py,sha256=jhytcfVbopFknDoE_y3VXIQ7CgochPsZXqxq17ze-RY,6213
5
+ pyobs_gui/acquisitionwidget.py,sha256=6EfWEFFD9ZoSCJzdhHQ-e4hf4TI3wLNM68jlXMnqBKI,6673
6
6
  pyobs_gui/autofocuswidget.py,sha256=zgkz9AzSxpvE_xC9kQnUWuFNQze7vOYIfDWGCDkima0,4192
7
7
  pyobs_gui/autoguidingwidget.py,sha256=ekahiYxuhUSQRMC84MXGtq0uMyS-_VF_C0WHA1VXvPc,6592
8
8
  pyobs_gui/base.py,sha256=onpw_6UnOUjArcXRrxYXdDm4osezfxRL2kG_hTGsk8M,14168
@@ -96,8 +96,8 @@ pyobs_gui/qt/resources/cloud-sun-solid.svg,sha256=qXGvtPuQYIAHlLc1Cqiy5M6s2-JOPF
96
96
  pyobs_gui/qt/resources/edit-solid.svg,sha256=R2lehJgb5DxyOXMmj5ACJsxOTqi9heXhj6WB9fdLelY,735
97
97
  pyobs_gui/qt/resources/search-solid.svg,sha256=8WR3B4MQyr76HrFvw6f7vQGyCWS7vQXF1WPWCWr3heQ,577
98
98
  pyobs_gui/qt/resources/undo-solid.svg,sha256=6O_Pyjo59fCCynMz5XhWU4wI1egQ3anNpToH9fpmISw,767
99
- pyobs_gui-2.0.0.dev7.dist-info/METADATA,sha256=jbc8sbmXBRFCgnH_thlAqHzxX7Y2P87IbvAJWh99E0Y,649
100
- pyobs_gui-2.0.0.dev7.dist-info/WHEEL,sha256=lCkmxWfQsSc9CfIClYeavTdQeEX2toPqufh9gI35EQA,87
101
- pyobs_gui-2.0.0.dev7.dist-info/entry_points.txt,sha256=KVqjHdiT1nvlYkkDPUb_rzBhC-Cs0MrpA_JA9_ddZ30,54
102
- pyobs_gui-2.0.0.dev7.dist-info/licenses/LICENSE,sha256=gC8djBliCENDmuRvzCoejpWbsn8eqKx61Hc8bmDZ2LI,1099
103
- pyobs_gui-2.0.0.dev7.dist-info/RECORD,,
99
+ pyobs_gui-2.0.0.dev9.dist-info/METADATA,sha256=b3LQECQaoKDWysa8ksTgU_Y0Xc2tuzYBj1nCPfik50c,649
100
+ pyobs_gui-2.0.0.dev9.dist-info/WHEEL,sha256=lCkmxWfQsSc9CfIClYeavTdQeEX2toPqufh9gI35EQA,87
101
+ pyobs_gui-2.0.0.dev9.dist-info/entry_points.txt,sha256=KVqjHdiT1nvlYkkDPUb_rzBhC-Cs0MrpA_JA9_ddZ30,54
102
+ pyobs_gui-2.0.0.dev9.dist-info/licenses/LICENSE,sha256=gC8djBliCENDmuRvzCoejpWbsn8eqKx61Hc8bmDZ2LI,1099
103
+ pyobs_gui-2.0.0.dev9.dist-info/RECORD,,