use of uk.ac.sussex.gdsc.core.data.utils.Rounder in project GDSC-SMLM by aherbert.
the class AstigmatismModelManager method saveResult.
private void saveResult(Optimum optimum) {
final StringBuilder sb = new StringBuilder();
final Rounder rounder = RounderUtils.create(4);
sb.append(fitZ.length * 2);
sb.append('\t').append(pluginSettings.getWeightedFit());
sb.append('\t').append(MathUtils.rounded(optimum.getRMS(), 6));
sb.append('\t').append(optimum.getIterations());
sb.append('\t').append(optimum.getEvaluations());
sb.append('\t').append(rounder.round(parameters[P_GAMMA]));
sb.append('\t').append(rounder.round(parameters[P_D]));
sb.append('\t').append(rounder.round(parameters[P_S0X]));
sb.append('\t').append(rounder.round(parameters[P_AX]));
sb.append('\t').append(rounder.round(parameters[P_BX]));
sb.append('\t').append(rounder.round(parameters[P_S0Y]));
sb.append('\t').append(rounder.round(parameters[P_AY]));
sb.append('\t').append(rounder.round(parameters[P_BY]));
sb.append('\t').append(rounder.round(parameters[P_Z0]));
createResultWindow().append(sb.toString());
}
use of uk.ac.sussex.gdsc.core.data.utils.Rounder in project GDSC-SMLM by aherbert.
the class AstigmatismModelManager method record.
private static void record(String name, double[] parameters) {
final StringBuilder sb = new StringBuilder(name);
final Rounder rounder = RounderUtils.create(4);
sb.append(": ").append("gamma=").append(rounder.round(parameters[P_GAMMA]));
sb.append("; ").append("d=").append(rounder.round(parameters[P_D]));
sb.append("; ").append("s0x=").append(rounder.round(parameters[P_S0X]));
sb.append("; ").append("Ax=").append(rounder.round(parameters[P_AX]));
sb.append("; ").append("Bx=").append(rounder.round(parameters[P_BX]));
sb.append("; ").append("s0y=").append(rounder.round(parameters[P_S0Y]));
sb.append("; ").append("Ay=").append(rounder.round(parameters[P_AY]));
sb.append("; ").append("By=").append(rounder.round(parameters[P_BY]));
sb.append("; ").append("z0=").append(rounder.round(parameters[P_Z0]));
IJ.log(sb.toString());
}
Aggregations