Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 37 additions & 2 deletions esis/optics/_instruments/_instruments.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -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)
Expand All @@ -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]
Expand All @@ -338,15 +343,45 @@ def schematic_primary(
sx = px.mean()
sy = py.mean()

rx = position_x.mean()
ry = position_y.mean()

ax.text(
x=sx,
y=sy,
s=f"Ch. {self.camera.channel[i].ndarray}",
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(
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Loading