diff --git a/common/DiffractionSpot.cpp b/common/DiffractionSpot.cpp index 0f71be57..dd8fe53d 100644 --- a/common/DiffractionSpot.cpp +++ b/common/DiffractionSpot.cpp @@ -68,9 +68,15 @@ void DiffractionSpot::ConvertToImageCoordinates(const DiffractionExperiment &exp SpotToSave DiffractionSpot::Export(const DiffractionGeometry &geometry, int64_t image_num) const { auto d = geometry.PxlToRes(x / (float) photons, y / (float) photons); + float phi = 0.0f; + if (geometry.GetRotation()) { + phi = geometry.GetRotation()->GetIncrement_deg() * image_num + geometry.GetRotation()->GetWedge_deg(); + } + return { .x = x / static_cast(photons), .y = y / static_cast(photons), + .phi = phi, .intensity = static_cast(photons), .maxc = max_photons, .d_A = d, diff --git a/common/SpotToSave.h b/common/SpotToSave.h index ccdef978..9efb978d 100644 --- a/common/SpotToSave.h +++ b/common/SpotToSave.h @@ -9,6 +9,7 @@ struct SpotToSave { float x = 0; float y = 0; + float phi = 0; float intensity = 0; int64_t maxc = 0; float d_A = 0.0;