SumSeries Bug?
Hello all:
I'm trying to use SumSeries-function to compute a function. Therefor I tried to "program" the function into Igor and let him do the magic. But the code just produces an "Out-of-memory"-Error which is not understandable.
I reduced everything to a absolute minimum of :
Wave pWave
Variable max_mass
SumSeries lowerLimit=1, upperLimit=10, series=SumUpPart, paramWave=pWave
End
Function SumUpPart(inW, index, pWave)
Wave inW
Wave pWave
Variable index
return 1
End
which should end up with a result of 10 ... every sum is 1 and after 10 iterations it should be 10, right?
Everytime I run "DoCalc(0.1, ParamWave), no Print statement or other code - it ends up with a
While executing SumSeries, the following error occurred: out of memory
The manual does not provide a example using the paramWave nor it explains the inW of the series-function. Maybe one should add this information. But here this should be no point.
Can anyone explain this behavior / am I doing a mistake?
Axel
Handy information attached:
IGORVERS:8.00
BUILD:31836
IGORKIND:pro64
FREEMEM:3583582208
PHYSMEM:17179869184
USEDPHYSMEM:1329942528
NSCREENS:1
SCREEN1:DEPTH=32,RECT=0,0,1680,1050
OS:Macintosh OS X
OSVERSION:10.13.6
LOCALE:US
IGORFILEVERSION:8.00
The help info is not quite as explicit as it should be. Your SumUpPart function should be
Wave/z inW
Variable index
print inW[index]
print index
return 1
End
Wave inW receives paramWave, so the additional input wave (pWave) causes the error. Something internal to Igor causes the misleading out of memory error.
I added a few print statements to help visualize what was going on with SumSeries.
I was going to suggest becoming familiar with the Debugger (DisplayHelpTopic "Debugger"), but in this case it wouldn't have been much help. Still, it's a very useful tool to have at your disposal.
July 30, 2018 at 06:24 am - Permalink
In reply to The help info is not quite… by jtigor
Upon re-reading the documentation I wrote for the this operation some years ago I agree that it does not make it sufficiently clear that inW is the parameter wave passed to the function.
The error code has been fixed for the next nightly build.
July 30, 2018 at 05:51 pm - Permalink