Code Monkey home page Code Monkey logo

palpy's Introduction

PALpy - Python positional astronomy library

PALpy is a python interface to the PAL positional astronomy library (<https://github.com/Starlink/pal>). All source code is included with the distribution via git submodules.

To build the python interface from the git repository:

git submodule init
git submodule update
python setup.py build
python setup.py install
python test_pal.py

Requires that Cython and numpy are installed.

The interface uses the same names as the C interface with the pal prefix missing:

import palpy as pal

djm = pal.caldj( 1999, 12, 31 )
(r2000, d2000) = pal.fk45z( 1.2, -0.3, 1960 )

All arguments modified by the C API are returned. No arguments are modified. The one routine that is different is palObs which returns a simple dict that can be searched using standard python. The keys to the dict are the short names and the values are another dict with keys name, long, lat and height.

Docstrings are included with each routine describing the python usage and the associated C documentation:

help(palpy) help(palpy.caldj)

See test_pal.py for detailed examples of all functions.

Documentation:

The module provides documentation on how to use the python interface to PAL. It does not contain information on how to use PAL itself.

The basic PAL documentation can be found at

http://www.starlink.ac.uk/star/docs/sun267.htx/sun267.html

For more information the SLA documentation provides much more detail:

http://www.starlink.ac.uk/star/docs/sun67.htx/sun67.html

A description paper for PAL was published in the ADASS XXII conference proceedings:

http://adsabs.harvard.edu/abs/2013ASPC..475..307J

Please consider citing this if you use PAL or palpy in your research.

Further Work

Not all the SLALIB routines are available from PAL. More can be added as need arises.

Author

Copyright (C) 2012, 2014-2016 Tim Jenness ([email protected]). All Rights Reserved.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

palpy's People

Contributors

danielsf avatar rhiannonlynne avatar schandra avatar simonkrughoff avatar timj avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

palpy's Issues

New release

We are using palpy in some of the LSST simulations code, so we are distributing a version of palpy as well as our own code. Currently we distribute master from 1855e5, but I'd prefer to distribute a release. We need the new vectorized methods, so I was wondering if there is a timeline for having a new release or if we should just continue distributing master from some (relatively arbitrary) commit?

Palpy Cython-related issues

Hi Palpy team! I'm dealing with a couple issues related to Cython that I was hoping someone could help resolve

This is the error I get when I try to pip install palpy with the most recent version of cython
image

When trying to build cython from source I got a decently longer error message:
image

I'm running on a Linux backend!

relationship between mapqk and ampqk

Reading the documentation for mapqk and ampqk, I get the sense that they are supposed to invert each other. Mapqk transforms the mean position of a star into the apparent geocentric position. Ampqk does the opposite. However, Mapqk accepts parallax as one of its arguments. Ampqk does not. Indeed, in using the functions, I have noticed that they do invert each other to sub-milliarcsecond precision when parallax is zero. When parallax is not zero, running the roundtrip through mapqk and ampqk can result in a residual on the order of a few 0.1 arcseconds. Is there some reason these functions are not exact inverses of each other? I understand that subtracting out the effects of proper motion and radial velocity might not make much sense, but I would have assumed that parallax was something that we would want to be able to account for in converting from geocentric apparent to mean position.

Thanks.

Python help strings

I wonder if it would be easy to add useful python help strings so that things like

>>> help(palpy.mapqk)

return useful information. The naive thing to do is to extend the definitions on the python side, but it's a pain to maintain documentation in two places. Maybe it's possible to pass the docstring from c to python via a method in c and then set the func.__doc__. I don't know if that's possible in cython source.

pm doesn't work

Routine pm doesn't seem to work. No motion is applied.

Example:
import palpy
In [11]: palpy.pm(0., 0., 5., 5., 0., 0., 2000., 2010.)
Out[11]: (0.0, 0.0)

Windows support?

I try to install palpy in Windows for specific application. But I cannot compile it, with VS2015 installed. Does this package support windows or need any change?
Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.