I'm sorry, I didn't fully realize your situation. So the datapoints are spaced arbitrarily and some of them may be bad?
If you want to treat the BAD datapoints as missing, you can always filter them out: $a1 = $a->(which($a->isgood->mv(1,0)->andover)); $b1 = $b->(which($b->isgood->mv(1,0)->andover)); After that, you can use your favorite irregular threadable interpolator. Here's a cspline one I have lying around (attached -- it's an autoload file).
cspline_irregular.pdl
Description: Binary data
On Oct 25, 2013, at 9:07 AM, Ingo Schmid <[email protected]> wrote: > > sorry, I don;t quite undestand how to do that. Where would I enter my > times? They are not uniformly spaced. > > > > On 10/25/2013 03:27 PM, Craig DeForest wrote: >> Use interpND or, better, PDL::Transform. >> >> (mobile) >> >> >> On Oct 25, 2013, at 6:05 AM, Ingo Schmid <[email protected]> wrote: >> >>> Hi, >>> >>> I seem to fail to find a good way to regrid multiple sets of data >>> containing missing values (BAD). >>> >>> I have measure $a(,1:) at timepoints $a(,0) and measures $b(,1:) at >>> times $b(,0). Some datapoints are BAD. >>> Now I want to resample them to the same temporal resolution, for example >>> $b to $a(,0). >>> >>> What I would like to do is >>> >>> $b_res(,0).=$a(,0); >>> $b_res(,1:).=interpol($a,0),$b(,0),$b(,1:) ; >>> >>> Unfortunately this does not work. >>> >>> A, interpol (ate) don't handle badvalues, as the help states. >>> B. apparently it isn't threadable. >>> >>> What are my alternatives? >>> Thanks. >>> Ingo >>> >>> _______________________________________________ >>> Perldl mailing list >>> [email protected] >>> http://mailman.jach.hawaii.edu/mailman/listinfo/perldl >>> >
_______________________________________________ Perldl mailing list [email protected] http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
