Commit 1932e760 authored by Thomas Kluyver's avatar Thomas Kluyver
Browse files

Set empty map for bad regions

parent 6b527a89
import os
from libc.stdlib cimport malloc, free
cimport numpy as cnp
from . cimport crystfel
......@@ -22,7 +23,9 @@ def find_peaks_single_panel(cnp.ndarray[cnp.npy_float, ndim=2] data, str geom_fi
crystfel.image image
image.dp[0] = <float*>
image.bad[0] = <int*>malloc(data.size * sizeof(int))
image.det = crystfel.get_detector_geometry(os.fsencode(geom_file), &beam)
print(f"Loaded geometry with {image.det.n_panels} panels")
&image, max_n_peaks=200, threshold=20, min_snr=3, min_pix_count=2,
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