Re: [PyMca] [ext] ROI Imaging Tool: Stack Simple Fitting
Brought to you by:
vasole
From: PyMca g. p. m. list. <pym...@li...> - 2020-11-19 15:57:25
|
Dear Raphael, I have unsuscribed myself from the mailing list, but I keep getting the emails here. Could you put me out of the list please? Thanks! Kind regards Yavuz O. Uca ________________________________ From: PyMca general purpose mailing list. [pym...@li...] Sent: Thursday, November 19, 2020 4:36 PM To: pym...@li... Subject: [ext] [PyMca] ROI Imaging Tool: Stack Simple Fitting Dear all, I am currently using the ROI Imaging Tool to visualise various .edf mapping. I am trying to use the Stack Simple Fitting plugin to fit various curves to my signal. Regarding this, I would like to raise two points. First when I try to add a fuction using the ADD button and selecting a python file everything goes okay, the function appears on the list, but when I estimate and start fit, it raises: <class 'TypeError'>: You should reconsider how to write your function. The python script I am using is the following one: from numpy import * def gauss(param, t): param = float(param) dummy = 2.35482 * (t - param[3])/param[4] return param[0] + param[1] * t + param[2] * exp(-0.5*dummy*dummy) FUNCTION = [gauss] PARAMETERS = [["Constant", "Linear", "Height", "Position", "FWHM"]] THEORY = ["My Gaussian"] ESTIMATE =[None] CONFIGURE = [None] I guess this is not the right format for describing the function? The second point I'd like to underline is more related to the capabilities of the Stack Simple Fitting module. I would like to know if it is possible to implement non-analytical functions for the fit: I have a 1-D array representing an certain spectrum (the excitation source) that I'd like to use to fit my signal, on which appears this certain spectrum. Is it possible to fit a 1D array, with maybe two parameters that would be a scale for the values and maybe a shift along x axis for exemple ? I guess it would raises other questions (if my 1D array is not the same lenght of my signal, a resize might be necessary). Thanks for any help provided, Best regards Raphael |