Skip to content

Commit

Permalink
Merge pull request #2911 from sem-geologist/patch-4
Browse files Browse the repository at this point in the history
expose Stage metadata for sem images in bruker BCF
  • Loading branch information
ericpre committed Mar 26, 2022
2 parents 6e2ddbb + 21cd324 commit c8f8325
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion hyperspy/io_plugins/bruker.py
Original file line number Diff line number Diff line change
Expand Up @@ -872,7 +872,8 @@ def gen_hspy_item_dict_basic(self):
'Microscope': self.sem_metadata,
'DSP Configuration': self.dsp_metadata,
'Stage': self.stage_metadata
}
},
'mapping': get_mapping(self.mode)
}
return i

Expand Down
2 changes: 2 additions & 0 deletions hyperspy/tests/io/test_bruker.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ def test_load_16bit():
np.testing.assert_array_equal(hype.data[:, :, 222:224],
np.load(np_filename))
assert hype.data.shape == (30, 30, 2048)
assert bse.metadata.get_item('Stage.x', full_path=False) == 66940.81
assert hype.metadata.get_item('Stage.x', full_path=False) == 66940.81


def test_load_16bit_reduced():
Expand Down
1 change: 1 addition & 0 deletions upcoming_changes/2911.enhancements.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
expose Stage coordinates and rotation angle in metada for sem images in bcf reader.

0 comments on commit c8f8325

Please sign in to comment.