optixstuff.primary#

Primary mirror abstractions.

Classes#

AbstractPrimary

Abstract interface for a primary aperture.

SimplePrimary

A simple circular primary mirror with a central obscuration.

SegmentedPrimary

A segmented hex primary that carries pupil geometry, not just scalars.

Functions#

_hex_axial_coords(n_rings)

Axial (q, r) centres of a hex-packed n-ring layout.

Module Contents#

class optixstuff.primary.AbstractPrimary[source]#

Bases: equinox.Module

Abstract interface for a primary aperture.

Any concrete implementation must provide the diameter and collecting area of the primary mirror as scalar values in SI units. These are consumed by exposure time calculators and simulation tools alike.

diameter_m: equinox.AbstractVar[float]#

Primary mirror diameter in metres.

area_m2: equinox.AbstractVar[float]#

Effective collecting area in square metres.

class optixstuff.primary.SimplePrimary(diameter_m, obscuration=0.0, shape_factor=1.0)[source]#

Bases: AbstractPrimary

A simple circular primary mirror with a central obscuration.

Args:

diameter_m: Primary mirror diameter in metres. obscuration: Linear obscuration fraction (0 = no obscuration). shape_factor: Fraction of unobscured area that is collecting

(accounts for struts, segment gaps, etc.). Default 1.0.

Parameters:
_diameter_m: float#
obscuration: float#
shape_factor: float#
property diameter_m: float#

Primary mirror diameter in metres.

Return type:

float

property area_m2: float#

Effective collecting area in square metres.

Return type:

float

__repr__()[source]#

One-line summary of diameter, obscuration, and effective area.

Return type:

str

optixstuff.primary._hex_axial_coords(n_rings)[source]#

Axial (q, r) centres of a hex-packed n-ring layout.

Yields 1 + 3 n (n + 1) coordinates, centre first.

Parameters:

n_rings (int)

Return type:

list[tuple[int, int]]

class optixstuff.primary.SegmentedPrimary(diameter_m, area_m2, n_rings, n_segments, segment_gap_m, segment_shape='hexagon', segment_point_to_point_m=None, inscribed_diameter_m=None)[source]#

Bases: AbstractPrimary

A segmented hex primary that carries pupil geometry, not just scalars.

Beyond the diameter and collecting area every primary provides, this describes the segment layout – ring count, segment count, gap, shape – so a diffraction backend (e.g. dLux) can build the pupil from it. optixstuff only DESCRIBES the geometry; it does not propagate wavefronts.

Args:

diameter_m: Circumscribing diameter in metres. area_m2: Effective collecting area in square metres (gap/fill corrected). n_rings: Number of segment rings around the centre segment. n_segments: Total segment count (1 + 3 n (n + 1) for a full layout). segment_gap_m: Inter-segment optical gap in metres. segment_shape: Segment shape; only "hexagon" is supported today.

Parameters:
  • diameter_m (float)

  • area_m2 (float)

  • n_rings (int)

  • n_segments (int)

  • segment_gap_m (float)

  • segment_shape (str)

  • segment_point_to_point_m (float | None)

  • inscribed_diameter_m (float | None)

_diameter_m: float#
_area_m2: float#
segment_gap_m: float#
segment_point_to_point_m: float | None#
inscribed_diameter_m: float | None#
n_rings: int#
n_segments: int#
segment_shape: str#
property diameter_m: float#

Circumscribing diameter in metres.

Return type:

float

property area_m2: float#

Effective collecting area in square metres.

Return type:

float

property segment_flat_to_flat_m: float#

Segment flat-to-flat size in metres.

Exact (point_to_point * sqrt(3) / 2) when the segment size is given; otherwise the legacy circumscribing approximation diameter / (2 n_rings + 1).

Return type:

float

property segment_pitch_m: float#

Centre-to-centre distance of adjacent segments (flat-to-flat + gap).

Return type:

float

property segment_centres_m#

(n_segments, 2) segment centre (x, y) positions in metres.

A flat-top hexagonal lattice (flats up, points along x), the convention of the HWO EAC baseline pupils: the centre segment is first, and adjacent centres are one segment_pitch_m apart.

__repr__()[source]#

One-line summary of diameter, segment layout, and effective area.

Return type:

str