From 1621e194ea39ae24dceb019946fc134973cee316 Mon Sep 17 00:00:00 2001 From: Roy Smart Date: Sat, 13 Jun 2026 08:34:44 -0600 Subject: [PATCH 1/2] Added test point to ESIS-II primary mirror schematic. --- esis/optics/_instruments/_instruments.py | 39 ++++++++++++++++++++++-- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/esis/optics/_instruments/_instruments.py b/esis/optics/_instruments/_instruments.py index c114450..8828a0f 100644 --- a/esis/optics/_instruments/_instruments.py +++ b/esis/optics/_instruments/_instruments.py @@ -288,7 +288,7 @@ def schematic_primary( **kwargs, ) - radius_inner = 15 * u.mm + radius_inner = 20 * u.mm az = na.linspace(0, 360, axis="az", num=101) * u.deg na.plt.plot( radius_inner * np.cos(az), @@ -297,6 +297,11 @@ def schematic_primary( label="inner C.A.", ) + na.plt.dimension( + na.Cartesian2dVectorArray(-radius_inner, 0 * u.mm), + na.Cartesian2dVectorArray(+radius_inner, 0 * u.mm), + ) + if footprint: index_primary = self.system.surfaces_all.index(primary) @@ -312,7 +317,7 @@ def schematic_primary( rays = primary.transformation.inverse(rays) - for i in na.ndindex(shape): + for n, i in enumerate(na.ndindex(shape)): position_i = rays.position[i] where_i = where[i] @@ -338,6 +343,9 @@ def schematic_primary( sx = px.mean() sy = py.mean() + rx = position_x.mean() + ry = position_y.mean() + ax.text( x=sx, y=sy, @@ -345,8 +353,35 @@ def schematic_primary( ha="center", va="center", color=kwargs_footprint["edgecolor"], + # fontsize=8, + ) + + if n == 0: + label = "test point" + else: + label = "_test point" + ax.scatter( + rx, + ry, + marker="+", + color="black", + label=label, ) + width_clear = self.primary_mirror.width_clear + width_border = self.primary_mirror.width_border + + halfwidth_mech = width_clear / 2 + width_border + + if n == 2: + na.plt.dimension( + na.Cartesian2dVectorArray(0 * u.mm, ry), + na.Cartesian2dVectorArray(0 * u.mm, -halfwidth_mech), + offset=-60 * u.mm, + rotate=False, + ax=ax, + ) + @dataclasses.dataclass(eq=False, repr=False) class Instrument( From 7573aa4feb13c23882a9fe73446908b19b4f9cd9 Mon Sep 17 00:00:00 2001 From: Roy Smart Date: Sat, 13 Jun 2026 08:47:05 -0600 Subject: [PATCH 2/2] bump named-arrays to 2.0 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f7711b8..d261cc0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,7 +19,7 @@ dependencies = [ "matplotlib", "astropy~=7.2", "joblib", - "named-arrays~=1.6", + "named-arrays~=2.0", "optika~=1.1", "msfc-ccd~=1.0", "solar-dynamics-observatory~=0.2",