Search in sources :

Example 1 with PSFCalculatorSettings

use of uk.ac.sussex.gdsc.smlm.ij.settings.GUIProtos.PSFCalculatorSettings in project GDSC-SMLM by aherbert.

the class PsfCalculator method run.

@Override
public void run(String arg) {
    SmlmUsageTracker.recordPlugin(this.getClass(), arg);
    final PSFCalculatorSettings settings = SettingsManager.readPsfCalculatorSettings(0);
    final double sd = calculate(settings, false);
    if (sd < 0) {
        return;
    }
    SettingsManager.writeSettings(this.settingsBuilder);
    final FitEngineConfiguration config = SettingsManager.readFitEngineConfiguration(0);
    final FitConfiguration fitConfig = config.getFitConfiguration();
    fitConfig.setNmPerPixel(getPixelPitch());
    fitConfig.setPsfType(PSFType.ONE_AXIS_GAUSSIAN_2D);
    fitConfig.setInitialPeakStdDev(sd);
    SettingsManager.writeSettings(config, 0);
}
Also used : PSFCalculatorSettings(uk.ac.sussex.gdsc.smlm.ij.settings.GUIProtos.PSFCalculatorSettings) FitEngineConfiguration(uk.ac.sussex.gdsc.smlm.engine.FitEngineConfiguration) FitConfiguration(uk.ac.sussex.gdsc.smlm.engine.FitConfiguration)

Aggregations

FitConfiguration (uk.ac.sussex.gdsc.smlm.engine.FitConfiguration)1 FitEngineConfiguration (uk.ac.sussex.gdsc.smlm.engine.FitEngineConfiguration)1 PSFCalculatorSettings (uk.ac.sussex.gdsc.smlm.ij.settings.GUIProtos.PSFCalculatorSettings)1