Search in sources :

Example 1 with GaussianPSFModel

use of gdsc.smlm.model.GaussianPSFModel in project GDSC-SMLM by aherbert.

the class CreateData method createPSFModel.

private PSFModel createPSFModel(ImagePSFModel imagePSFModel) {
    if (imagePSF) {
        PSFModel copy = imagePSFModel.copy();
        copy.setRandomGenerator(createRandomGenerator());
        return copy;
    } else if (settings.psfModel.equals(PSF_MODELS[0])) {
        // Calibration based on imaging fluorescent beads at 20nm intervals.
        // Set the PSF to 1.5 x FWHM at 450nm
        double sd = getPsfSD();
        return new GaussianPSFModel(createRandomGenerator(), sd, sd, 450.0 / settings.pixelPitch);
    } else {
        // Airy pattern
        double width = getPsfSD() / PSFCalculator.AIRY_TO_GAUSSIAN;
        AiryPSFModel m = new AiryPSFModel(createRandomGenerator(), width, width, 450.0 / settings.pixelPitch);
        m.setRing(2);
        return m;
    }
}
Also used : AiryPSFModel(gdsc.smlm.model.AiryPSFModel) GaussianPSFModel(gdsc.smlm.model.GaussianPSFModel) ImagePSFModel(gdsc.smlm.model.ImagePSFModel) PSFModel(gdsc.smlm.model.PSFModel) AiryPSFModel(gdsc.smlm.model.AiryPSFModel) GaussianPSFModel(gdsc.smlm.model.GaussianPSFModel)

Aggregations

AiryPSFModel (gdsc.smlm.model.AiryPSFModel)1 GaussianPSFModel (gdsc.smlm.model.GaussianPSFModel)1 ImagePSFModel (gdsc.smlm.model.ImagePSFModel)1 PSFModel (gdsc.smlm.model.PSFModel)1