Search in sources :

Example 1 with SpotFilter

use of gdsc.smlm.filters.SpotFilter in project GDSC-SMLM by aherbert.

the class PeakFit method createFitEngine.

/**
	 * Creates a fitting engine using the current configuration.
	 * 
	 * @param numberOfThreads
	 * @param queue
	 * @param queueSize
	 * @return The fiting engine
	 */
public FitEngine createFitEngine(int numberOfThreads, FitQueue queue, int queueSize) {
    PeakResults r = results;
    if (results.numberOfOutputs() == 1)
        // Reduce to single object for speed
        r = results.toArray()[0];
    // Update the configuration
    updateFitConfiguration(config);
    FitEngine engine = new FitEngine(config, r, numberOfThreads, queue, queueSize);
    // Write settings out to the IJ log
    if (resultsSettings.logProgress) {
        IJ.log("-=-=-=-");
        IJ.log("Peak Fit");
        IJ.log("-=-=-=-");
        Utils.log("Initial Peak SD = %s,%s", Utils.rounded(fitConfig.getInitialPeakStdDev0()), Utils.rounded(fitConfig.getInitialPeakStdDev1()));
        SpotFilter spotFilter = engine.getSpotFilter();
        IJ.log("Spot Filter = " + spotFilter.getDescription());
        int w = 2 * engine.getFitting() + 1;
        Utils.log("Fit window = %d x %d", w, w);
        if (!fitConfig.isDisableSimpleFilter()) {
            IJ.log("Coordinate shift = " + Utils.rounded(config.getFitConfiguration().getCoordinateShift()));
            IJ.log("Signal strength = " + Utils.rounded(fitConfig.getSignalStrength()));
        }
        if (fitConfig.isDirectFilter())
            IJ.log("Smart filter = " + fitConfig.getSmartFilter().getDescription());
        if (extraOptions)
            IJ.log("Noise = " + Utils.rounded(fitConfig.getNoise()));
        IJ.log("Width factor = " + Utils.rounded(fitConfig.getWidthFactor()));
        IJ.log("-=-=-=-");
    }
    return engine;
}
Also used : FitEngine(gdsc.smlm.engine.FitEngine) PeakResults(gdsc.smlm.results.PeakResults) IJTablePeakResults(gdsc.smlm.ij.results.IJTablePeakResults) MemoryPeakResults(gdsc.smlm.results.MemoryPeakResults) IJImagePeakResults(gdsc.smlm.ij.results.IJImagePeakResults) BinaryFilePeakResults(gdsc.smlm.results.BinaryFilePeakResults) MALKFilePeakResults(gdsc.smlm.results.MALKFilePeakResults) FilePeakResults(gdsc.smlm.results.FilePeakResults) SpotFilter(gdsc.smlm.filters.SpotFilter)

Aggregations

FitEngine (gdsc.smlm.engine.FitEngine)1 SpotFilter (gdsc.smlm.filters.SpotFilter)1 IJImagePeakResults (gdsc.smlm.ij.results.IJImagePeakResults)1 IJTablePeakResults (gdsc.smlm.ij.results.IJTablePeakResults)1 BinaryFilePeakResults (gdsc.smlm.results.BinaryFilePeakResults)1 FilePeakResults (gdsc.smlm.results.FilePeakResults)1 MALKFilePeakResults (gdsc.smlm.results.MALKFilePeakResults)1 MemoryPeakResults (gdsc.smlm.results.MemoryPeakResults)1 PeakResults (gdsc.smlm.results.PeakResults)1