Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
geomtools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dataAnalysis
geomtools
Commits
55a15e69
Commit
55a15e69
authored
7 months ago
by
Egor Sobolev
Browse files
Options
Downloads
Patches
Plain Diff
Create empty mask if there is no mask in crystfel geometry file
parent
85ade029
No related branches found
No related tags found
Loading
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/geomtools/detector/crystfel_frm.py
+6
-0
6 additions, 0 deletions
src/geomtools/detector/crystfel_frm.py
with
6 additions
and
0 deletions
src/geomtools/detector/crystfel_frm.py
+
6
−
0
View file @
55a15e69
...
@@ -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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment