Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cfel_fmt
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
cfel_fmt
Commits
f070e7c6
Commit
f070e7c6
authored
7 years ago
by
Valerio Mariani
Browse files
Options
Downloads
Patches
Plain Diff
Bug fixes for the CrystFEL module
parent
e881945a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
cfel_crystfel.py
+11
-11
11 additions, 11 deletions
cfel_crystfel.py
with
11 additions
and
11 deletions
cfel_crystfel.py
+
11
−
11
View file @
f070e7c6
...
...
@@ -24,7 +24,7 @@ from __future__ import print_function
from
__future__
import
unicode_literals
from
collections
import
OrderedDict
from
math
import
inf
,
sqrt
from
math
import
sqrt
import
re
...
...
@@ -52,18 +52,18 @@ def _dir_conv(direction_x, direction_y, direction_z, value):
raise
RuntimeError
(
'
Invalid Symbol: {} (must be x, y or z).
'
.
format
(
axis
))
if
item
[:
-
1
]
==
'
+
'
:
v
=
'
1.0
'
v
alue
=
'
1.0
'
elif
item
[:
-
1
]
==
'
-
'
:
v
=
'
-1.0
'
v
alue
=
'
-1.0
'
else
:
v
=
item
[
-
1
]
v
alue
=
item
[
:
-
1
]
if
axis
==
'
x
'
:
direction
[
0
]
=
float
(
v
)
direction
[
0
]
=
float
(
v
alue
)
elif
axis
==
'
y
'
:
direction
[
1
]
=
float
(
v
)
direction
[
1
]
=
float
(
v
alue
)
elif
axis
==
'
z
'
:
direction
[
2
]
=
float
(
v
)
direction
[
2
]
=
float
(
v
alue
)
return
direction
...
...
@@ -318,7 +318,7 @@ def _check_point(name, panel, fs, ss, min_d, max_d, detector):
def
_find_min_max_d
(
detector
):
min_d
=
inf
min_d
=
float
(
'
inf
'
)
max_d
=
0.0
for
name
,
panel
in
detector
[
'
panels
'
].
items
():
...
...
@@ -384,7 +384,7 @@ def load_crystfel_geometry(filename):
'
clen_for_centering
'
:
None
,
'
adu_per_eV
'
:
None
,
'
adu_per_photon
'
:
None
,
'
max_adu
'
:
inf
,
'
max_adu
'
:
float
(
'
inf
'
)
,
'
mask
'
:
None
,
'
mask_file
'
:
None
,
'
satmap
'
:
None
,
...
...
@@ -530,7 +530,7 @@ def load_crystfel_geometry(filename):
elif
dim_length
!=
len
(
panel
[
'
dim_structure
'
]):
raise
RuntimeError
(
'
Number of dim coordinates must be the same for all panels.
'
)
if
len
(
dim_length
)
==
1
:
if
dim_length
==
1
:
raise
RuntimeError
(
'
Number of dim coordinates must be at least two.
'
)
for
panel
in
detector
[
'
panels
'
].
values
():
...
...
@@ -575,7 +575,7 @@ def load_crystfel_geometry(filename):
panel
[
'
w
'
]
=
panel
[
'
origin_max_fs
'
]
-
panel
[
'
origin_min_fs
'
]
+
1
panel
[
'
h
'
]
=
panel
[
'
origin_max_ss
'
]
-
panel
[
'
origin_min_ss
'
]
+
1
for
bad_region
in
detector
[
'
bad
'
]:
for
bad_region
in
detector
[
'
bad
'
]
.
values
()
:
if
bad_region
[
'
is_fsss
'
]
==
99
:
raise
RuntimeError
(
'
Please specify the coordinate ranges for bad region {}.
'
.
format
(
bad_region
[
'
name
'
]))
...
...
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