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
Hi, i've encountered a behavior i do not fully understand and i had a few questions regarding the XAxisDepth() method and other fuctions (in particular .GetXAxis() and .GetMeanSpectrum() ) when i am working with processed imzML files.
When i use XAxisDepth() on the ImzMLReader, it binns the spectra to an axis. To check how well this performed, i plotted the Depth of each mass-axis in the file against the pixel index. But somehow, i do not see a correlation between the number of bins used for the averaging and the acutal depths of the spectra. see below for the plot:
is there a way to specify how much bins the averaging should take or how large they should be?
also, colsely related to this, i observed that the binned mz values from .GetMeanSpectrum are somewhat shifted from the original processed data. I think this is also related to the binsize, since the algorithm seems to anticipate to large bins for my data and the background peaks disturb the weighted average of the mean spectrum.
to illustrate this, i also plottet the raw data of a small set of points over the averaged spectrum from this set (see below)
tl,dr: Is there a way to send a binsize or a number of bins to the underlying averaging function when XAxisDepth() is called?
The text was updated successfully, but these errors were encountered:
Hi, for continuous centroid/profile imzML files, GetXAxis() returns the unique m/z values used in all pixels/spectra - all spectra refere to same m/z values. The processing of an overview spectrum is then just average/maximum of the intensities for each m/z value over all spectra. In this case, the depth of the x-axis is fixed and is defined externally.
In the case of processed centroid imzML data, we have a problem: what should an overview spectrum for processed imzML data look like? To keep the binning over all spectra simple and fast, I divided the m/z range on the x-axis into equal-sized bins. For each bin, the average/maximum intensity is accumulated over all spectra in the image, resulting in the average and maximum overview spectra you can access by pyM2aia using GetMeanSpectrum() and GetMaxSpectrum(). The number of bins is a free but fixed constant that can be specified in the settings of M2aia (desktop application). Currently there is no interface to change the number of bins in pyM2aia.
Obviously, this way of binning is very fast, but there are slower and more accurate solutions. I implemented a 'strict' binning in pym2aia following the binning function in MALDIquant. An application of this binning function can be seen exemplarily in python notebook.
Hi, i've encountered a behavior i do not fully understand and i had a few questions regarding the XAxisDepth() method and other fuctions (in particular .GetXAxis() and .GetMeanSpectrum() ) when i am working with processed imzML files.
When i use XAxisDepth() on the ImzMLReader, it binns the spectra to an axis. To check how well this performed, i plotted the Depth of each mass-axis in the file against the pixel index. But somehow, i do not see a correlation between the number of bins used for the averaging and the acutal depths of the spectra. see below for the plot:
is there a way to specify how much bins the averaging should take or how large they should be?
also, colsely related to this, i observed that the binned mz values from .GetMeanSpectrum are somewhat shifted from the original processed data. I think this is also related to the binsize, since the algorithm seems to anticipate to large bins for my data and the background peaks disturb the weighted average of the mean spectrum.
to illustrate this, i also plottet the raw data of a small set of points over the averaged spectrum from this set (see below)
tl,dr: Is there a way to send a binsize or a number of bins to the underlying averaging function when XAxisDepth() is called?
The text was updated successfully, but these errors were encountered: