[proFit-list] Repetitive fit using pro Fit 6.2.2

pro Fit Support profit at quansoft.com
Sun Feb 6 22:14:38 CST 2011


Dear Christian

Try setting the arguments xColumn and yColumn when calling pf.FitSetExperiment. I don't think you can set the columns to be fitted by calling pf.SetDefaultCols.

Best regards

Kurt Sutter

 
On 4 Feb 2011, at 4:44, Christian Sommerhoff wrote:

> Dear pro Fit Team,
> 
> thanks for the new version of pro Fit and particularly for the inclusion of Python - a great new feature!
> 
> I am trying to repeat fitting over a range of columns, i.e. x-values are stored in col 2 and y-values in col 3-n. The loop works nicely, the output verifies that different y columns are used.  BUT the parameters obtained are always identical, i.e. the fit is done only once... 
> 
> What am I missing here?
> 
> 
> A second problem occurs if I now mask data in col 1 ( i.e. a column not used for fitting), which generates the error msg
> Python exception: There is no data to fit.
> Traceback (most recent call last):
>   File "Test_python.func", line 10, in <module>
> 
> Thanks in advance,
> Christian
> 
> ==> Python script
> # test repetitive fit over columns
> 
> for i in range(3, 5):
>     if not  pf.ColEmpty(i):
>         pf.SetDefaultCols(2,i,0,0)	
>         fitObj = pf.FitCreate(function = 'Exp')
>         pf.FitSetArguments(fitObject = fitObj, algorithm = pf.robust , printResults = True, onlyActiveParameters = False, fullDescription = True)
>         pf.FitSetExperiment(fitObject = fitObj, window =  pf.GetCurrentWindow(pf.dataType) )
>         fitResultObj = pf.FitExecute(fitObject = fitObj)
>         n = pf.FitResult(fitResultObject = fitResultObj, result = pf.nrFittedParameters)
>         print 'Number of parameters fitted:', n 
>         pf.FitResultDispose(fitResultObject = fitResultObj)
>         pf.FitDispose(fitObject = fitObj)
> 
> 
> ==> output
> ===========================================
> Fit Algorithm:	Robust
> 
> Function  :	Exp
>  Descr 1  :	y = A * exp(-(x-x0)/t0)  + const
>  Descr 2  :	exponential function
> 
> Data      :	Untitled Data 1
> 
> output    :	y
>  y  column:	Column 3
>  ∆y value :	0.0
>  ∆y distr.:	Gaussian
> 
> input     :	x
>  x  column:	Column 2
>  ∆x value :	0.0
>  ∆x distr.:	Gaussian
> 
> 
> Iterations:	193
> -------------------------------------------
> Chi squared       	=	271.5419
> 
> Parameters:
> A    	=	90.0053
> x0   	=	 0.0000
> t0   	=	 0.2342
> const	=	 6.5197
> 
> Number of parameters fitted: 4.0
> 
> ===========================================
> Fit Algorithm:	Robust
> 
> Function  :	Exp
>  Descr 1  :	y = A * exp(-(x-x0)/t0)  + const
>  Descr 2  :	exponential function
> 
> Data      :	Untitled Data 1
> 
> output    :	y
>  y  column:	Column 4
>  ∆y value :	0.0
>  ∆y distr.:	Gaussian
> 
> input     :	x
>  x  column:	Column 2
>  ∆x value :	0.0
>  ∆x distr.:	Gaussian
> 
> 
> Iterations:	193
> -------------------------------------------
> Chi squared       	=	271.5419
> 
> Parameters:
> A    	=	90.0053
> x0   	=	 0.0000
> t0   	=	 0.2342
> const	=	 6.5197
> 
> Number of parameters fitted: 4.0
> 
> _______________________________________________
> proFit-list mailing list
> proFit-list at quantum-soft.com
> http://quantum-soft.com/mailman/listinfo/profit-list_quantum-soft.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://quantum-soft.com/pipermail/profit-list_quantum-soft.com/attachments/20110207/fcfabc4b/attachment.html>


More information about the proFit-list mailing list