Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Thomas Kluyver
Pycrystfel
Commits
5e201ee7
Commit
5e201ee7
authored
Jan 08, 2021
by
Thomas Kluyver
Browse files
Try reading geometry files with bindings
parent
82d9c045
Changes
2
Hide whitespace changes
Inline
Side-by-side
examples/inspect_geom.py
0 → 100644
View file @
5e201ee7
import
sys
from
pycrystfel.bindings
import
inspect_geom_file
inspect_geom_file
(
sys
.
argv
[
1
])
pycrystfel/bindings.pyx
View file @
5e201ee7
...
...
@@ -2,3 +2,9 @@ from . cimport crystfel
def
progress_bar
(
val
,
total
,
text
):
crystfel
.
progress_bar
(
val
,
total
,
text
.
encode
())
def
inspect_geom_file
(
path
):
cdef
crystfel
.
detector
*
det
det
=
crystfel
.
get_detector_geometry
(
path
)
print
(
"n_panels:"
,
det
.
n_panels
)
print
(
"panel names:"
,
[
det
.
panels
[
i
].
name
for
i
in
range
(
det
.
n_panels
)])
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment