autodeer.pulses
¶
Module Contents¶
Classes¶
Represents a general experimental pulse. |
|
Represents a detection pulse. |
|
DEPRECATION WARNING: THIS WILL BE REMOVED SOON. |
|
Represents a rectangular monochromatic pulse. |
|
Represents a Gaussian monochromatic pulse. |
|
A general parent class for Frequency Swept Pulses. |
|
Represents a hyperboilc secant frequency-swept pulse. |
|
Represents a linear frequency-swept pulse. |
|
Represents a general experimental pulse. |
Functions¶
|
- class autodeer.pulses.Pulse(*, tp, t=None, scale=None, flipangle=None, pcyc=[0], name=None, **kwargs)[source]¶
Represents a general experimental pulse.
The class for a general pulse.
- Parameters:
- tpfloat
The pulse length in ns.
- scalefloat
The arbitary experimental pulse amplitude, 0-1.
- tfloat, optional
The pulse start time in ns.
- _addPhaseCycle(phases, detections=None)[source]¶
Adds a phase cycle to the pulse sequence.
- Args:
phases (list): List of phases to add to the phase cycle. detections (list, optional): List of detection signs. Defaults to None. If None then all cycles are summed.
- Returns:
None
- _buildFMAM(func, ax=None)[source]¶
Builds the amplitude modulation (AM) and frequency modulation (FM) of a given function.
- Args:
func: A function that takes in an array of values and returns two arrays, representing the AM and FM of the function.
- Returns:
Two arrays representing the AM and FM of the function.
- build_table()[source]¶
Builds a table of variables, axes, and UUIDs for all non-static Parameters in the object.
- Returns:
dict: A dictionary containing the following keys: “Variable”, “axis”, and “uuid”. The values for each key are lists of the corresponding values for each non-static Parameter.
- is_static()[source]¶
Check if all parameters in the pulse object are static.
- Returns:
bool: True if all parameters are static, False otherwise.
- isDelayFocused()[source]¶
Does the pulse contain a specified time, t?
If so then it is not delay focused.
- isPulseFocused()[source]¶
Does the pulse contain a specified time, t?
If so then it is delay focused.
- plot(pad=1000)[source]¶
Plots the time domain representation of this pulse.
- Parameters:
- padint, optional
The number of zeros to pad the data with, by default 1000
- exciteprofile(freqs=None, resonator=None)[source]¶
Excitation profile
Generates the exciatation profiles for this pulse.
This function is ported from EasySpin (https://easyspin.org/easyspin/documentation/sop.html) [1-2], and based upon the method from Gunnar Jeschke, Stefan Pribitzer and Andrin Doll[3].
References:¶
[1] Stefan Stoll, Arthur Schweiger EasySpin, a comprehensive software package for spectral simulation and analysis in EPR J. Magn. Reson. 178(1), 42-55 (2006)
[2] Stefan Stoll, R. David Britt General and efficient simulation of pulse EPR spectra Phys. Chem. Chem. Phys. 11, 6614-6625 (2009)
[3] Jeschke, G., Pribitzer, S. & DollA. Coherence Transfer by Passage Pulses in Electron Paramagnetic Resonance Spectroscopy. J. Phys. Chem. B 119, 13570-13582 (2015)
- Parameters:
- freqs: np.ndarray, optional
The frequency axis. Caution: A larger number of points will linearly increase computation time.
- resonator: ad.ResonatorProfile, optional
- Returns:
- Mx: np.ndarray
The magentisation in the X direction.
- My: np.ndarray
The magentisation in the Y direction.
- Mz: np.ndarray
The magentisation in the Z direction.
- copy(clear=False, **kwargs)[source]¶
Creates a deep-copy of the pulse. I.e. Every parameter object is re-created at another memory space.
Parameter can be chaged at this stage by adding them as keyword- arguments (kwargs).
- Returns:
- Pulse
A deep copy of the pulse
- class autodeer.pulses.Detection(*, tp, t=None, freq=0, **kwargs)[source]¶
Bases:
Pulse
Represents a detection pulse.
A general detection pulse.
- Parameters:
- tpfloat
The total time of the detection event. The detection event will be symetrical about the centre time.
- tfloat, optional
The centre time of the detection event
- freq: float, optional
The detection frequency, not all spectrometer support this functionality, by default 0 MHz
- class autodeer.pulses.Delay(*, tp, t=None)[source]¶
Bases:
Pulse
DEPRECATION WARNING: THIS WILL BE REMOVED SOON.
Represents a inter-pulse delay pulse.
The class for a general pulse.
- Parameters:
- tpfloat
The pulse length in ns.
- scalefloat
The arbitary experimental pulse amplitude, 0-1.
- tfloat, optional
The pulse start time in ns.
- class autodeer.pulses.RectPulse(tp=16, freq=0, t=None, flipangle=None, **kwargs)[source]¶
Bases:
Pulse
Represents a rectangular monochromatic pulse.
- Parameters:
- tpflaot, optional
Pulse Length in ns, by default 16
- freqfloat,optional
Frequency in MHz, by default 0
- tfloat, optional
Time position in ns, by default None
- flipangle_type_, optional
The flip angle in radians, by default None
- class autodeer.pulses.GaussianPulse(*, tp=32, FWHM=16, freq=0, **kwargs)[source]¶
Bases:
Pulse
Represents a Gaussian monochromatic pulse.
Represents a Gaussian monochromatic pulse.
- Parameters:
- tpfloat
Pulse length in ns, by default 128
- FWHMfloat,
The full width at half maximum of the pulse
- freqfloat, optional
The frequency of the pulse, by default 0
- class autodeer.pulses.FrequencySweptPulse(*, tp, t=None, scale=None, flipangle=None, pcyc=[0], name=None, **kwargs)[source]¶
Bases:
Pulse
A general parent class for Frequency Swept Pulses.
The class for a general pulse.
- Parameters:
- tpfloat
The pulse length in ns.
- scalefloat
The arbitary experimental pulse amplitude, 0-1.
- tfloat, optional
The pulse start time in ns.
- class autodeer.pulses.HSPulse(*, tp=128, order1=1, order2=6, beta=20, **kwargs)[source]¶
Bases:
FrequencySweptPulse
Represents a hyperboilc secant frequency-swept pulse.
The class for a general pulse.
- Parameters:
- tpfloat
The pulse length in ns.
- scalefloat
The arbitary experimental pulse amplitude, 0-1.
- tfloat, optional
The pulse start time in ns.
- class autodeer.pulses.ChirpPulse(*, tp=128, **kwargs)[source]¶
Bases:
FrequencySweptPulse
Represents a linear frequency-swept pulse.
The class for a general pulse.
- Parameters:
- tpfloat
The pulse length in ns.
- scalefloat
The arbitary experimental pulse amplitude, 0-1.
- tfloat, optional
The pulse start time in ns.
- class autodeer.pulses.SincPulse(*, tp=128, freq=0, order=6, window=None, **kwargs)[source]¶
Bases:
Pulse
Represents a general experimental pulse.
Represents a sinc shaped monochromatic pulse.
- Parameters:
- tpint
Pulse length in ns, by default 128
- freqint, optional
The frequency of the pulse, by default 0
- orderint, optional
The order of this sinc function, by default 6
- window_type_, optional
The window function, by default None