corset.config#
Configuration for analysis and plotting functions.
- class corset.config.Config#
Configuration namespace for the mode matching solver.
- class Overlap#
Configuration of default values for overlap contour plots.
- class PlotAll#
Configuration of default values for mode matching overview plots containing the setup, reachability, and sensitivity plots.
- class PlotReachability#
Configuration of default values for reachability plots.
- confidence_interval: float | bool = 0.95#
Confidence ellipse for focus position and waist radius. If
False, no confidence ellipse is shown.
- displacement: float | list[float] = 0.005#
Displacement(s) to use for all or each dimension (if a list).
- class PlotSensitivity#
Configuration of default values for sensitivity plots.
- confidence_interval: float | bool = 0.95#
Confidence ellipse probability in terms of the required x and y displacements. If
False, no confidence ellipse is shown.
- class PlotSetup#
Configuration of default values for setup plots.
- beam_kwargs: ClassVar[dict] = {'alpha': 0.5, 'color': 'C0'}#
The kwargs to pass to
fill_between()
- confidence_interval: float | bool = 0.95#
Confidence interval for the beam envelope. If
False, no confidence interval is shown.
- rayleigh_range_cap: float = 0.2#
During plotting, the interval of interest is automatically determined based on the Rayleigh range of the beam, for large Rayleigh ranges this can significantly inflate the plotted region, making the important features hard to see. This parameter limits this effect by capping the maximum Rayleigh range considered when determining the plotted interval.
- class PlotSolution#
Configuration of default values for mode matching solution plots.
- class SensitivityUnit(*values)#
Units for sensitivity analysis.
- PERCENT_PER_CM2 = ('%/cm^2', '\\%/\\mathrm{cm}^2', 0.01)#
- PERCENT_PER_MM2 = ('%/mm^2', '\\%/\\mathrm{mm}^2', 9.999999999999999e-05)#
- PER_M2 = ('%/m^2', '\\%/\\mathrm{m}^2', 1)#
- classmethod mpl_is_dark() bool#
Determine whether the current Matplotlib theme is dark by analyzing the figure background color.
- Return type:
- Returns:
Trueif the current Matplotlib theme is dark,Falseotherwise.
- static get(value, default) T#
Get a configuration value, using the default if the provided value is
None.
- sensitivity_unit = ('%/cm^2', '\\%/\\mathrm{cm}^2', 0.01)#
Unit for sensitivity analyses
- class corset.config.Unit(ascii: str, tex: str, factor: float)#
Unit representation with ASCII and LaTeX strings and conversion factor to base unit.
- count(value, /)#
Return number of occurrences of value.
- index(value, start=0, stop=9223372036854775807, /)#
Return first index of value.
Raises ValueError if the value is not present.