You don't have to work that hard.  Try the sf.net
files:

http://sourceforge.net/projects/pdl/files/PDL/PDL%20Book%20Example%20Data%20Set/

I thought that was mentioned in the book
and/or announcement.  If not, we should
add it for the next update.

--Chris

On Mon, Sep 10, 2012 at 10:50 AM, David Mertens
<[email protected]> wrote:
> The M51 fits data is distributed with the PDL distribution. (It is the
> rare exceptional piece of data that is distributed with PDL.) I wrote
> a small module to retrieve it, once upon a time. I've dusted it off:
>
> ---------------%<---------------
> package PDL::M51;
>
> use strict;
> use warnings;
>
> # Include this to make Perl search for us:
> use PDL::Demos::General;
>
> # Get the full path to the General.pm module just loaded
> #my ($k, $v);
> #print "$k => $v\n" while ($k, $v) = each %INC;
> my $path = $INC{'PDL/Demos/General.pm'};
>
> $path =~ s/General.pm/m51.fits/;
>
> sub get {
>         return $path;
> }
>
> 1;
> --------------->%---------------
>
> This will create the function PDL::M51::get, which will return the
> path to the fits file. You can then load the fits file with rfits and
> roll on from there.
>
> However, Karl's flatfield file (and the modified M51 file) used in the
> book are not distributed with PDL, so maybe we should still have links
> for those. Or, Joel had a concept for a CPAN distribution that focused
> on distributing PDL data (PDL::UserData?). These would be great
> candidates for that module.
>
> I've been meaning to propose this for inclusion with PDL for some time
> but, you know, I've had other things on my mind. Would anybody like to
> see this module added to PDL? Should I document and test it?
>
> David
>
> On Sun, Sep 9, 2012 at 1:26 PM, Luis Mochan <[email protected]> wrote:
>> The PDL-Book has a very nice example of pdl's image manipulation
>> capabilities using m51. It would be nice to include a link to the m51
>> images so the reader can reproduce the exercises (it has the path to
>> the images within the book directory, but it would be unable for
>> those that only downloaded the pdf version instead of cloning the git
>> repository)
>>
>> _______________________________________________
>> Perldl mailing list
>> [email protected]
>> http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
>
>
>
> --
>  "Debugging is twice as hard as writing the code in the first place.
>   Therefore, if you write the code as cleverly as possible, you are,
>   by definition, not smart enough to debug it." -- Brian Kernighan
>
> _______________________________________________
> 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

Reply via email to