Search in sources :

Example 1 with TurboLog2

use of uk.ac.sussex.gdsc.smlm.function.TurboLog2 in project GDSC-SMLM by aherbert.

the class LvmGradientProcedureTest method gradientProcedureFastLogMleCannotComputeGradientWithHighPrecision.

@Disabled("This test now passes as the tolerance for computing the gradient has been lowered " + " so that the tests pass under a stress test using many different random seeds.")
@SeededTest
void gradientProcedureFastLogMleCannotComputeGradientWithHighPrecision(RandomSeed seed) {
    // Try different precision
    for (int n = FastLog.N; n < 23; n++) {
        try {
            // logger.fine(FunctionUtils.getSupplier("Precision n=%d", n);
            fastLog = new TurboLog2(n);
            gradientProcedureComputesGradient(seed, new SingleFreeCircularErfGaussian2DFunction(blockWidth, blockWidth), Type.FAST_LOG_MLE, false);
        } catch (final AssertionError ex) {
            continue;
        } finally {
            // Reset
            fastLog = null;
        }
        return;
    }
    Assertions.fail();
}
Also used : TurboLog2(uk.ac.sussex.gdsc.smlm.function.TurboLog2) SingleFreeCircularErfGaussian2DFunction(uk.ac.sussex.gdsc.smlm.function.gaussian.erf.SingleFreeCircularErfGaussian2DFunction) SeededTest(uk.ac.sussex.gdsc.test.junit5.SeededTest) Disabled(org.junit.jupiter.api.Disabled)

Aggregations

Disabled (org.junit.jupiter.api.Disabled)1 TurboLog2 (uk.ac.sussex.gdsc.smlm.function.TurboLog2)1 SingleFreeCircularErfGaussian2DFunction (uk.ac.sussex.gdsc.smlm.function.gaussian.erf.SingleFreeCircularErfGaussian2DFunction)1 SeededTest (uk.ac.sussex.gdsc.test.junit5.SeededTest)1