On Oct 11, 2006, at 2:15 PM, Rahman Amanullah wrote:
Hello!
I would imagine that the output PDL from this code ($o) would be
identical to the input ($i):
use PDL;
use PDL::Transform;
my $i = sequence(5,5) + sequence(5,5)->transpose;
my $o = $i->map(t_identity,
{pix=>1,phot=>'flux',method=>'sample'});
Drat, drat, drat -- it appears to be a half-pixel error in the pix=>1
code. (if you use 'linear' as a method, you can see that the
sampling is happening at pixel intersections rather than centers).
I'll check-in a fix into the CVS soon.
Meanwhile, you can work around that problem by:
- not specifying 'pix=>1' (the autoscaling seems to work correctly)
or
- hand-specifying a FITS header with CRPIX1=>1, CRPIX2=>1,
CDELT1=>1, CDELT2=>1 (also seems to work OK)
I'll check in a fix shortly.
By the way, "phot=>'flux'" won't actually do anything unless you are
using the Gaussian or Hanning methods. That's because flux
conservation works by measuring the determinant of the Jacobian of
the transformation, and only the Gaussian and Hanning methods bother
to find the Jacobian.
Cheers,
Craig
_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl