- java.lang.Object
-
- org.scijava.ops.flim.FitParams<I>
-
- Type Parameters:
I- The type of the transient data.
public class FitParams<I extends RealType<I>> extends Object
The collection of all fit parameters required to perform a single fit of an image. Fields namedxxMapare image representations of the particular attribute. Other fields are not intended to be used by external programs and should be ignored when this object is processed with in the fitting ops.
-
-
Field Summary
Fields Modifier and Type Field Description floatchisq_deltaStopping condition 2: stop if change in chi-squared is less thanchisq_target(1E-4 by default)intchisq_percentConfidence interval when calculating the error axes (95% by default)floatchisq_targetStopping condition 1: stop if reduced chi-squared is less thanchisq_target(1 by default)booleandropBadWhether to declareFitResults.retCodeasFitResults.RET_BAD_FIT_CHISQ_OUT_OF_RANGEorFitResults.RET_BAD_FIT_DIVERGEDifFitResults.chisqis larger than 1e5 or less than 0.intfitEndThe end of the decay intervalflimlib.FitFuncfitFuncThe fitting model to use (Z + A_1e^(-t/tau_1) + A_2e^(-t/tau_2) + ...intfitStartThe start of the decay intervalbooleangetChisqMapWhether to generate an image representation for chi-squred (falseby default)booleangetFittedMapWhether to generate an image representation for fitted transients (falseby default)booleangetParamMapWhether to generate an image representation for fitted parameters (trueby default)booleangetResidualsMapWhether to generate an image representation for residuals (falseby default)booleangetReturnCodeMapWhether to generate an image representation for the return codes (falseby default)float[]instrThe array of instrument response (optional)floatiThreshIntensity threshold value (overridesiThreshPercent)floatiThreshPercentIntensity threshold percentageintltAxisThe index of lifetime axisbooleanmultithreadEnable multithread fitting (trueby default)intnCompThe number of exponential components of the fit (1 by default).flimlib.NoiseTypenoiseThe assumed noise model of the fit (Poisson by default) @see NoiseTypefloat[]paramThe estimated parameters of the fit (global setting)boolean[]paramFreeThe indicators of which of the parameters can be changedRandomAccessibleInterval<FloatType>paramMapThe image representation of the estimated parameters the fit (per-pixel setting, overidesparam)flimlib.RestrainTyperestrainThe fit restraint (RestrainType.ECF_RESTRAIN_DEFAULTby default)float[]restraintMaxThe fit restraints (min or max) for each parameter.float[]restraintMinThe fit restraints (min or max) for each parameter.RealMaskroiMaskThe ROI mask (test() returns true on interested regions)float[]sigThe standard deviation (sigma) of the data, used for calculating chi-squared ifnoiseisNoiseType.NOISE_CONSTorNoiseType.NOISE_GIVEN.float[]transThe transient data to fitRandomAccessibleInterval<I>transMapThe image representation of the datasetstatic intUNINITFields with this value are uninitializedfloatxIncThe time increment between two consecutive data points
-
Constructor Summary
Constructors Constructor Description FitParams()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description FitParams<I>copy()Create a new instance ofFitParamswith shallow copy (maps are not duplicated).static <I extends RealType<I>>
FitParams<I>fromJSON(String jsonString)Creates a FitParams from serialized JSON string.StringtoJSON()Serialize this FitParams into a JSON string.StringtoString()
-
-
-
Field Detail
-
UNINIT
@Expose public static final int UNINIT
Fields with this value are uninitialized- See Also:
- Constant Field Values
-
xInc
@Expose public float xInc
The time increment between two consecutive data points
-
trans
public float[] trans
The transient data to fit
-
ltAxis
@Expose public int ltAxis
The index of lifetime axis
-
transMap
public RandomAccessibleInterval<I extends RealType<I>> transMap
The image representation of the dataset
-
roiMask
public RealMask roiMask
The ROI mask (test() returns true on interested regions)
-
fitStart
@Expose public int fitStart
The start of the decay interval
-
fitEnd
@Expose public int fitEnd
The end of the decay interval
-
instr
@Expose public float[] instr
The array of instrument response (optional)
-
noise
@Expose public flimlib.NoiseType noise
The assumed noise model of the fit (Poisson by default) @see NoiseType
-
sig
@Expose public float[] sig
The standard deviation (sigma) of the data, used for calculating chi-squared ifnoiseisNoiseType.NOISE_CONSTorNoiseType.NOISE_GIVEN.
-
nComp
@Expose public int nComp
The number of exponential components of the fit (1 by default). This parameter is only used by LMA and Global ops, ignored otherwise.
-
param
@Expose public float[] param
The estimated parameters of the fit (global setting)
-
paramMap
public RandomAccessibleInterval<FloatType> paramMap
The image representation of the estimated parameters the fit (per-pixel setting, overidesparam)
-
paramFree
@Expose public boolean[] paramFree
The indicators of which of the parameters can be changed
-
restrain
@Expose public flimlib.RestrainType restrain
The fit restraint (RestrainType.ECF_RESTRAIN_DEFAULTby default)
-
restraintMin
@Expose public float[] restraintMin
The fit restraints (min or max) for each parameter. A parameter at indexiwill be restrained during the fit in the range(restraintMin[i], restraintMax[i]). If any of the two bounds are not present (due to the array beingnullor[i] == NaN), then-/+Infis used instead and that parameter will not be bounded from below/above. The bounds only take effect ifrestrainis set toRestrainType.ECF_RESTRAIN_USER.
-
restraintMax
@Expose public float[] restraintMax
The fit restraints (min or max) for each parameter. A parameter at indexiwill be restrained during the fit in the range(restraintMin[i], restraintMax[i]). If any of the two bounds are not present (due to the array beingnullor[i] == NaN), then-/+Infis used instead and that parameter will not be bounded from below/above. The bounds only take effect ifrestrainis set toRestrainType.ECF_RESTRAIN_USER.
-
fitFunc
@Expose public flimlib.FitFunc fitFunc
The fitting model to use (Z + A_1e^(-t/tau_1) + A_2e^(-t/tau_2) + ... by default)
-
chisq_target
@Expose public float chisq_target
Stopping condition 1: stop if reduced chi-squared is less thanchisq_target(1 by default)
-
chisq_delta
@Expose public float chisq_delta
Stopping condition 2: stop if change in chi-squared is less thanchisq_target(1E-4 by default)
-
chisq_percent
@Expose public int chisq_percent
Confidence interval when calculating the error axes (95% by default)
-
iThresh
@Expose public float iThresh
Intensity threshold value (overridesiThreshPercent)
-
iThreshPercent
@Expose public float iThreshPercent
Intensity threshold percentage
-
multithread
@Expose public boolean multithread
Enable multithread fitting (trueby default)
-
dropBad
@Expose public boolean dropBad
Whether to declareFitResults.retCodeasFitResults.RET_BAD_FIT_CHISQ_OUT_OF_RANGEorFitResults.RET_BAD_FIT_DIVERGEDifFitResults.chisqis larger than 1e5 or less than 0.
-
getReturnCodeMap
@Expose public boolean getReturnCodeMap
Whether to generate an image representation for the return codes (falseby default)
-
getParamMap
@Expose public boolean getParamMap
Whether to generate an image representation for fitted parameters (trueby default)
-
getFittedMap
@Expose public boolean getFittedMap
Whether to generate an image representation for fitted transients (falseby default)
-
getResidualsMap
@Expose public boolean getResidualsMap
Whether to generate an image representation for residuals (falseby default)
-
getChisqMap
@Expose public boolean getChisqMap
Whether to generate an image representation for chi-squred (falseby default)
-
-
Method Detail
-
copy
public FitParams<I> copy()
Create a new instance ofFitParamswith shallow copy (maps are not duplicated).- Returns:
- A clone of the current instance.
-
toJSON
public String toJSON()
- Returns:
- the JSON string
-
fromJSON
public static <I extends RealType<I>> FitParams<I> fromJSON(String jsonString)
Creates a FitParams from serialized JSON string.- Type Parameters:
I- data type- Parameters:
jsonString- the JSON string produced bytoJSON()- Returns:
- the serialized parameters
-
-