pyepr.HahnEchoRelaxationAnalysis ================================ .. py:class:: pyepr.HahnEchoRelaxationAnalysis(dataset) Analysis, fitting and plotting for the HahnEchoRelaxation Sequence. :Parameters: **dataset** : xarray.DataArray The dataset to be analysed, with the time axis contained. :Attributes: **axis** : xr.DataArray The time axis representing the interpulse delay. .. !! processed by numpydoc !! .. py:attribute:: data .. py:attribute:: dataset .. py:attribute:: noise .. py:method:: fit(type = 'mono', **kwargs) Fit the experimental CP decay :Parameters: **type** : str, optional Either a mono or double exponential decay model, by default "mono" .. !! processed by numpydoc !! .. py:method:: plot(norm = True, ci=50, axs=None, fig=None) Plot the carr purcell decay with fit, if avaliable. :Parameters: **norm** : bool, optional Normalise the fit to a maximum of 1, by default True **ci** : int, optional The percentage confidence interval to plot, by default 50 :Returns: Figure The figure. .. !! processed by numpydoc !! .. py:method:: check_decay(level=0.1) Checks that the data has decayed by over 90% in the first half, and less than 90% in the first quarter. :Parameters: **level** : float, optional The level to check the decay, by default 0.05 :Returns: int 0 if both conditions are met, 1 if a longer decay is needed, and -1 if the decay is too long. .. !! processed by numpydoc !! .. py:method:: __call__(x, norm=True, SNR=False, source=None) Evaluate the fit or data at a given x value. :Parameters: **x** : float The x value to evaluate the data at. **norm** : bool, optional Normalise the data to the maximum, by default True **SNR** : bool, optional Return the SNR_per_sqrt(shot) for this data point, by default False **source** : str, optional The source of the data, either 'fit' or 'data', by default None If None, the source is determined by the presence of a fit result. .. !! processed by numpydoc !!