ElementsOnTorus¶
- class marxs.design.rowland.ElementsOnTorus(**kwargs)[source] [edit on github]¶
Bases:
ParallelCalculated
,OpticalElement
A collection of elements on a Rowland torus.
When initialized, it places elements in the space available on the Rowland torus, most commonly, this class is used to place grating facets.
After generation, individual facet positions can be adjusted by hand by editing the attributes
elem_pos
orelem_uncertainty
. Seemarxs.simulation.Parallel
for details.After any of the
elem_pos
,elem_uncertainty
oruncertainty
is changed,generate_elements
needs to be called to regenerate the facets on the GAS.- Parameters:
- rowland
marxs.design.rowland.RowlandTorus
Torus on which the elements are placed.
- d_elementlist of two floats
Size of the edge of elements along the two (y and z in canonical marxs orientation) edges.
d_element
can be larger than the actual size of the silicon membrane or the active area of a CCD chip to accommodate a minimum thickness of the surrounding frame.- guess_distancefloat
A ray can intersect a torus in up to four points.
guess_distance
specifies the starting distance for the numerical search for the intersection point to resolve this ambiguity. Default is the start close to outer rim of the torus.- optimize_axisnp.array
Homogeneous coordinate of the axis along which elements will be moved. This will usually coincide with the optical axis of the telescope. Default is the x-axis in the coordinate system of the torus.
- normal_specnp.array or callable
see
ParallelCalculated
for details. Default for this class: Pointing inward into the Rowlandtorus, as one would do for an array of e.g. CCDs.- parallel_specnp.array or callable
see
ParallelCalculated
for details. Default for this class: Symmetry axis of the torus.
- rowland
Define a new MARXS element.
Methods Summary
elempos
()Generate 3D positions of elements
Specify the element position in the yz plane
Methods Documentation
- elempos()[source] [edit on github]¶
Generate 3D positions of elements
For each element, y and z coordinates in the torus coordinate system are generated from
self.elemposyz
and the elements are placed at x=0. Then, that initial coordinate is transformed into the global coordinate system and moved byself.guess_distance * self.optimize_axis
. The resulting position is the starting point for numerical optimization alongself.optimize_axis
to find the on-torus location.
- elemposyz()[source] [edit on github]¶
Specify the element position in the yz plane
For the torus, the Rowland circle lies in the xy plane and the symmetry axis of the torus is the y-axis. In this class, the position of the elements is specified in the yz plane in the coordinates of the torus and the remaining coordinate.
This function will be customized by derived classes.
- Returns:
- ypos, zposnp.array
1D arrays of y and z positions for the elements distributed in 2D.