hyperspy / rosettasciio

Python library for reading and writing scientific data format
https://hyperspy.org/rosettasciio
GNU General Public License v3.0
44 stars 26 forks source link

Getting livetime information from single pixels in Bruker M4 Tornado bcf files #240

Closed AbaPanu closed 4 months ago

AbaPanu commented 4 months ago

Hello again!

In issue hyperspy/hyperspy#3324 and hyperspy/rosettasciio#241 I described what I anticipate to do with the sumspectra of non-rectangular ROIs (list of xy coordinates of pixels) from µXRF bcf hypermaps of different sizes. Now that this works approximately, I need to get the livetime information from all individual pixels in a ROI in order to estimate a counts/s for the sumspectrum (otherwise I can´t quantify them). The issue is somewhat old (https://github.com/hyperspy/rosettasciio/issues/239) but I could not figure out if it was ever resolved properly.

Here is what I know so far: a) the bcf files contain the information of REALTIME and LIVETIME per pixel (how and where exactly I don't know). b) if I produce a sumspectrum (spx or emsa/msa) in the Tornado M4 software the information is used when summing up spectra with variable livetime and hence corrects count/s (in µXRF live and deadtime are mainly influenced by the presence or absence of heavier elements in the analysed material). c) when opening those spectra from b) in hyperspy both real- and livetime appear in the file header information. Sumspectra produced in hyperspy on the same bcf files do not contain any information about live- or realtime.

Context: I want to produce bulk rock compositions for my ROIs (which contain different silicate minerals), I need the information per pixel in order not to overestimate the counts on phases containing e.g. high iron concentrations (which creates quite high counts but also high deadtimes).

Thanks!

ericpre commented 4 months ago

hyperspy/hyperspy#239 hasn't been resolved, closing this issue in favour of keeping a single issue on this topic: hyperspy/hyperspy#239.

If you want the lifetime per pixel, you will need to use the information available in hyperspy/hyperspy#239. This issue is slate but it you can help with fixing it, you may be able to revive and get it sorted out for good!