finesse.solutions.beamtrace.PropagationSolution.all_segments¶
- PropagationSolution.all_segments(*args, add_gouy=True, w_scale=1, npts=1000, resolution='adaptive', subs=None)[source]¶
Construct a dictionary containing beam data for all segments of the solution.
The expected, valid positional arguments are any combination of:
“beamsize”,
“gouy”,
“curvature”,
where all three will be used by default if no args are given.
Use
PropagationSolution.segment()
to obtain the beam data over a single space of the solution.- Parameters:
- add_gouybool, optional; default: True
Whether to add the last Gouy phase from previous segment to all values of current segment, thereby constructing each “gouy” array entry as accumulated Gouy phases over all segments.
- w_scalescalar, optional; default: 1
Quantity to scale beam size values by if calculating these. For example, specify w_scale = 1e3 to get beam sizes in mm. By default the units of the beam size will be in metres.
- nptsint, optional; default: 1000
Number of points to use for computing data values. The actual number of data points used per segment depends upon the resolution argument.
- resolutionstr, optional; default: “adaptive”
The method of segment resolution setting to use. This can be one of three arguments:
“adaptive”: Sets the number of points per segment in such a way as to attempt to increase the resolution near the waist. Each segment will have a number of points allocated to it accordingly, with the total number of points across all segments then approximately equal to npts.
“equal”: Allocates an equal number of points to each segment, i.e. each segment has
int(npts / len(self.spaces))
points.“all”: Gives
npts
to all segments, such that the total number of data points across all segments islen(self.spaces) * npts
.
- subsdict, optional
A dictionary of model parameter to value substitutions to pass to the
eval
methods of symbolic expressions.If this solution object is not symbolic then this argument is ignored.
- Returns:
- datadict
Dictionary of data mapping
space : zs, segdata
, where space is each space (i.e. segment) in the solution path, zs are the z-axis values and segdata is the dict of data values for the targeted beam properties over the space.