Interpolate2 with free waves

Hello,

I'm trying to use interpolate2 with free destination waves and I haven't been successful.

First, the base case:
- x destination and y destination are normal - works as expected
- x destination normal, y destination free - works as expected


function interpolatetest1()
    make/o/n=6 xsrc, ysrc
    make/o/n=12 xdest
   
    wave xsrc
    wave ysrc
    wave xdest

    xsrc = p
    ysrc = 2^p
    xdest = p*0.5
    interpolate2/i=3/x=xdest/y=ydest xsrc, ysrc
    print xdest
    print ydest
   
    make/free/n=12 ydestfree
    interpolate2/i=3/x=xdest/y=ydestfree xsrc, ysrc
    print xdest
    print ydestfree
end



Using free waves:
- x dest is free, y dest is normal
- x dest is free y dest is free

Both result in "Function Execution Error, While executing Interpolate2, the following error occurred. The x destination wave must be single or double precision floating point." I also believe that I have had a case where the error did not occur, but the y destination values were returned with non-zero values. However, I haven't been able to consistently replicate that case.


function interpolatetest2()
    make/o/n=6 xsrc, ysrc
    make/free/n=12 xdest
   
    wave xsrc
    wave ysrc
   
    xsrc = p
    ysrc = 2^p
    xdest = p*0.5
    interpolate2/i=3/x=xdest/y=ydest xsrc, ysrc
    print xdest
    print ydest
   
    make/free/n=12 ydestfree
    interpolate2/i=3/x=xdest/y=ydestfree xsrc, ysrc
    print xdest
    print ydestfree
end



Using normal waves in a free directory:
Again: "Function Execution Error, While executing Interpolate2, the following error occurred. The x destination wave must be single or double precision floating point."

function interpolatetest3()
make/o/n=6 xsrc, ysrc

wave xsrc
wave ysrc

xsrc = p
ysrc = 2^p

dfref dftemp = newfreedatafolder()
dfref dforig = getdatafolderdfr()
cd dftemp
make/n=12 xdest
wave xdest
cd dforig

xdest = p*0.5
interpolate2/i=3/x=xdest/y=ydest xsrc, ysrc
print xdest
print ydest

make/free/n=12 ydestfree
interpolate2/i=3/x=xdest/y=ydestfree xsrc, ysrc
print xdest
print ydestfree
end


I thought that in the past I'd figured out a way around this while continuing to use free waves, but for now, I'm just going to make normal waves and delete them when I'm done.

I'm using Win 8, Igor 6.3.1.2 32-bit. I've also observed this in several previous versions of Igor.

Thanks for any insight,
Henry
I believe that this was fixed in version 6.3.2. From the What's Changed File:
Quote:
Interpolate2 now correctly handles free waves passed as X dest wave in "X from dest" mode (/I=3 flag). Also handles free waves passed as stdDevWave (/SWAV flag).


Choose Help->Updates for Igor to update your installation.
Thank you! This one had been frustrating me for years! (Although I only now posted about it.)

Thanks again and my apologies for not checking the most recent release first.

Henry

Please excuse my resurrection of this very old discussion.

It seems that Interpolate2 is still fussy about mixtures of free and non-free waves as inputs and outputs. What are the rules for mixing free and normal waves? Should we expect Interpolate2 to work consistently for any mixture?