Open ihatechickpeas opened 1 month ago
@ihatechickpeas Out of curioisity what type of data are you trying to load?
Here is some more infromation:
https://hyperspy.org/rosettasciio/user_guide/supported_formats/bruker.html#bruker-format
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.
@CSSFrancis it's a battery cross section scan that contains the sample scan with EDX data of it. I've attached the data file here:
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 :)
Thanks a lot for the help!
@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. https://github.com/hyperspy/rosettasciio/pull/326 should fix the issue and it needs small test file.
@ihatechickpeas, AFAIK, Bruker Esprit allows to select 16x16 ROI as smallest area for Hyperspectra. That way the smallest file example can be made.
proposed workaround is short-term fix, as Hyperspy (AFAIK, please correct me) has no XRF signal. Hopefully more universal metadata structure will be setup by community, and XRF then can get full support. Additional obstacly you probably will get into is wrong live time support in Hyperspy (it expects a scalar instead of array (raster of livetimes corresponding to every pixel)). It is not a severe problem for material scientists, but absolute stopper for geoscientists, and often huge obstacle for XRF maps. (see https://github.com/hyperspy/hyperspy/issues/2534 and https://github.com/hyperspy/hyperspy/issues/2898)
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: