[AstroPy] Montage issue
Brandon Doyle
bjd2385 at rit.edu
Fri Aug 15 14:45:31 EDT 2014
Hello,
Just a follow-up to my previous email containing all of the files -- it
happens that I finally got a reply on Stackexchange, and while helpful it
still leaves quite a few issues that are yet to be resolved on my end. You
can see it here
<http://stackoverflow.com/questions/25327586/montageerror-invalid-table-file/25330189?noredirect=1#comment39490373_25330189>
.
I did as they said, i.e. I went and looked at what the last line is saying:
Invalid table file: /tmp/tmpDuSJlr/images_raw.tbl
and the file images_raw.tbl is indeed just an empty file...I'm not sure why
this would be? It's producing the r.fits, g.fits and b.fits images
perfectly and I can open them in FitsLiberator and they look fine. Then
when I open those same images with aplpy.make_rgb_cube() it outputs the
errors that can be seen in my post on Stack Exchange.
Hopefully there is a quick fix to this problem.
Brandon Doyle
On Fri, Aug 15, 2014 at 5:51 AM, Thomas Robitaille <
thomas.robitaille at gmail.com> wrote:
> Hi Brandon,
>
> Would it be possible for you to send me the files off-list, so I can
> take a look at the issue?
>
> Note that I have renamed this thread since it is not related to the
> thread to which it was posted to.
>
> Cheers,
> Tom
>
> Brandon Doyle wrote:
> > Hi all,
> >
> > Problem using Astropy this morning. Input code:
> >
> > # Import Modules:
> >
> > import aplpy
> >
> > import pyfits
> >
> > from numpy import *
> >
> > import matplotlib as plt
> >
> > import montage as montage_wrapper
> >
> > import PIL
> >
> >
> > # Begin convert images w/header/pyfits
> >
> > r = pyfits.open('3c324IR.fits')
> >
> > b = pyfits.open('3c324UVIS.fits')
> >
> > g = pyfits.open('3c5GHZ.fits')
> >
> >
> > r.info <http://r.info>()
> >
> > g.info <http://g.info>()
> >
> > b.info <http://b.info>()
> >
> >
> > print(r[1].header)
> >
> > print(g[1].header)
> >
> > print(b[1].header)
> >
> >
> > r1 = r[1].data
> >
> > g1 = g[0].data
> >
> > b1 = b[1].data
> >
> >
> > hdu = pyfits.PrimaryHDU(r1)
> >
> > hdulist = pyfits.HDUList([hdu])
> >
> > hdulist.writeto('r.fits')
> >
> >
> > hdu = pyfits.PrimaryHDU(g1)
> >
> > hdulist = pyfits.HDUList([hdu])
> >
> > hdulist.writeto('g.fits')
> >
> >
> > hdu = pyfits.PrimaryHDU(b1)
> >
> > hdulist = pyfits.HDUList([hdu])
> >
> > hdulist.writeto('b.fits')
> >
> >
> > # Begin Code:
> >
> >
> > aplpy.make_rgb_cube(['r.fits','g.fits','b.fits'],
> '3c_324_rgb.fits')
> >
> >
> > aplpy.make_rgb_image('3c_324_rgb.fits','3c_324_rgb.png')
> >
> >
> > f = aplpy.FITSFigure('3c_324_rgb.fits')
> >
> > f.show_rgb()
> >
> > f.save('3c_324_rgb2.png')
> >
> >
> > print 'END'
> >
> >
> > output from server:
> >
> >
> >
> > Traceback (most recent call last):
> >
> > File "test9.py", line 47, in <module>
> >
> > aplpy.make_rgb_cube(['r.fits','g.fits','b.fits'],
> '3c_324_rgb.fits')
> >
> > File "/usr/local/lib/python2.7/dist-packages/aplpy/rgb.py", line
> > 309, in make_rgb_cube
> >
> > montage.mMakeHdr(images_raw_tbl, header_hdr,
> > north_aligned=north, system=system, equinox=equinox)
> >
> > File
> >
> "/usr/local/lib/python2.7/dist-packages/montage_wrapper/commands.py", line
> > 1468, in mMakeHdr
> >
> > return status.parse_struct("mMakeHdr", p.stdout.read().strip())
> >
> > File
> > "/usr/local/lib/python2.7/dist-packages/montage_wrapper/status.py",
> > line 33, in parse_struct
> >
> > result = Struct(command, string)
> >
> > File
> > "/usr/local/lib/python2.7/dist-packages/montage_wrapper/status.py",
> > line 70, in __init__
> >
> > raise MontageError("%s: %s" % (command, self.msg))
> >
> > montage_wrapper.status.MontageError: mMakeHdr: Invalid table file:
> > /tmp/tmpmyYyN7/images_raw.tbl
> >
> >
> > I'm not sure what to make of it...any ideas?
> >
> > Brandon Doyle
> >
> >
> >
> > On Thu, Aug 14, 2014 at 10:45 PM, gonghang.naoc <ghang.naoc at gmail.com
> > <mailto:ghang.naoc at gmail.com>> wrote:
> >
> > Thank you all. Now I realize Anaconda+NOAO's iraf+pyraf, this combo
> > is enough for me, temporarily.
> >
> > hang
> >
> >
> > On Fri, Aug 15, 2014 at 2:12 AM, Оlе Ѕtrеісhеr <astropy at liska.ath.cx
> > <mailto:astropy at liska.ath.cx>> wrote:
> >
> > "gonghang.naoc" <ghang.naoc at gmail.com
> > <mailto:ghang.naoc at gmail.com>> writes:
> > > I reinstalled my system just now. The previsous system had a
> > mess of
> > > python modules with chaotic dependency. Could somebody please
> > give me
> > > a simple list to instll? Potentially I need numpy,scipy,epd,
> > > ureka,iraf,pyraf, anaconda or somethig else which you can
> suggest.
> > > A simple and versatile combo is the best.
> >
> > Since this was not mentioned yet: If you are using a Linux
> > distribution
> > (Debian, Ubuntu, Fedora, Mageia etc.) it may be worth checking
> > whether
> > the packages you need are already there. Then the simplest
> solution
> > would be a "apt-get install whatever-you-like" and be lucky. The
> > nice
> > thing is that it then works (well, in theory) out of the box.
> And is
> > updated automatically (or not, if you manually put the package
> > on hold).
> >
> > If the package you need is still not there and you want to help
> us
> > completing the selection, you are very welcome. Even if you
> > don't want
> > to do the packaging yourself, it is useful to know, which
> > packages are
> > actually needed.
> >
> > Best regards
> >
> > Ole
> > _______________________________________________
> > AstroPy mailing list
> > AstroPy at scipy.org <mailto:AstroPy at scipy.org>
> > http://mail.scipy.org/mailman/listinfo/astropy
> >
> >
> >
> > _______________________________________________
> > AstroPy mailing list
> > AstroPy at scipy.org <mailto:AstroPy at scipy.org>
> > http://mail.scipy.org/mailman/listinfo/astropy
> >
> >
> > _______________________________________________
> > AstroPy mailing list
> > AstroPy at scipy.org
> > http://mail.scipy.org/mailman/listinfo/astropy
> _______________________________________________
> AstroPy mailing list
> AstroPy at scipy.org
> http://mail.scipy.org/mailman/listinfo/astropy
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/astropy/attachments/20140815/ffc0e194/attachment.html>
More information about the AstroPy
mailing list