You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying to use Hyperspy for data analysis as I prefer to do all that stuff in Python. Unfortunately, I'm getting the below error when trying to just load the file. I tried many different things, using different formats (.bcf and .spx) using the full file path of the file, trying the 'lazy' loading, but I seem to be stuck.
There's not much code to share, since it's literally one of the first steps, but this is what I did:
import hyperspy.api as hs spectrum = hs.load('JCBbattery30x.bcf')
What I'm getting is hyperspy.io:599 and then KeyError: 'PrimaryEnergy'. I'm just wondering what could be the source of this, did I save the file incorrectly or is it the module issue? It works just fine in Bruker's Quantax70...
Python environement:
Python version: 3.12.4
HyperSpy version: 2.1.1
The text was updated successfully, but these errors were encountered:
It's likely that the change required isn't terribly large to support your data. Do you have a smallish data set that we could potentially use for testing? Often times the biggest hurdle to reading is having the right dataset to compare against.
I talked to a colleague of mine and he did say it's possible to override the Primary Energy error with RosettaSciIO module by adding the energy manually, but I haven't tried that yet. Still, if it's a common problem with Bruker format, or just data sets from this specific type of microscopes we're using, I think it'd be great if you managed to figure out what the issue is exactly and if it's possible to easily fix it :)
@ihatechickpeas, thank you for sharing the file. Would you able to provide a smaller file (smallest possible)? If so, please have a look at our documentation for explanation and recommendation. #326 should fix the issue and it needs small test file.
I was trying to use Hyperspy for data analysis as I prefer to do all that stuff in Python. Unfortunately, I'm getting the below error when trying to just load the file. I tried many different things, using different formats (.bcf and .spx) using the full file path of the file, trying the 'lazy' loading, but I seem to be stuck.
There's not much code to share, since it's literally one of the first steps, but this is what I did:
import hyperspy.api as hs
spectrum = hs.load('JCBbattery30x.bcf')
What I'm getting is
hyperspy.io:599
and thenKeyError: 'PrimaryEnergy'
. I'm just wondering what could be the source of this, did I save the file incorrectly or is it the module issue? It works just fine in Bruker's Quantax70...Python environement:
The text was updated successfully, but these errors were encountered: