use of gdsc.smlm.ij.plugins.pcpalm.PCPALMMolecules in project GDSC-SMLM by aherbert.
the class BlinkEstimator method calculateAveragePrecision.
private double calculateAveragePrecision(MemoryPeakResults results, boolean verbose) {
PCPALMMolecules fitter = new PCPALMMolecules();
ArrayList<Molecule> molecules = fitter.extractLocalisations(results);
String title = (verbose) ? TITLE + " Localisation Precision" : null;
double fittedAverage = fitter.calculateAveragePrecision(molecules, title, histogramBins, true, true);
// Sense check the precision
if (fittedAverage < 5 || fittedAverage > 60) {
GenericDialog gd = new GenericDialog(TITLE);
gd.addMessage("Estimated precision is not within expected bounds.\nPlease enter an estimate:");
gd.addSlider("Precision", 5, 60, fittedAverage);
gd.showDialog();
if (!gd.wasCanceled())
fittedAverage = gd.getNextNumber();
}
// The fitter does checks for a good fit to the histogram so just return the value
return fittedAverage;
}
Aggregations