pyepr.fieldsweep_analysis.FieldSweepAnalysis¶
- class pyepr.fieldsweep_analysis.FieldSweepAnalysis(dataset)[source]¶
Analysis and calculation of FieldSweep Experiment.
- Parameters:
- datasetxarray.Dataarray
_description_
- Parameters:
dataset (xarray.DataArray)
Attributes
Methods
- calc_gyro(freq=None, **kwargs)[source]¶
Calculates the gyromagnetic ratio for a given frequency
- Parameters:
- det_frqfloat
The detection frequency for the field sweep.
- Returns:
- float
The gyromagnetic ratio in G/GHz.
- Parameters:
freq (float)
- Return type:
float
- smooth(smoothing_factor=0.01, *args, **kwargs)[source]¶
Generates a smoothed version of the data using a 1D smoothing spline.
- Parameters:
- smoothing_factorfloat, optional
The smoothing factor of the spline, by default 0.01. A value of 0 will interpolate the data and None will set the smoothing factor to the number of points.
- Returns:
- np.ndarray
The smoothed data.
- plot(norm=True, axis='field', bandwidth=False, axs=None, fig=None)[source]¶
Generate a field sweep plot
- Parameters:
- normbool, optional
Nomarlisation of the plot to a maximum of 1, by default True
- axisstr, optional
plot field sweep on either the “field” axis or “freq” axis
- bandwidthbool, optional
If True, the bandwidth is calculated and displayed on the plot, by default False
- axsMatplotlib.Axes, optional
Matplotlib axes to plot on, by default None
- figMatplotlib.Figure, optional
Matplotlib figure to plot on, by default None
- Returns:
- Matplotlib.Figure
matplotlib figure
- Parameters:
norm (bool)
axis (str)
- Return type:
matplotlib.figure.Figure