Class FitParams<I extends RealType<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 named xxMap are 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 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
      • 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 if noise is NoiseType.NOISE_CONST or NoiseType.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)
      • 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_DEFAULT by default)
      • restraintMin

        @Expose
        public float[] restraintMin
        The fit restraints (min or max) for each parameter. A parameter at index i will 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 being null or [i] == NaN), then -/+Inf is used instead and that parameter will not be bounded from below/above. The bounds only take effect if restrain is set to RestrainType.ECF_RESTRAIN_USER.
      • restraintMax

        @Expose
        public float[] restraintMax
        The fit restraints (min or max) for each parameter. A parameter at index i will 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 being null or [i] == NaN), then -/+Inf is used instead and that parameter will not be bounded from below/above. The bounds only take effect if restrain is set to RestrainType.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 than chisq_target (1 by default)
      • chisq_delta

        @Expose
        public float chisq_delta
        Stopping condition 2: stop if change in chi-squared is less than chisq_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 (overrides iThreshPercent)
      • iThreshPercent

        @Expose
        public float iThreshPercent
        Intensity threshold percentage
      • multithread

        @Expose
        public boolean multithread
        Enable multithread fitting (true by default)
      • getReturnCodeMap

        @Expose
        public boolean getReturnCodeMap
        Whether to generate an image representation for the return codes (false by default)
      • getParamMap

        @Expose
        public boolean getParamMap
        Whether to generate an image representation for fitted parameters (true by default)
      • getFittedMap

        @Expose
        public boolean getFittedMap
        Whether to generate an image representation for fitted transients (false by default)
      • getResidualsMap

        @Expose
        public boolean getResidualsMap
        Whether to generate an image representation for residuals (false by default)
      • getChisqMap

        @Expose
        public boolean getChisqMap
        Whether to generate an image representation for chi-squred (false by default)
    • Constructor Detail

      • FitParams

        public FitParams()
    • Method Detail

      • copy

        public FitParams<I> copy()
        Create a new instance of FitParams with shallow copy (maps are not duplicated).
        Returns:
        A clone of the current instance.
      • 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 by toJSON()
        Returns:
        the serialized parameters