Commit 49f0100c authored by Maximilian Beckers's avatar Maximilian Beckers
Browse files

fix bugs

parent 734df776
......@@ -543,6 +543,7 @@ def lowPassFilter(mapFFT, frequencyMap, cutoff, shape):
fftObject = pyfftw.builders.irfftn(filteredftMap, shape, threads = numCores);
filteredMap = fftObject();
except:
filteredMap = np.fft.irfftn(filteredftMap, shape);
......
......@@ -71,10 +71,14 @@ def calculateConfidenceMap(em_map, apix, noiseBox, testProc, ecdf, lowPassFilter
# plot locations of noise estimation
if modelMap is None:
pp = mapUtil.makeDiagnosticPlot(em_map, wn, False, boxCoord);
print(
"Generating diagnostic plot of noise estimation. Please have a look in 'diag_image.pdf' that the molecule does not fall into the region used for background noise estimation.");
pp.savefig("diag_image.pdf");
pp.close();
else:
pp = mapUtil.makeDiagnosticPlot(em_map, wn, True, boxCoord);
print(
"Generating diagnostic plot of noise estimation. Please have a look in 'diag_image.pdf' that the molecule does not fall into the region used for background noise estimation.");
pp.savefig("diag_image.pdf");
pp.close();
......@@ -94,7 +98,8 @@ def calculateConfidenceMap(em_map, apix, noiseBox, testProc, ecdf, lowPassFilter
output = "Estimated noise statistics: mean: " + repr(mean) + " and variance: " + repr(var);
else:
output = "Using user provided noise statistics";
print(output);
print(output);
locFiltMap = None;
locScaleMap = None;
......
......@@ -126,8 +126,6 @@ def makeDiagnosticPlot(map, windowSize, locscale, boxCoord):
#*** function to make diagnostic plot of noise estimation ****
#*************************************************************
print("Generating diagnostic plot of noise estimation. Please have a look in 'diag_image.pdf' that the molecule does not fall into the region used for background noise estimation.")
from matplotlib.backends.backend_pdf import PdfPages
import matplotlib.gridspec as gridspec
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment