
Easy way to mask waves?

amellnik
targetwave = targetwave/(maskwave==0)
WaveTransform zapINFs targetwave
WaveTransform zapNaNs targetwave // 0/0 = NaN
This has the obvious problem that it gets rid of any NaNs and INFs that should be in targetwave. What's the proper way to do this? Thanks
-Alex
How about something like this?
My quick test shows that any point in wmask with a value of zero will cause the corresponding point in w to be deleted. There is no error checking, so watch out if it behaves unexpectedly. Hope this is what you have in mind.
January 2, 2012 at 03:19 pm - Permalink
Extract/O targetwave, targetwave, maskwave!=0
should also work. Be careful, targetwave is being overwritten! To avoid this, use a new name for destwave.A
January 8, 2012 at 12:48 am - Permalink
however that does not work. What would be the proper code to do this?
January 9, 2012 at 02:27 am - Permalink
January 9, 2012 at 07:11 am - Permalink
January 16, 2012 at 05:16 am - Permalink
May 17, 2012 at 11:37 am - Permalink