It seems like there should be a really easy way to mask waves, but I haven't been able to figure one out so far. For example, I might have to waves of the same length and I would like to delete all the points from the first wave where the corresponding point on the second wave is zero. The way I've been doing this so far is embarrassingly hackey:
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
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