[proFit-list] problem with SetDefaultCols

Kurt Sutter kurt at quansoft.com
Thu Jul 14 23:59:05 CDT 2011


Dear Fernando

I cannot say what is wrong with your example. I have just tried here. I have put one experiment in columns 3 and 4, and the x-coordinates of the other experiment in column 5. Then I ran

program test;
begin
	SetDefaultCols(3,4,0,0) ;
	Transform (operation functionOp, function 'Spline', xColumn 5, yColumn 6);
end;

The results were as expected. Are you sure your code works properly. If yes, we need more information.

Best regards

Kurt Sutter
QuantumSoft


On 14 Jul 2011, at 7:10, Fernando Bartolome wrote:

> 
> Dear Pro Fit team and users,
> 
> I'm trying to obtain the difference between two experimental curves. This is easy when both curves have been taken at the same abscissa, but if there is a shift between abscissae you have to correct this somehow. If the shits are small and the curves are sufficiently smooth, I've in the past used this code to do what is shown in the picture: I define the x and y columns (2*ik-1 and 2*ik in the example below) to fit with Spline, then I tell Transform to write the value of the Spline function with other column for the x  ( (2*num_wins+1) in the example) at the column (2*num_wins+1)+(ik)
>  
> for ik:=1 to num_wins do
> 	begin
> 
> 	SetDefaultCols(2*ik-1,2*ik,0,0); 
> 	Transform (operation functionOp, function 'Spline', xColumn (2*num_wins+1), yColumn (2*num_wins+1)+(ik));
> 	tit := GetColumnProperty (2*ik,name);
> 	SetColumnProperties(col (2*num_wins+1)+(ik),  name tit +'_s');
> 	
> 	end;
> 	
> However, this does not work. Transform writes down the same values all the time, as if  SetDefaultCols(2*ik-1,2*ik,0,0) wasn't there. It keeps the same values you gave the first run, and then they do not change anymore. Moreover, if you look at the data window, the red x and y, with blue "in" and "out" do move as expected... but the calculation of Spline does not. 
> This program did work in the past (I'd say about 2 years ago, with 6.0 ?). Maybe there's some change in Pro Fit or in SetDefaultCols which I'm not aware of can be at the origin of this behaviour? 
> 
> Of course if I do this with one column if works... or if I do it by hand! It is the automation for more than one column of data (about 200!) what is breaking my head. 
> 
> I'm using Pro Fit 6.2.3 and 6.2.4 (my problem takes place with both)
> in a 
> Mac OS X 10.6.8, with a 2.8 GHz Intel Core 2 Duo and 4 Gb DDR3 RAM
> 
> Thanks for your support,
> 
> Fernando
> 
> 
> 	
> 	
> <PastedGraphic-1.png>
> 
> for ik:=1 to num_wins do
> 	begin
> 
> 	SetDefaultCols(2.*ik-1,2.,*ik,0,0); 
> 	Transform (operation functionOp, function 'Spline', xColumn (2*num_wins+1), yColumn (2*num_wins+1)+(ik));
> 	tit := GetColumnProperty (2*ik,name);
> 	SetColumnProperties(col (2*num_wins+1)+(ik),  name tit +'_s');
> 	
> 	end;
> 
> 
> _________________________________________
> 
> Fernando Bartolomé
> Instituto de Ciencia de Materiales de Aragón
> CSIC - UZ
> 
> tel: +34 976 762459
> fax: +34 976 761229
> email: bartolom at unizar.es
> http://fmc.unizar.es/people/bartolom/
> 
> 
> 
> 
> 
> _______________________________________________
> 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/20110715/91b6b414/attachment.html>


More information about the proFit-list mailing list