Hello, all.

I am currently working with some simple 2D data, and I would like to
replace all of the pixel values lying along the same circular annulus with
their median. Currently, I am doing the following:

my $image = rfits('input.fits');
my $radii = $image->long->inplace->rvals;

for my $radius ($radii->uniq->list)
{
    $image->whereND($radii==$radius) .=
$image->whereND($radii==$radius)->clump(-1)->medover;
}


I would like to get rid of the perl loop. I have tried using higher
dimensions in the whereND mask, but I couldn't quite get the threading to
work out for my purposes.

Any thoughts?

Many thanks.

- Tim
_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to