skultrafast.plot_helpers
¶
Created on Tue May 27 15:35:22 2014
@author: tillsten
Module Contents¶
Classes¶
A class which, when called, linearly normalizes data into the |
Functions¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
n-Significant Figures |
|
Returns a string with the value and error with correct siginificant figures |
|
Returns a string with the value and error with correct siginificant figures |
|
Helper funtion to generate a figure form axes sizes given in inches |
|
|
|
Labels the axes in figure |
|
Plots the given CI intervals. Needs the trace output from coinfidence |
|
|
|
Muliplies the y-data of the given lines by the given scale in the given range. |
Attributes¶
- skultrafast.plot_helpers.make_dual_axis(ax: matplotlib.pyplot.Axes = None, axis='x', unit='nm', minor_ticks=True)[source]¶
- skultrafast.plot_helpers.plot_trans(tup, wls, symlog=True, norm=False, marker=None, ax=None, **kwargs)[source]¶
- skultrafast.plot_helpers.plot_ints(tup, wls, factors=None, symlog=True, norm=False, is_wavelength=True, ax=None, **kwargs)[source]¶
- skultrafast.plot_helpers.mean_spec(wl, t, p, t_range, ax=None, pos=(0.1, 0.1), markers=['o', '^'])[source]¶
- skultrafast.plot_helpers.nice_map(wl, t, d, lvls=20, linthresh=10, linscale=1, norm=None, linscaley=1, cmap='coolwarm', **kwargs)[source]¶
- class skultrafast.plot_helpers.MidPointNorm(midpoint=0, vmin=None, vmax=None, clip=False)[source]¶
Bases:
matplotlib.colors.Normalize
A class which, when called, linearly normalizes data into the
[0.0, 1.0]
interval.- __call__(value, clip=None)[source]¶
Normalize value data in the
[vmin, vmax]
interval into the[0.0, 1.0]
interval and return it.- Parameters:
value – Data to normalize.
clip (bool, optional) –
See the description of the parameter clip in
.Normalize
.If
None
, defaults toself.clip
(which defaults toFalse
).
Notes
If not already initialized,
self.vmin
andself.vmax
are initialized usingself.autoscale_None(value)
.
- skultrafast.plot_helpers.fit_semiconductor(t, data, sav_n=11, sav_deg=4, mode='sav', tr=0.4)[source]¶
- skultrafast.plot_helpers.error_string(val: float, err: float, valname: str | None = None, unit: str | None = None) str [source]¶
Returns a string with the value and error with correct siginificant figures
- skultrafast.plot_helpers.error_string_lmfit(param: lmfit.Parameter, valname: str | None = None, unit: str | None = None) str [source]¶
Returns a string with the value and error with correct siginificant figures
- skultrafast.plot_helpers.fig_fixed_axes(axes_shape: Tuple[int, int], axes_size: Tuple[float, float], padding: float = 0.3, left_margin: float = 0.45, bot_margin: float = 0.42, hspace: float = 0.1, vspace: float = 0.1, xlabel: str | None = None, ylabel: str | None = None, **kwargs)[source]¶
Helper funtion to generate a figure form axes sizes given in inches
- skultrafast.plot_helpers.lbl_axes(axs=None, pos=(-0.2, -0.2), fmt='(%s)', labels=None, **kwargs)[source]¶
Labels the axes in figure
- Parameters:
axs (List[plt.Axes], optional) – The axes to label, by default None
pos (tuple, optional) – x, y position of the label in axis coordinates , by default (-.2, -.2)
fmt (str, optional) – Format string, by default “(%s)”
labels ([type], optional) – The label, by default None, resulting in a, b, c, …
kwargs – will be passed to ax.text.
- skultrafast.plot_helpers.ci_plot(ci_dict, trace)[source]¶
Plots the given CI intervals. Needs the trace output from coinfidence intervals. Currently assumes the CI are calculated for 1,2 and 3 sigmas.
- skultrafast.plot_helpers.scale_y(lines: List[matplotlib.pyplot.Line2D], scale: float, x_range: Tuple[float, float])[source]¶
Muliplies the y-data of the given lines by the given scale in the given range. Also inserts a Nan at the beginning and end of the range to prevent the line from being connected to the rest of the data.