示例#1
0

print(scans[0].max_mass)


# ### Exporting data and obtaining information about a data set
# 
# Often it is of interest to find out some basic information about the
# data set, e.g. the number of scans, the retention time range, and
# m/z range and so on. The |GCMS_data|
# class provides a method |info()|
# that can be used for this purpose.
# 
# The entire raw data of a |GCMS_data| object can be exported to a file 
# with the method |write()|:

# In[13]:


data.write(output_directory / "data")


# This method takes the filename ("output/data", in this example)
# and writes two CSV files. One has extension ".I.csv" and
# contains the intensities ("output/data.I.csv" in this example),
# and the other has the extension ".mz" and contains the
# corresponding table of m/z value ("output/data.mz.csv" in
# this example). In general, these are not two-dimensional matrices,
# because different scans may have different number of m/z
# values recorded.
示例#2
0
"""proc.py
"""

# This file has been replaced by jupyter/reading_andi.ipynb

import pathlib
data_directory = pathlib.Path(".").resolve().parent.parent / "pyms-data"
# Change this if the data files are stored in a different location

from pyms.GCMS.IO.ANDI import ANDI_reader

# read the raw data
andi_file = data_directory / "gc01_0812_066.cdf"
data = ANDI_reader(andi_file)

# print info
data.info()

# write data to output file. This will create
# two ascii data tables, data.I.csv and data.mz.csv
# with intensities and m/z values
data.write("output/data")