From bf1b80d61a7c95d44ef75224fdae17ecd8c2d230 Mon Sep 17 00:00:00 2001 From: weiglszonja Date: Sun, 2 Jun 2024 15:21:12 +0200 Subject: [PATCH] update parsed_metadata with sampling frequency --- .../cxdimagingextractor.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/roiextractors/extractors/bioformatsimagingextractors/cxdimagingextractor.py b/src/roiextractors/extractors/bioformatsimagingextractors/cxdimagingextractor.py index d66f70b4..dc4971a3 100644 --- a/src/roiextractors/extractors/bioformatsimagingextractors/cxdimagingextractor.py +++ b/src/roiextractors/extractors/bioformatsimagingextractors/cxdimagingextractor.py @@ -133,11 +133,12 @@ def __init__( ) plane_name = plane_names[0] - sampling_frequency = sampling_frequency or parsed_metadata["sampling_frequency"] - if sampling_frequency is None: - raise ValueError( - "Sampling frequency is not found in the metadata. Please provide it manually with the 'sampling_frequency' argument." - ) + if parsed_metadata["sampling_frequency"] is None: + if sampling_frequency is None: + raise ValueError( + "Sampling frequency is not found in the metadata. Please provide it manually with the 'sampling_frequency' argument." + ) + parsed_metadata.update(sampling_frequency=sampling_frequency) super().__init__( file_path=file_path,