Commit 62c8d927 authored by Thomas Kluyver's avatar Thomas Kluyver
Browse files

Try getting beam parameters from geometry file too

parent 9b0b8095
......@@ -7,6 +7,8 @@ def progress_bar(val, total, text):
def inspect_geom_file(path):
cdef crystfel.detector *det
det = crystfel.get_detector_geometry(os.fsencode(path), NULL)
cdef crystfel.beam_params beam
det = crystfel.get_detector_geometry(os.fsencode(path), &beam)
print("n_panels:", det.n_panels)
print("panel names:", [det.panels[i].name for i in range(det.n_panels)])
print("photon energy:", beam.photon_energy)
......@@ -46,13 +46,13 @@ cdef extern from "crystfel/spectrum.h":
pass # Opaque struct, used through functions
cdef extern from "crystfel/image.h":
ctypedef struct beam_params:
cdef struct beam_params:
double photon_energy
char *photon_energy_from
double photon_energy_scale
double bandwidth
ctypedef struct imagefeature: # description of a peak
cdef struct imagefeature: # description of a peak
image *parent
panel *p
double intensity
......@@ -81,7 +81,7 @@ cdef extern from "crystfel/image.h":
ImageFeatureList * sort_peaks (ImageFeatureList *flist)
ctypedef struct image:
cdef struct image:
float **dp
int **bad
float **sat
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