From 3a98b7ec53fe5d20830fa101d0f73d24a0435bc6 Mon Sep 17 00:00:00 2001 From: Peter Nemere Date: Tue, 12 Nov 2024 22:10:42 +1000 Subject: [PATCH] Exclude EM images that have no beam locations (so we dont show SLI spots in PIXLISE to match FM data pipeline) --- api/dataimport/internal/converters/pixlem/import.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/api/dataimport/internal/converters/pixlem/import.go b/api/dataimport/internal/converters/pixlem/import.go index 8d71b85..ddf27cd 100644 --- a/api/dataimport/internal/converters/pixlem/import.go +++ b/api/dataimport/internal/converters/pixlem/import.go @@ -219,6 +219,14 @@ func importEMData(creatorId string, rtt string, beamLocPath string, hkPath strin return nil, err } + // Remove any images which don't have beam locations + for pmc, img := range contextImgsPerPMC { + if _, ok := beamLookup[pmc]; !ok { + logger.Infof("Excluding image due to not having beam locations: %v", img) + delete(contextImgsPerPMC, pmc) + } + } + hkData, err := importerutils.ReadHousekeepingFile(hkPath, 0, logger) if err != nil { return nil, err