Skip to content

Commit bf4a4b1

Browse files
committed
[fix] Analysis tab: only show the beam voltage and current for SEM & FIB streams
We used to show the metadata for all the streams, but until now only SEM & FIB streams had this information (in some rare cases). Now, SEM streams have this info almost all the time, and CL streams too, on the SPARC. However, on the CL streams, it's always the same as the concurrent SEM stream, so no need to display it too.
1 parent 97adaae commit bf4a4b1

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

src/odemis/gui/cont/stream.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -281,11 +281,14 @@ def _display_metadata(self):
281281
elif model.MD_DWELL_TIME in md:
282282
self.add_metadata(model.MD_DWELL_TIME, md[model.MD_DWELL_TIME], 's')
283283

284-
if model.MD_EBEAM_VOLTAGE in md:
285-
self.add_metadata("Acceleration voltage", md[model.MD_EBEAM_VOLTAGE], 'V')
286-
287-
if model.MD_EBEAM_CURRENT in md:
288-
self.add_metadata("Emission current", md[model.MD_EBEAM_CURRENT], 'A')
284+
# On the SPARC, the CL streams (eg, spectrum) also have the beam voltage and current metadata,
285+
# but it's not helpful to show it, as it's always the same as the associated SEM streams
286+
if self.stream.acquisitionType.value in (model.MD_AT_EM, model.MD_AT_FIB):
287+
if model.MD_BEAM_VOLTAGE in md:
288+
self.add_metadata("Acceleration voltage", md[model.MD_BEAM_VOLTAGE], 'V')
289+
290+
if model.MD_BEAM_CURRENT in md:
291+
self.add_metadata("Emission current", md[model.MD_BEAM_CURRENT], 'A')
289292

290293
def pause(self):
291294
""" Pause (freeze) SettingEntry related control updates """

0 commit comments

Comments
 (0)