simple import of native dataset.
simple FID
FFT with zerofilling
urQRd
You have first to execute the first two cells, then you can execute independently any of the example cells.
We begin first with simple import then we show how to make more elaborated commands involving data processing algorithms such as urQRd.
%matplotlib inline
cd ../..
from spike.File.Apex import Import_1D
import numpy as np # pour faire des calculs
import matplotlib.pyplot as plt # pour afficher les données brutes
from spike.FTICR import FTICRData
Simple import from Apex format
f = Import_1D("DATA_test/angio_ms_000005.d")
f.report()
f = Import_1D("DATA_test/angio_ms_000005.d")
f.display(label = "FID")
f = Import_1D("DATA_test/angio_ms_000005.d")
f.chsize(len(f.buffer)/2)
ff = f.copy()
ff.buffer = ff.buffer[:len(f.buffer)/2]/2
f.display(label = "FID")
f.display(label = "FID cut", new_fig = False)
Classical FFT with apodisation and zerofilling.
f = Import_1D("DATA_test/angio_ms_000005.d")
f.report()
f.units = 'm/z'
f.apod_sin(maxi = 0.5).chsize(f.buffer.size*2).rfft().modulus().display(label = "zerofill x2", show = True)
Here instead of writing a single long command with pipelines, the command is cut in many chunks. This can be used for performing intermediate operations not present in NPKv2.
f = Import_1D("DATA_test/angio_ms_000005.d")
f.units = 'm/z'
f.apod_sin(maxi = 0.5)
f.chsize(f.buffer.size*2).rfft()
f.modulus().display(label = "zerofill x2", show = True)
Example of how to use urQRd for denoising a spectrum. As a rule of thumb, the rank must be few times the number of expected frequencies.
f = Import_1D("DATA_test/angio_ms_000005.d")
f.units = 'm/z'
rank = 30
f.urqrd(k = rank).rfft().modulus().display(label = "urQRd, rank = {}".format(rank), show = True)