IMCtermite/python/examples/usage_files.py
Mario Fink e6315ee186 * add github workflow for building wheels
* rename cython module for more consistency
* restructure python code
* proper python module setup
* bump major version 2.0.0
2021-09-21 12:55:19 +02:00

30 lines
732 B
Python

from IMCtermite import imctermite
def show_results(imcraw) :
channels = imcraw.get_channels(False)
print(channels)
channelsData = imcraw.get_channels(True)
print("number of channels: " + str(len(channelsData)))
for (i,chn) in enumerate(channelsData) :
print(str(i) + " | " + chn['name'])
print(chn['xname'] + " | " + chn['xunit'])
print(chn['xdata'][:10])
print(chn['yname'] + " | " + chn['yunit'])
print(chn['ydata'][:10])
print("")
# create instance of 'imctermite'
imcraw = imctermite(b'samples/sampleA.raw')
show_results(imcraw)
# use previous instance of 'imctermite' to provide new file
imcraw.submit_file(b'samples/sampleB.raw')
show_results(imcraw)