Closed yipy0005 closed 4 months ago
From https://rainbow-api.readthedocs.io/en/latest/tutorial.html:
times = datafile.xlabels wavelengths = datafile.ylabels absorbances = datafile.data
If it's MS, then it's masses not wavelengths. Looks like your data is from a SIM experiment.
Hi,
Yes, it's a SIM experiment. Is there any way I can process the datafile.xlabels
, datafile.ylabels
and datafile.data
to provide a table of m/z vs intensity? 😊
I think the best way to think of the rainbow output is as a data matrix. The x axis is time, the y axis is mass, and the values are ion counts. The labels are the row and column labels. So, you already have the table you want. If you need an explicit table, you can always use pandas to convert the numpy arrays to a dataframe and pass the labels to df.columns and df.index.
On Tue, Apr 16, 2024 at 12:51 AM Yip Yew Mun @.***> wrote:
Hi,
Yes, it's a SIM experiment. Is there any way I can process the datafile.xlabels, datafile.ylabels and datafile.data to provide a table of m/z vs intensity? 😊
— Reply to this email directly, view it on GitHub https://github.com/evanyeyeye/rainbow/issues/21#issuecomment-2058459020, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABOBNIT24TRWQ34R2O2M3ADY5TJ7NAVCNFSM6AAAAABGHTH33KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANJYGQ2TSMBSGA . You are receiving this because you commented.Message ID: @.***>
I have tried to run this:
For
datafile.xlabels
, there is an array of values from 0.04725 to 147.69308333333333. Fordatafile.ylabels
, there is 1 value in the array, which is 204. And fordatafile.data
, there is an array of values from 146 to 70968.If
xlabels
are m/z values, then a mass of 0.04725 doesn't correspond to any fragment. Could I ask then, how should I understand the values ofxlabels
,ylabels
anddata
?Thank you!
Originally posted by @yipy0005 in https://github.com/evanyeyeye/rainbow/issues/20#issuecomment-2057132359