Search in sources :

Example 6 with ParameterisedFitJob

use of uk.ac.sussex.gdsc.smlm.engine.ParameterisedFitJob in project GDSC-SMLM by aherbert.

the class PeakFit method createJob.

private FitJob createJob(int startFrame, int endFrame, float[] data, Rectangle bounds, float noise) {
    FitParameters fitParams = null;
    if (startFrame != endFrame) {
        fitParams = new FitParameters();
        fitParams.endT = endFrame;
    }
    if (maximaIdentification) {
        if (fitParams == null) {
            fitParams = new FitParameters();
        }
        fitParams.fitTask = FitTask.MAXIMA_IDENITIFICATION;
        fitParams.noise = noise;
    } else if (!Float.isNaN(noise)) {
        if (fitParams == null) {
            fitParams = new FitParameters();
        }
        fitParams.fitTask = FitTask.PSF_FITTING;
        fitParams.noise = noise;
    }
    if (fitParams != null) {
        return new ParameterisedFitJob(fitParams, startFrame, data, bounds);
    }
    return new FitJob(startFrame, data, bounds);
}
Also used : FitParameters(uk.ac.sussex.gdsc.smlm.engine.FitParameters) ParameterisedFitJob(uk.ac.sussex.gdsc.smlm.engine.ParameterisedFitJob) FitJob(uk.ac.sussex.gdsc.smlm.engine.FitJob) ParameterisedFitJob(uk.ac.sussex.gdsc.smlm.engine.ParameterisedFitJob)

Aggregations

FitParameters (uk.ac.sussex.gdsc.smlm.engine.FitParameters)6 ParameterisedFitJob (uk.ac.sussex.gdsc.smlm.engine.ParameterisedFitJob)6 Rectangle (java.awt.Rectangle)3 FitEngine (uk.ac.sussex.gdsc.smlm.engine.FitEngine)3 IJImageSource (uk.ac.sussex.gdsc.smlm.ij.IJImageSource)2 MemoryPeakResults (uk.ac.sussex.gdsc.smlm.results.MemoryPeakResults)2 ImagePlus (ij.ImagePlus)1 Point (java.awt.Point)1 Ticker (uk.ac.sussex.gdsc.core.logging.Ticker)1 BasePoint (uk.ac.sussex.gdsc.core.match.BasePoint)1 ImageExtractor (uk.ac.sussex.gdsc.core.utils.ImageExtractor)1 LocalList (uk.ac.sussex.gdsc.core.utils.LocalList)1 FitConfiguration (uk.ac.sussex.gdsc.smlm.engine.FitConfiguration)1 FitEngineConfiguration (uk.ac.sussex.gdsc.smlm.engine.FitEngineConfiguration)1 FitJob (uk.ac.sussex.gdsc.smlm.engine.FitJob)1 ImageSource (uk.ac.sussex.gdsc.smlm.results.ImageSource)1