corset.config#
Configuration for analysis and plotting functions.
- class corset.config.Config#
Configuration namespace for the mode matching solver.
- 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:
bool
- classmethod overlap_colors()#
Get the colors corresponding to the overlap levels.
- overlap_colormap: str = 'turbo'#
Colormap for overlap contours in plots
- overlap_levels: ClassVar = [80, 90, 95, 98, 99, 99.5, 99.8, 99.9, 100]#
Levels for overlap contours in plots
- overwrite_dark_theme: bool | None = None#
Override automatic detection of dark theme in plots
- plot_max_rayleigh_range: 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.
- 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.
- Parameters:
ascii (str)
tex (str)
factor (float)
- ascii: str#
ASCII representation of the unit
- factor: float#
Conversion factor to the SI base unit
- tex: str#
LaTeX representation of the unit