Skip to content
Snippets Groups Projects
Commit 55a15e69 authored by Egor Sobolev's avatar Egor Sobolev
Browse files

Create empty mask if there is no mask in crystfel geometry file

parent 85ade029
No related branches found
No related tags found
Loading
...@@ -4,6 +4,9 @@ import pandas as pd ...@@ -4,6 +4,9 @@ import pandas as pd
from cfelpyutils.geometry import load_crystfel_geometry from cfelpyutils.geometry import load_crystfel_geometry
from natsort import natsorted from natsort import natsorted
from .geom import get_detector_shape
HEADER_TEMPLATE = """\ HEADER_TEMPLATE = """\
; {detector} geometry file written by geomtools ; {detector} geometry file written by geomtools
; You may need to edit this file to add: ; You may need to edit this file to add:
...@@ -163,5 +166,8 @@ def read_crystfel_geom(filename, indexes=dict()): ...@@ -163,5 +166,8 @@ def read_crystfel_geom(filename, indexes=dict()):
(np.bitwise_and(mask, mask_goodbits) != mask_goodbits) | (np.bitwise_and(mask, mask_goodbits) != mask_goodbits) |
(np.bitwise_and(mask, mask_badbits) != 0) (np.bitwise_and(mask, mask_badbits) != 0)
) )
else:
shape = get_detector_shape(panels)
mask = np.zeros(shape, bool)
return panels, geom.beam, mask return panels, geom.beam, mask
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment