[proFit-list] problem with SetDefaultCols

Fernando Bartolome bartolom at unizar.es
Fri Jul 15 02:57:56 CDT 2011


Dear Kurt and pro Fit users,

you're right, the test you sent me back works. I see now that I explained very badly the actual problem in my first email. 
(the fact that your test works is what I meant by  "Of course if I do this with one column it works... or if I do it by hand! ")

It is the repetition of that which gives a problem. It appears like one of two possibilities:

a) a subsequent SetDefaultCols is doing nothing (although it actually moves the indicators in the data window and changes the Preview Panel)
or 
b) it is Transform who is not taking the new default columns to calculate the Spline values, keeping the first ones it received.

I'll try to put three examples:

Your test program works, but this simple "iterative" version doesn't:

program test;
var
i,ik:integer;

begin
for i:=1 to 2 do {increasing for loop}
begin
	ik:=2*i ;
	SetDefaultCols(ik-1,ik,0,0) ;
	Transform (operation functionOp, function 'Spline', xColumn 5, yColumn 5+i) ;
end;
end;

to be tested with, for example, the attached "test_1.data".
The "splined" curve in column 7 is identical to that in column 6, which should not be the case, I think.

Even more, the simplest example, eliminating the "for" and explicitely writing it down ( := twice your test)
does not work either. It yields the same results as if the sentence SetDefaultCols(3,4,0,0); is not there.

program test2;

var
i,ik:integer;

begin

	SetDefaultCols(1,2,0,0) ;
	Transform (operation functionOp, function 'Spline', xColumn 5, yColumn 6) ;

	SetDefaultCols(3,4,0,0) ;
	Transform (operation functionOp, function 'Spline', xColumn 5, yColumn 7) ;

end;
 

Finally, if you "undefine" the default cols before defining them again, that's worthless:

program test3;

var
i,ik:integer;

begin

	SetDefaultCols(1,2,0,0) ;
	Transform (operation functionOp, function 'Spline', xColumn 5, yColumn 6) ;

	SetDefaultCols(0,0,0,0) ;
	SetDefaultCols(3,4,0,0) ;
	Transform (operation functionOp, function 'Spline', xColumn 5, yColumn 7) ;

end;

columns 6 and 7 are identical, which I think is wrong.
That keeps going on if you do some other different Transform in the middle (functionOp with a different function, formulaOp or whatever). It keeps working with the only Default Cols you feed it first. No way to change them later. It's strange, isn't it?

In any case, thank you very much for your interest and fast answer, and for maintaining pro Fit, a fantastic piece of software.

Fernando

_________________________________________

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/





El 15/07/2011, a las 06:59, Kurt Sutter escribió:

> 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
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://quantum-soft.com/pipermail/profit-list_quantum-soft.com/attachments/20110715/645e1a6c/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_1.data
Type: application/octet-stream
Size: 62040 bytes
Desc: not available
URL: <http://quantum-soft.com/pipermail/profit-list_quantum-soft.com/attachments/20110715/645e1a6c/attachment-0001.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://quantum-soft.com/pipermail/profit-list_quantum-soft.com/attachments/20110715/645e1a6c/attachment-0003.html>


More information about the proFit-list mailing list