edu.rit.mri.test
Class GenData
- java.lang.Object
-
- edu.rit.mri.test.GenData
-
public class GenData extends java.lang.ObjectClass GenData is a main program that generates a spin signal data set.Usage: java edu.rit.mri.test.GenData seed stdev tmax nt ρ1 x1 [ ρ2 x2 . . . ]
The program:
- Initializes a pseudorandom number generator with seed.
- Generates nt values of t, unevenly spaced, up to tmax.
-
For each value of t, computes the spin signal
S(t) = Σi ρi [1 − 2 exp(−xi t)] where ρi is the i-th spin density and xi is the i-th spin relaxation rate. - For each spin signal value, adds random Gaussian noise with mean 0 and standard deviation stdev.
- Prints each value of t and the corresponding S(t) with noise on one line of the standard output.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static voidmain(java.lang.String[] args)Main program.
-
DMelt 3.0 © DataMelt by jWork.ORG