Dear Paul,

first, I think you do not need the curly { } around rot.

Second, map needs $tr and $im. You can call it $tr->map($im) or
$im->map($tr), as far as I know.

With these changes, it works for me.

use PDL;
#use PDL::IO::;
use PDL::Transform;
use PDL::Graphics::Gnuplot;

$im = rfits('/data/ingo/git/PDL/pdl-code/m51.fits');
$tr = t_linear({rot=>30});
print $Tr;
$im1 = $tr->map($im);
gplot {out=>'i1.png',term=>'png',},with=>'image',$im;
gplot {out=>'i2.png',term=>'png',},with=>'image',$im1;


Ingo

On 10/18/22 07:52, Paul Goodall wrote:
Hi perldl peeps,

I'm trying to do something that should be really simple, but it seems
I'm falling over at the first hurdle.
I've replicated the error in it's simplest form from the example given
in the docs as follows, and I've highlighted the offending line.

----
|use| |PDL <https://metacpan.org/pod/PDL::Transform>;|
|use| |PDL::IO::Image <https://metacpan.org/pod/PDL::Transform>;|
|use| |PDL::Transform <https://metacpan.org/pod/PDL::Transform>;|
|
|$im| |= rfits(||'m51.fits'||);|
|$tr| |= t_linear({||rot||=>30});|
|$im1| |= ||$tr||->||map||(||$tr||); |
---
|
And I'm hit with this one:

> Undefined subroutine &PDL::Transform::Linear::identity called at transform.pd 
line 2729.

I'm using PDL v2.080 on Ubuntu 20.04 (focal).

This feels like it's something that has been solved a million times,
but I can't seem to find the solution.  Am I looking at the wrong Docs
or doing something obviously silly?

cheers,

Paul


_______________________________________________
pdl-general mailing list
pdl-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pdl-general
_______________________________________________
pdl-general mailing list
pdl-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pdl-general

Reply via email to