Improved scan metadata
This commit is contained in:
parent
4602b1da9d
commit
980e64397d
1 changed files with 13 additions and 4 deletions
|
|
@ -79,12 +79,13 @@ class ScanPlugin(MicroscopePlugin):
|
|||
bayer=bayer)
|
||||
|
||||
# Affix metadata
|
||||
if 'stack' not in tags:
|
||||
tags.append('stack')
|
||||
if 'scan' not in tags:
|
||||
tags.append('scan')
|
||||
|
||||
metadata.update({
|
||||
'Position': self.microscope.state['stage']['position'],
|
||||
'Stack ID': scan_id
|
||||
'position': self.microscope.state['stage']['position'],
|
||||
'scan_id': scan_id,
|
||||
'basename': basename,
|
||||
})
|
||||
|
||||
output.put_metadata(metadata)
|
||||
|
|
@ -113,6 +114,10 @@ class ScanPlugin(MicroscopePlugin):
|
|||
# Store initial position
|
||||
initial_position = self.microscope.stage.position
|
||||
|
||||
# Add scan metadata
|
||||
if not 'time' in metadata:
|
||||
metadata['time'] = generate_basename()
|
||||
|
||||
# Check if autofocus is enabled
|
||||
if autofocus_dz and hasattr(self.microscope.plugin, 'default_autofocus'):
|
||||
autofocus_enabled = True
|
||||
|
|
@ -199,6 +204,10 @@ class ScanPlugin(MicroscopePlugin):
|
|||
if not scan_id:
|
||||
scan_id = uuid.uuid4().hex
|
||||
|
||||
# Add scan metadata
|
||||
if not 'time' in metadata:
|
||||
metadata['time'] = generate_basename()
|
||||
|
||||
# Store initial position
|
||||
initial_position = self.microscope.stage.position
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue