trinidi.simulate#
Some simulation related functions and classes.
Functions
|
Generate a circle mask with array size of size N`x`N. |
|
Generate example data. |
|
Generate example parameters for simulation |
|
Generate a rose phantom with array size of size N`x`N. |
Classes
|
Represent spectrum y(t_A) using only a few coefficient, coeffs. |
- class trinidi.simulate.SimpleSpectrum(t_A=None, y=None, N=None, coeffs=None)[source]#
Bases:
object
Represent spectrum y(t_A) using only a few coefficient, coeffs.
y(t) ≈ exp( a_0 + a_1 (log t) + a_2 (log t)^2 + a_3 (log t)^3)
- where t: t_A
a_i: coeffs
Initialize either with [y and t_A, N] or directly with coeffs.
- Parameters:
t_A (array, optional) – t_A vector
y (array, optional) – spectrum vector
N (scalar, optional) – number of coefficients
coeffs (array/list, optional) – coefficients
- trinidi.simulate.generate_spectra(t_A, acquisition_time=1)[source]#
Generate example parameters for simulation
- trinidi.simulate.circle_mask(N, center=None, radius=1)[source]#
Generate a circle mask with array size of size N`x`N.