[AstroPy] AstroPy Digest, Vol 88, Issue 14

Richard Shaw dshaw.noao at gmail.com
Mon Jan 27 12:22:12 EST 2014


Bravo! Particularly:

>It's also true that "1" is a perfectly good "floating point" value as far
as FITS is concerned, and is also just as much an integer.

I would add that "1." is also a perfectly good floating point value as far
as FITS is concerned. IMHO software should _insulate_ users from the
peculiarities of FITS, to the extent feasible, rather than torture them
with it.

-Dick Shaw


On Fri, Jan 24, 2014 at 11:00 AM, <astropy-request at scipy.org> wrote:

> Send AstroPy mailing list submissions to
>         astropy at scipy.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         http://mail.scipy.org/mailman/listinfo/astropy
> or, via email, send a message with subject or body 'help' to
>         astropy-request at scipy.org
>
> You can reach the person managing the list at
>         astropy-owner at scipy.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of AstroPy digest..."
>
>
> Today's Topics:
>
>    1. Release of pywwt 0.1.0,   a Python interface to the World Wide
>       Telescope Windows Client (John ZuHone)
>    2. Re: Type changing (float to int) of header fields in
>       astropy.wcs.to_header ? (Erik Bray)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 23 Jan 2014 13:12:58 -0500
> From: John ZuHone <jzuhone at gmail.com>
> Subject: [AstroPy] Release of pywwt 0.1.0,      a Python interface to the
>         World Wide Telescope Windows Client
> To: astropy <astropy at scipy.org>
> Message-ID: <1304F272-D306-4DD7-9872-38628E385DE9 at gmail.com>
> Content-Type: text/plain; charset="windows-1252"
>
> Hi all,
>
> Apologies for the spam, but I thought maybe the astropy list would be good
> place to find some interest in this new library I wrote, pywwt:
>
> http://www.jzuhone.com/pywwt
>
> pywwt is a Python interface for the Microsoft World Wide Telescope (WWT,
> http://www.worldwidetelescope.org) Windows client, using the Layer
> Control API (LCAPI). The LCAPI provides an interface to WWT?s Layer Manager
> by sending data and information in the form of strings over HTTP. pywwt
> provides a straightforward Python interface to make these calls, enabling
> the control of WWT from scripts or an IPython notebook. Most importantly,
> it enables the passing of data created within a Python environment to WWT.
>
> The upshot of this is that particle and event data that can be loaded into
> memory in Python can be passed off to a World Wide Telescope client running
> on a Windows machine, either the same host or a host on the same network.
>
> To see an example IPython notebook (complete with an example video!),
> visit: http://www.jzuhone.com/pywwt/pywwt_example.html
>
> pywwt requires the following packages:
>
>         ? NumPy
>         ? Matplotlib
>         ? AstroPy
>         ? Beautiful Soup 4
>         ? Requests
>         ? Dateutil
>
> pywwt can be installed from pip:
>
> pip install pywwt
>
> or download the source from http://github.com/jzuhone/pywwt and install:
>
> python setup.py install
>
> My use cases are limited, and I'd be interested in what others could do
> with it, so if you are interested please fork the code and help develop!
>
> Best,
>
> John ZuHone
>
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://mail.scipy.org/pipermail/astropy/attachments/20140123/454831be/attachment-0001.html
>
> ------------------------------
>
> Message: 2
> Date: Thu, 23 Jan 2014 15:35:33 -0500
> From: Erik Bray <embray at stsci.edu>
> Subject: Re: [AstroPy] Type changing (float to int) of header fields
>         in astropy.wcs.to_header ?
> To: <astropy at scipy.org>
> Message-ID: <52E17D15.7080001 at stsci.edu>
> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed
>
> On 01/22/2014 05:12 PM, Michael Droettboom wrote:
> > On 01/22/2014 02:42 PM, Eric L. N. Jensen wrote:
>
> >> Still, there's something unsatisfying to me about this happening within
> astropy:
> >>
> >>>>  From WCS object:
> >>>>
> >>>> CRVAL3 is type <type 'numpy.float64'> with value:
> >>>> 345797143190.0
> >>>>
> >>>> After to_header conversion:
> >>>>
> >>>> CRVAL3 is type <type 'int'> with value:
> >>>> 345797143190
>
> Incidentally this was just brought up here:
> https://github.com/spacetelescope/PyFITS/issues/49
>
> I don't know whether or not that was in response to this thread, as I
> don't see
> Julian on it anywhere, but it's the same issue nonetheless.
>
> I agree with Mike that if you need the value to be *strictly* treated as a
> float, in particular for the purposes of division, that it's a bug in the
> software to not ensure that it's doing floating point division.  It's also
> true
> that "1" is a perfectly good "floating point" value as far as FITS is
> concerned,
> and is also just as much an integer.
>
> There are other keywords in the FITS standard that must be *strictly*
> treated as
> integers, so it makes sense to return something like "1" as an integer and
> not a
> float.  That said, I think that if you have
>
> CRVAL3 = 345797143190
>
> and you enter in PyFITS:
>
> header['CRVAL3'] = 345797143190.0
>
> then that should upcast the value to a float, with ".0" IMO.  This should
> be
> easy to fix.
>
> As an aside: I'm working on (and am nearly ready with a prototype of) a
> new FITS
> keyword schema definition interface for PyFITS.  This will enable providing
> PyFITS with more semantic information about known keywords (both keywords
> specified in the FITS standard, or keywords in a user-specified
> convention).
> For example, the header will "know" that it is adhering to the FITS WCS
> convention, and that by that convetion CRVAL3 should be treated as a
> float, so
> that even entering:
>
> header['CRVAL3'] = 345797143190
>
> would make sure that it is upcast to a float, as well as returned as a
> float.
>
> The first prototype of the schema definition interface is nearly complete,
> but
> there's still a little ways to go on full integration with the PyFITS
> Header
> interface.
>
> Erik B.
>
>
>
> ------------------------------
>
> _______________________________________________
> AstroPy mailing list
> AstroPy at scipy.org
> http://mail.scipy.org/mailman/listinfo/astropy
>
>
> End of AstroPy Digest, Vol 88, Issue 14
> ***************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/astropy/attachments/20140127/7c5a87c4/attachment.html>


More information about the AstroPy mailing list