Thanks David,
I had already found m51.fits, but it is not the raw image, and I was
missing the other files. As they are not used in the demos, maybe they
wouldn't fit in the main distribution; just the info about where to
fetch them from. There are other image files used in the examples in
the book for which links would be desirable. Maybe they could be
included as footnotes or endnotes to the chapters where they are used.
Regards,
Luis
On Mon, Sep 10, 2012 at 09:50:08AM -0500, David Mertens 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
--
o
W. Luis Mochán, | tel:(52)(777)329-1734 /<(*)
Instituto de Ciencias Físicas, UNAM | fax:(52)(777)317-5388 `>/ /\
Apdo. Postal 48-3, 62251 | (*)/\/ \
Cuernavaca, Morelos, México | [email protected] /\_/\__/
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl