Thanks Armando. This is very helpful.
-Shefali
________________________________
From: PyMca general purpose mailing list. <pym...@li...>
Sent: Thursday, June 24, 2021 10:51 AM
To: pym...@li... <pym...@li...>
Subject: Re: [PyMca] Spec file parsing using python interpreter
Hi,
This should get you started:
from PyMca5.PyMcaIO import specfilewrapper as Specfile
sf = Specfile.Specfile("YOUR FILE NAME")
nscans = len(sf)
scan = sf[0]
labels = scan.alllabels()
data = scan.data()
motor_names = scan.allmotors()
motor_positions = scan.allmotorpos()
nmca = scan.nbmca()
mca = scan.mca(1)
scan = None
sf = None
See you,
Armando
On 24/06/2021 17:26, PyMca general purpose mailing list. via PyMca-users wrote:
Hi,
I would like to use spec file parser and plotter using a python interpreter (with Jupyter notebooks) without using pymca gui. For example, calling a function from pymca and use it to parse the spec file and then plot it. I cannot find an example for this. Can someone point me to the examples/demo to do this.
Thanks,
Shefali
_______________________________________________
PyMca-users mailing list
PyM...@li...<mailto:PyM...@li...>
https://lists.sourceforge.net/lists/listinfo/pymca-users
|