Skip to content

Commit

Permalink
fix wavelength for empty peak lists
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Dalton committed Jun 24, 2024
1 parent 6a37e86 commit c784115
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions reciprocalspaceship/io/crystfel.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ def parallel_read_crystfel(
chunks : list
A list of dictionaries containing the per-chunk data. The 'peak_lists' item contains a
numpy array with shape n x 14 with the following information.
h, k, l, I, SIGI, peak, background, fs/px, ss/px, s1_x, s1_y, s1_z,
h, k, l, I, SIGI, peak, background, fs/px, ss/px, s1x, s1y, s1z,
ewald_offset, angular_ewald_offset
"""
if peak_list_columns is not None:
Expand Down Expand Up @@ -362,7 +362,8 @@ def _parse_chunk(
ev_match = self.re_photon_energy.search(data)
ev_line = data[ev_match.start() : ev_match.end()]
photon_energy = np.float32(ev_line.split()[2])
lambda_inv = np.reciprocal(eV2Angstroms(photon_energy))
wavelength = eV2Angstroms(photon_energy)
lambda_inv = np.reciprocal(wavelength)
else:
lambda_inv = np.reciprocal(wavelength)

Expand Down

0 comments on commit c784115

Please sign in to comment.