RectangularGrid¶
- class marxs.design.rowland.RectangularGrid(**kwargs)[source]¶
Bases:
ElementsOnTorusA collection of diffraction gratings on the Rowland torus.
This class is similar to
marxs.design.rowland.GratingArrayStructurebut instead of placing elements on concentric circles, they are placed to fill a rectangular area.When initialized, it places elements in the space available on the Rowland circle, 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_posorelem_uncertainty. Seemarxs.simulation.Parallelfor details.After any of the
elem_pos,elem_uncertaintyoruncertaintyis changed,generate_elementsneeds to be called to regenerate the facets on the GAS.Parameters¶
- y_range, z_range: list of two floats
Limits of the rectangular area where gratings are placed. To place only one element, make both limits the same, e.g.
z_range=[5, 5]will place one element in each row in z centered on $z=5$. This is given in the coordinate system of the torus, i.e. y is the plane of the Rowland circle and both numbers are measured from the center of the Rowland torus. Default for z-range: [-1e-10, 1e-10]. This will make one element centered on 0 in z-range.
Define a new MARXS element.
Methods Summary
Specify the element position in the yz plane
Methods Documentation
- elemposyz()[source]¶
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.