nqr_blochsimulator.classes.simulation#

Classes

Simulation(sample,Β number_isochromats,Β ...)

Class for the simulation of the Bloch equations.

class nqr_blochsimulator.classes.simulation.Simulation(sample: Sample, number_isochromats: int, initial_magnetization: float, gradient: float, noise: float, length_coil: float, diameter_coil: float, number_turns: float, q_factor_transmit: float, q_factor_receive: float, power_amplifier_power: float, pulse: PulseArray, averages: int, gain: float, temperature: float, loss_TX: float = 0, loss_RX: float = 0, conversion_factor: float = 1)#

Class for the simulation of the Bloch equations.

property averages: int#

Number of averages that are used for the simulation.

bloch_symmetric_strang_splitting(B1, xdis, real_pulsepower, imag_pulsepower, relax=1)#

This method simulates the Bloch equations using the symmetric strang splitting method.

Parameters:
  • B1 (float) – The B1 field of the solenoid coil.

  • xdis (np.array) – The x distribution of the isochromats.

  • real_pulsepower (np.array) – The real part of the pulse power.

  • imag_pulsepower (np.array) – The imaginary part of the pulse power.

  • relax (float) – If relax = 1, the relaxation is taken into account. If relax = 0, the relaxation is not taken into account.

calc_B1() float#

This method calculates the B1 field of our solenoid coil based on the coil parameters and the power amplifier power.

Returns:

B1 – The B1 field of the solenoid coil in T.

Return type:

float

calc_xdis() array#

Calculates the x distribution of the isochromats.

Returns:

xdis – The x distribution of the isochromats.

Return type:

np.array

calculate_noise(timedomain_signal: array) array#

Calculates the noise array that is added to the signal.

Parameters:

timedomain_signal (np.array) – The time domain signal that is used for the simulation.

Returns:

noise_data – The noise array that is added to the signal.

Return type:

np.array

calculate_reference_voltage() float#

This calculates the reference voltage of the measurement setup for the sample at a certain temperature.

Returns:

reference_voltage – The reference voltage of the measurement setup for the sample at a certain temperature in Volts.

Return type:

float

property diameter_coil: float#

Diameter of the coil in meters.

property gain: float#

Gain of the amplifier.

property gradient: float#

Gradient of the magnetic field in mt/M.

property initial_magnetization: float#

Initial magnetization of the sample.

property length_coil: float#

Length of the coil in meters.

property noise: float#

RMS Noise of the measurement setup in Volts

property number_isochromats: int#

Number of isochromats used for the simulation.

property number_turns: float#

Number of turns of the coil.

property power_amplifier_power: float#

Power of the power amplifier in Watts.

property pulse: PulseArray#

Pulse that is used for the simulation.

property q_factor_receive: float#

Q-factor of the receive path of the probe coil.

property q_factor_transmit: float#

Q-factor of the transmit path of the probe coil.

property sample: Sample#

Sample that is used for the simulation.

property temperature: float#

Temperature of the sample.