mrsprint.simulator package¶
Submodules¶
mrsprint.simulator.old_plot module¶
mrsprint.simulator.plot module¶
mrsprint.simulator.simulator module¶
Module contents¶
Package for simulator related classes and objects.
- Authors:
- Daniel Cosmo Pizetta <daniel.pizetta@usp.br>
- Since:
- 2018/06/07
Todo
Maybe remove old_plot module.
-
mrsprint.simulator.calculate_t2_star(t2, freq_shift)[source]¶ Returns the value for t2*, considering the range of frequencies.
Parameters: Returns: T2 star value.
Return type: float [s]
Todo
Confirm if it is the right way to calculate or if it has a weight function for t2star Pass freq_shift as a number?
-
mrsprint.simulator.create_positions(size=(1, 1, 1), step=(1.0, 1.0, 1.0), offset=(0.0, 0.0, 0.0), dtype=<class 'numpy.float32'>)[source]¶ Creates array of positions.
Parameters: Returns: - Position array in this format [[gr_x_plotx gr_y_plotx gr_z_plotx …]
[gr_x_ploty gr_y_ploty gr_z_ploty …][gr_x_plotz gr_y_plotz gr_z_plotz …]], where p is the number of position (from offset to size plus offset).
Return type: np.array
Todo
Set physical unit for each args.
-
mrsprint.simulator.frequency_shift(freq_shift, freq_step=1.0, offset=0.0, symetric=True, dtype=<class 'numpy.float32'>)[source]¶ Generates an array of frequency shift, from -frequency_shift to +frequency_shift, between offset.
Parameters: - freq_shift (float [Hz]) – Maximum frequency to shift.
- freq_step (float [Hz]) – Spacing between values.
- offset (float [Hz]) – Offset frequency.
- symetric (bool) – If true, generates the array between offset (-maximum shift, maximum shift), otherwise from offset to maximum frequency. Default is True.
- dtype (np.dtype) – Data type for the array. Default is np.float32.
Returns: Array of frequency shift value.
Return type: np.array [Hz]
Todo
Use the key symetric for something.
-
mrsprint.simulator.reduce_magnetization_in_frequency(mx, my, mz, freq_shift, fsa_size)[source]¶ Reduces the magnetization vector by summing frequency components.
Parameters: - mx (np.array) – Array of magnetization x without reduction in frequency.
- my (np.array) – Array of magnetization y without reduction in frequency.
- mz (np.array) – Array of magnetization z without reduction in frequency.
- freq_shift (np.array) – Array of frequency shift.
- fsa_size (int) – Size of array of frequency shift.
Returns: (mx, my, mz) arrays of magnetization reduced
Return type: Todo
Shape size different of 2. Better solution for freq_shift array. Set physical unit for each args.
-
mrsprint.simulator.reduce_magnetization_in_position(mx, my, mz, position, freq_shift)[source]¶ Reduces the magnetization vector by summing position components.
Parameters: - mx (np.array) – Array of x magnetization without reduction in frequency.
- my (np.array) – Array of y magnetization without reduction in frequency.
- mz (np.array) – Array of z magnetization without reduction in frequency.
- position (np.array) – Array of positions.
- freq_shift (np.array) – Array of frequency shift.
Returns: (mx, my, mz) arrays of magnetization reduced.
Return type: Todo
Test shape size different of 2. Set physical unit for each args.