corset.config#
Configuration for analysis and plotting functions.
- class corset.config.Config#
Configuration namespace for Beam Corset.
- 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 Repr#
Configuration IPython display representations.
- classmethod set_minimal()#
Set the table columns to a minimal set.
Equivalent to:
Config.Repr.solution_element_summary_columns = ["element", "shape", "position", "clearance_left", "clearance_right", "sensitivity"] Config.Repr.solution_summary_columns = ["overlap", "num_elements", "elements", "max_sensitivity", "min_coupling"] Config.Repr.lens_list_columns = ["name", "shape", "focal_length", "left_margin", "right_margin"]
- lens_list_columns: list[str] | None = None#
Subset of columns to show in the lens list representation table. If
None, all columns are shown.
- solution_element_summary: Literal['show', 'hide', 'expanded', 'collapsed'] = 'collapsed'#
Whether to show the element summary table in the solution representation. Options are: -
"show": Show the table. -"hide": Do not show the table. -"expanded": Show the table in an expanded details view. -"collapsed": Show the table in a collapsed details view.
- class Units#
Configuration of default units for displaying values in plots and tables.
- axial: LengthUnit = LengthUnit(unicode='mm', tex='\\mathrm{mm}', factor=0.001, decimals=0)#
Unit for axial length unit display
- fraction: FractionUnit = FractionUnit(unicode='%', tex='\\%', factor=0.01, decimals=1)#
Unit for overlap display
- radial: LengthUnit = LengthUnit(unicode='μm', tex='\\mathrm{\\mu m}', factor=1e-06, decimals=0)#
Unit for radial length unit display
- sensitivity: SensitivityUnit = SensitivityUnit(unicode='%/cm²', tex='\\%/\\mathrm{cm}^2', factor=100.0, decimals=2)#
Unit for sensitivity analysis display
- 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.