Skip to content

Commit

Permalink
Use arrays, not references, in the archive.results section
Browse files Browse the repository at this point in the history
  • Loading branch information
ka-sarthak committed Sep 5, 2024
1 parent 278e592 commit fafa271
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/nomad_measurements/xrd/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -885,13 +885,14 @@ def normalize(self, archive: 'EntryArchive', logger: 'BoundLogger'):
if not archive.results.properties.structural:
diffraction_patterns = []
for result in self.results:
if len(result.intensity.shape) == 1:
intensity = get_data(result, 'intensity')
if len(intensity.shape) == 1:
diffraction_patterns.append(
DiffractionPattern(
incident_beam_wavelength=result.source_peak_wavelength,
two_theta_angles=result.two_theta,
two_theta_angles=get_data(result, 'two_theta'),
intensity=result.intensity,
q_vector=result.q_norm,
q_vector=get_data(result, 'q_norm'),
)
)
archive.results.properties.structural = StructuralProperties(
Expand Down

0 comments on commit fafa271

Please sign in to comment.