{ "info": { "author": "Prasanth Nair", "author_email": "prasanthhn@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 6 - Mature", "Intended Audience :: Science/Research", "License :: OSI Approved :: BSD License", "Topic :: Scientific/Engineering :: Astronomy" ], "description": "Python interface to the TPM C library\r\n=====================================\r\n\r\n.. _Telescope Pointing Machine: http://www.sal.wisc.edu/~jwp/astro/tpm/tpm.html\r\n.. _Jeffrey W Percival: http://www.sal.wisc.edu/~jwp/\r\n.. _Cython: http://www.cython.org/\r\n.. _SWIG: http://www.swig.org/\r\n.. _coords: https://trac6.assembla.com/astrolib\r\n.. _astrolib: https://trac6.assembla.com/astrolib\r\n.. _KPNO WIYN observatory: http://www.noao.edu/wiyn/wiyn.html\r\n.. _WHAM: http://www.astro.wisc.edu/wham/\r\n.. _KPNO: http://www.noao.edu/kpno\r\n.. _Virtualenv: http://pypi.python.org/pypi/virtualenv \r\n.. _Virtualenvwrapper: \r\n http://www.doughellmann.com/projects/virtualenvwrapper/\r\n.. _ipython: http://ipython.scipy.org\r\n.. _Practical Astronomy With Your Calculator: \r\n http://www.amazon.com/Practical-Astronomy-Calculator-Peter-Duffett-Smith/dp/0521356997\r\n.. _Distribute: http://packages.python.org/distribute/\r\n.. _numpydoc: http://pypi.python.org/pypi/numpydoc\r\n.. _Sphinx: http://sphinx.pocoo.org/\r\n.. _IERS: http://www.iers.org/\r\n.. _Nose: http://pypi.python.org/pypi/nose\r\n.. _pypi page for the project: http://pypi.python.org/pypi/PyTPM\r\n.. _pip: http://pypi.python.org/pypi/pip\r\n.. _pyslalib: https://github.com/scottransom/pyslalib\r\n\r\n** DEVELOPMENT CEASED **\r\n\r\nPyTPM is a Python interface to the `Telescope Pointing Machine`_ (TPM)\r\nlibrary. TPM is a C library written by `Jeffrey W Percival`_, for performing\r\ncoordinate conversions between several astronomical coordinate systems.\r\n\r\nTPM was designed with the aim of incorporating it into telescope\r\ncontrol systems. To meet this design goal, TPM offers control over\r\ncalculations carried out during coordinate conversions. Some of these\r\ncalculations must be performed frequently, for example time related\r\ncalculations. Others need to be performed only once per night, for\r\nexample nutation and precession matrices. TPM allows the user to select\r\nthe exact calculations to be performed. This enables the user to\r\ncontrol the computational load, which is important in telescope control\r\nsystems. TPM C library is used by the `KPNO WIYN observatory`_ and the\r\nWHAM_ projects.\r\n\r\nPyTPM is not a complete astrometry package. The aim is to provide\r\naccess to the TPM C code from Python. TPM machinery can be directly\r\naccessed using the `pytpm.tpm` sub-module. The sub-module\r\n`pytpm.convert` has several convenience functions that can be used for\r\nperforming coordinate conversions. The latter is sufficient for most,\r\nbut not all, calculations. You should read the `TPM manual`__ before\r\nattempting to use the `pytpm.tpm` module. The manual is present in the\r\nsource code repository and is also included with the PyTPM\r\ndocumentation\r\n\r\n__ `Telescope Pointing Machine`_\r\n\r\nPython interface to TPM C code is written using Cython_.\r\n\r\nInstalling PyTPM\r\n================\r\n\r\nPyTPM requires the following:\r\n\r\n+ Python 2.6, 2.7 or 3.2.\r\n+ GCC.\r\n+ The Distribute_ package.\r\n+ Nose_ for running tests.\r\n+ Cython_, only if the Cython output needs to be regenerated.\r\n\r\nTo build the documentation Sphinx_ and the numpydoc_ Sphinx extension\r\nis required.\r\n\r\nPyTPM was tested on Ubuntu 10.10 and 11.04.\r\n\r\nInstallation\r\n============\r\n\r\n.. important::\r\n\r\n The file `src/tpm/delta_AT.c` must be updated when Delta-AT is\r\n changed by the IERS_, and PyTPM Cython code must\r\n re-compiled. Update the file and just run setup.py again. A new\r\n version of PyTPM will be released when this change occurs.\r\n\r\nIf you don't have Distribute_, then install it. Then do one of the\r\nfollowing:\r\n\r\n+ pip_ or `easy_install`\r\n\r\n Install pip_ and then run `pip install pytpm`. \r\n\r\n If `easy_install` is available then `easy_install pytpm` will also\r\n work. Distribute_ comes with easy_install. `pip`_ itself can be\r\n installed using the command `easy_install pip`.\r\n\r\nor \r\n\r\n+ Manual installation.\r\n\r\n Download the distribution from the `pypi page for the project`_. Then\r\n run `python setup.py install`. Use the `--prefix ` or `--user`\r\n arguments to change the installation location.\r\n\r\n\r\nWith both these methods, virtualenv_ and virtualenvwrapper_ can be\r\nused. These tools enable easy installation and maintenance of Python\r\npackages.\r\n\r\nTo run tests, and to build documentation, the manual installation\r\nmethod has to be followed. Run `python setup.py test` and then run\r\n`python setup.py install`. To build documentation, run `make html` in\r\nthe `doc` directory.\r\n\r\nExamples\r\n========\r\n\r\nDetailed documentation is available at\r\nhttp://phn.github.com/pytpm. Documentation in HTML format can also be\r\ndownloaded from the `pypi page for the project`_. Documentation in ReST\r\nformat is available in the `doc` directory of the distribution.\r\n \r\nPyTPM can be used to convert *positions and velocities* in a given\r\nastronomical coordinate system into another. Examples of doing this are\r\nin the `examples` folder of the source code repository and is also\r\nincluded with the HTML documentation.\r\n\r\nYou should read the `TPM manual`__ before attempting to use the\r\n`pytpm.tpm` module. The manual is also available in the source code\r\nrepository and the HTML documentation.\r\n\r\n__ `Telescope Pointing Machine`_\r\n\r\n.. _coordinates of M100: http://simbad.u-strasbg.fr/simbad/sim-basic?Ident=M100&submit=SIMBAD+search\r\n\r\nIn the following examples `coordinates of M100`_ is converted between\r\ndifferent systems. \r\n\r\nThe following examples use the convenience function\r\n`pytpm.convert.convertv6`, instead of directly using the underlying TPM\r\nfunctions. The documentation has examples of using the latter.\r\n\r\nThe `convertv6` function takes the following arguments. Not all of\r\nthese need to be specified for a given conversion. \r\n\r\n+------------+----------------------------------------------------+\r\n| Parameter | Description |\r\n+============+====================================================+\r\n| v6 | one V6C vector or a list of V6C vectors. |\r\n+------------+----------------------------------------------------+\r\n| s1 | start state |\r\n+------------+----------------------------------------------------+\r\n| s2 | end state |\r\n+------------+----------------------------------------------------+\r\n| epoch | epoch of the coordinates as a Julian date |\r\n+------------+----------------------------------------------------+\r\n| equinox | equinox of the coordinates as Julian date |\r\n+------------+----------------------------------------------------+\r\n| utc | time of \"observation\" as a Julian date; |\r\n| | exact meaning depends on the type of conversion; |\r\n| | defaults to the epoch J2000.0 |\r\n+------------+----------------------------------------------------+\r\n| delta_ut | UT1 - UTC in seconds. |\r\n+------------+----------------------------------------------------+\r\n| delta_at | TAI - UTC in seconds. |\r\n+------------+----------------------------------------------------+\r\n| lon | geodetic longitude in degrees |\r\n+------------+----------------------------------------------------+\r\n| lat | geodetic latitude in degrees |\r\n+------------+----------------------------------------------------+\r\n| alt | altitude in meters |\r\n+------------+----------------------------------------------------+\r\n| xpole | ploar motion in radians |\r\n+------------+----------------------------------------------------+\r\n| ypole | ploar motion in radians |\r\n+------------+----------------------------------------------------+\r\n| T | temperature in kelvin |\r\n+------------+----------------------------------------------------+\r\n| P | pressure in milli-bars |\r\n+------------+----------------------------------------------------+\r\n| H | relative humidity (0-1) |\r\n+------------+----------------------------------------------------+\r\n| wavelength | wavelength of observation in microns |\r\n+------------+----------------------------------------------------+\r\n\r\nA `V6C` object is a 6-D vector that stores positions and velocities in\r\nCartesian coordinates. The function `pytpm.convert.v62cat` can be used\r\nto create a `V6C` object from catalog data. This function will accept\r\nscalar or list of coordinates. Function `pytpm.convert.v62cat` can\r\nconvert `V6C` objects to catalog coordinates. The coordinates are\r\nreturned as a dictionary. This function will also take a list of `V6C`\r\nobjects and will return a list of dictionaries.\r\n\r\nCoordinate systems are specified using integers or integer\r\nconstants. These are referred to as `states`.The following are some of\r\nthe important states.\r\n\r\n+---------+------------------------------------------------+\r\n| State | Description |\r\n+=========+================================================+\r\n| 3 | IAU 1980 Ecliptic system |\r\n+---------+------------------------------------------------+\r\n| 4 | IAU 1958 Galactic system |\r\n+---------+------------------------------------------------+\r\n| 5 | Heliocentric mean FK4 system, B1950 equinox |\r\n+---------+------------------------------------------------+\r\n| 6 | Heliocentric mean FK5 system, J2000 equinox |\r\n+---------+------------------------------------------------+\r\n| 11 | Geocentric apparent FK5, current equinox |\r\n+---------+------------------------------------------------+\r\n| 16 | Topocentric apparent FK5, current equinox |\r\n+---------+------------------------------------------------+\r\n| 17 | Topocentric apparent (Hour Angle, Declination) |\r\n+---------+------------------------------------------------+\r\n| 18 | Topocentric apparent (Azimuth, Elevation) |\r\n+---------+------------------------------------------------+\r\n| 19 | Topocentric observed (Azimuth, Elevation) |\r\n+---------+------------------------------------------------+\r\n| 20 | Topocentric observed (Hour Angle, Declination) |\r\n+---------+------------------------------------------------+\r\n\r\nFK5 equinox and epoch J2000.0, to FK4 equinox and epoch B1950.0\r\n---------------------------------------------------------------\r\n\r\nFirst obtain the FK5 equinox J2000.0 and epoch J2000.0 RA and Dec\r\ncoordinates in radians.\r\n\r\n::\r\n\r\n >>> ra_j2000 = tpm.HMS(hh=12, mm=22, ss=54.899).to_radians()\r\n >>> dec_j2000 = tpm.DMS(dd=15, mm=49, ss=20.57).to_radians()\r\n\r\nCreate a `V6C` vector for the object. Note that `pytpm.convert.cat2v6`\r\nwill accept a list of coordinates as well.\r\n\r\n::\r\n\r\n >>> v6 = convert.cat2v6(ra_j2000, dec_j2000)\r\n\r\nNow convert to FK4 equinox B1950.0 but remaining at epoch J2000.0. In\r\nthe following `6` stands for FK5 equinox and epoch J2000.0 coordinates\r\nand `5` stands for FK4 equinox and epoch B1950.0. The epoch and equinox\r\nare specified using `epoch` and `equinox` keywords. But they can be\r\ninterpreted in different ways depending on the exact conversion\r\nrequested. In this case, they are applicable to the input coordinates.\r\n\r\n::\r\n\r\n >>> v6_fk4 = convert.convertv6(v6, s1=6, s2=5, epoch=tpm.J2000, \r\n ...: equinox=tpm.J2000)\r\n\r\nConvert V6C to catalog data and print results. Function\r\n`pytpm.convert.v62cat` will also accept a list of V6C objects.\r\n\r\n::\r\n\r\n >>> d = convert.v62cat(v6_fk4, C=tpm.CB)\r\n >>> print tpm.HMS(r=d['alpha'])\r\n 12H 20M 22.935S\r\n >>> print tpm.DMS(r=d['delta'])\r\n +16D 05' 58.024\"\r\n\r\nThe parameter `C` is the number of days in a century. The velocities in\r\nAU/day must be converted into \"/century. In the Besselian system, a\r\ncentury has approximately 36524.22 days, where as in the Julian system\r\na century has 36525.0 days. The former is used in FK4 and the latter is\r\nused in FK5. The default value is set to 36525.0.\r\n\r\nNote that the results above *do not agree* with the FK4 values given by\r\nSIMBAD. This is because the results are for the epoch J2000.0. Even\r\nthough the object doesn't have proper motion, the FK4 system is\r\nrotating with respect to FK5. This results in a fictitious proper\r\nmotion in the FK4 system. We must apply proper motion from epoch\r\nJ2000.0 to epoch B1950.0 to get the final result.\r\n\r\n::\r\n\r\n >>> v6_fk4_ep1950 = convert.proper_motion(v6_fk4, tpm.B1950, tpm.J2000)\r\n\r\nFinally convert V6C to catalog data and print results. The final result\r\nis in FK4 equinox and epoch B1950.0. The final results agree with the\r\nvalues given by SIMBAD.\r\n\r\n::\r\n\r\n >>> d = convert.v62cat(v6_fk4_ep1950, C=tpm.CB)\r\n >>> print tpm.HMS(r=d['alpha'])\r\n 12H 20M 22.943S\r\n >>> print tpm.DMS(r=d['delta'])\r\n +16D 05' 58.241\"\r\n\r\n\r\nFK5 equinox and epoch J2000 to IAU 1958 Galactic System\r\n-------------------------------------------------------\r\n\r\nThe IAU 1958 galactic system is represented using state `4`. The result\r\nbelow is for the epoch J2000.0. The epoch of the Galactic coordinates\r\ngiven by SIMBAD is J2000.0. So the result obtained below is what we\r\nneed, i.e., we don't need to apply any proper motion corrections.\r\n\r\n::\r\n\r\n >>> ra_j2000 = tpm.HMS(hh=12, mm=22, ss=54.899).to_radians()\r\n >>> dec_j2000 = tpm.DMS(dd=15, mm=49, ss=20.57).to_radians()\r\n >>> v6 = convert.cat2v6(ra_j2000, dec_j2000)\r\n\r\n >>> v6_gal = convert.convertv6(v6, s1=6, s2=4, epoch=tpm.J2000, \r\n ...: equinox=tpm.J2000)\r\n\r\n >>> d = convert.v62cat(v6_gal)\r\n >>> print tpm.r2d(d['alpha'])\r\n 271.136139562\r\n >>> print tpm.r2d(d['delta'])\r\n 76.8988689751\r\n\r\n\r\nIAU 1958 Galactic to FK5 equinox and epoch J2000.0\r\n--------------------------------------------------\r\n\r\nHere we set the starting state to galactic i.e., `4` and the end state\r\nto FK5 equinox. Since the input coordinates are at epoch J2000.0, the\r\nfinal results will also be at epoch J2000.0, i.e., FK5 equinox and\r\nepoch J2000.0.\r\n\r\n::\r\n\r\n >>> gal_lon = tpm.d2r(271.1361)\r\n >>> gal_lat = tpm.d2r(76.8989)\r\n >>> v6 = convert.cat2v6(gal_lon, gal_lat)\r\n\r\n >>> v6_fk5 = convert.convertv6(v6, s1=4, s2=6, epoch=tpm.J2000)\r\n\r\n >>> d = convert.v62cat(v6_fk5)\r\n >>> print tpm.HMS(r=d['alpha'])\r\n 12H 22M 54.900S\r\n >>> print tpm.DMS(r=d['delta'])\r\n +15D 49' 20.683\"\r\n\r\nThe results are consistent with the accuracy of the input galactic\r\ncoordinates. \r\n\r\nFK5 equinox and epoch J2000 to IAU 1980 Ecliptic system\r\n-------------------------------------------------------\r\n\r\nThe ecliptic system is indicated using the state `3`. Here the epoch of\r\nthe output ecliptic coordinates will be J2000.0.\r\n\r\n::\r\n\r\n >>> ra_j2000 = tpm.HMS(hh=12, mm=22, ss=54.899).to_radians()\r\n >>> dec_j2000 = tpm.DMS(dd=15, mm=49, ss=20.57).to_radians()\r\n >>> v6 = convert.cat2v6(ra_j2000, dec_j2000)\r\n\r\n >>> v6_ecl = convert.convertv6(v6, s1=6, s2=3, epoch=tpm.J2000, \r\n ...: equinox=tpm.J2000)\r\n\r\n >>> d = convert.v62cat(v6_ecl)\r\n >>> print tpm.r2d(d['alpha'])\r\n 178.78256462\r\n >>> print tpm.r2d(d['delta'])\r\n 16.7597002513\r\n\r\nThe results agree with the results form the SLALIB (pyslalib_) routine\r\n`sla_eqecl`.\r\n\r\n\r\nIAU 1980 Ecliptic system to FK5 equinox and epoch J2000.0\r\n---------------------------------------------------------\r\n\r\nThe starting state is set to `3` for ecliptic and the end state is set\r\nto `6` for FK5 equinox and epoch J2000.0.\r\n\r\n::\r\n\r\n >>> ecl_lon = tpm.d2r(178.78256462)\r\n >>> ecl_lat = tpm.d2r(16.7597002513)\r\n >>> v6 = convert.cat2v6(ecl_lon, ecl_lat)\r\n\r\n >>> v6_fk5 = convert.convertv6(v6, s1=3, s2=6, epoch=tpm.J2000)\r\n\r\n >>> d = convert.v62cat(v6_fk5)\r\n >>> print tpm.HMS(r=d['alpha'])\r\n 12H 22M 54.898S\r\n >>> print tpm.DMS(r=d['delta'])\r\n +15D 49' 20.570\"\r\n\r\n\r\nFK5 equinox and epoch J2000 to Geocentric apparent\r\n--------------------------------------------------\r\n\r\nGeocentric apparent RA & Dec. for midnight of 2010/1/1 is calculated as\r\nshown below. The state identification number for geocentric apparent\r\nposition is `11`.\r\n\r\nObtain UTC and TDB time for the time of observation.\r\n\r\n::\r\n\r\n >>> utc = tpm.gcal2j(2010, 1, 1) - 0.5 # midnight\r\n >>> tdb = tpm.utc2tdb(utc)\r\n\r\nObtain coordinates and `V6C` vector.\r\n\r\n::\r\n\r\n >>> ra_j2000 = tpm.HMS(hh=12, mm=22, ss=54.899).to_radians()\r\n >>> dec_j2000 = tpm.DMS(dd=15, mm=49, ss=20.57).to_radians()\r\n >>> v6 = convert.cat2v6(ra_j2000, dec_j2000)\r\n\r\nApply proper motion from epoch J2000.0 to epoch of observation. In this\r\nexample, this is not needed since proper motion is zero. But we do this\r\nfor completeness. The result is FK5 J2000 current epoch.\r\n\r\n::\r\n\r\n >>> v6 = convert.proper_motion(v6, tt, tpm.J2000)\r\n\r\nConvert coordinates from FK5 equinox J2000, current epoch to FK5\r\nequinox and epoch of date.\r\n\r\n::\r\n\r\n >>> v6_gc = convert.convertv6(v6, s1=6, s2=11, utc=utc)\r\n >>> d = convert.v62cat(v6_gc)\r\n >>> print tpm.r2d(d['alpha'])\r\n 185.860038856\r\n >>> print tpm.r2d(d['delta'])\r\n 15.7631353482\r\n\r\nThe result from SLALIB (pyslalib_) for the equivalent conversion, using\r\nthe `sla_map` function is given below.\r\n\r\n::\r\n\r\n >>> utc = slalib.sla_caldj(2010, 1, 1)[0] # midnight\r\n >>> tt = slalib.sla_dtt(utc) / 86400.0 + utc\r\n\r\n >>> r, d = slalib.sla_map(ra_j2000, dec_j2000, 0, 0, 0, 0.0, 2000.0,\r\n ...: tt)\r\n\r\n >>> tpm.r2d(r)\r\n 185.86002229414245\r\n >>> tpm.r2d(d)\r\n 15.763142468669891\r\n\r\nThe difference is about 0.06 arc-sec in RA and about 0.03 arc-sec\r\nin Dec.::\r\n\r\n >>> (tpm.r2d(r) - 185.860038856) * 3600.0\r\n -0.059622687126648088\r\n >>> (tpm.r2d(d) - 15.7631353482) * 3600.0\r\n 0.025633691604554087\r\n\r\n\r\nFK5 equinox and epoch J2000 to topocentric observed\r\n---------------------------------------------------\r\n\r\nTopocentric observed azimuth and elevation (and zenith distance) for an\r\nobserver at the default location (KPNO) is calculated for 2010/1/1\r\nmid-day. The final state i.e., apparent topocentric Az & El, is `19`.\r\n\r\nFor midnight 2010/1/1 this object is below the horizon and hence the\r\nrefraction calculations are not reliable. So we use mid-day for the\r\nfollowing example.\r\n\r\n::\r\n\r\n >>> utc = tpm.gcal2j(2010, 1, 1) # mid-day\r\n >>> tt = tpm.utc2tdb(utc)\r\n\r\n >>> ra_j2000 = tpm.HMS(hh=12, mm=22, ss=54.899).to_radians()\r\n >>> dec_j2000 = tpm.DMS(dd=15, mm=49, ss=20.57).to_radians()\r\n >>> v6 = convert.cat2v6(ra_j2000, dec_j2000)\r\n\r\n >>> v6 = convert.proper_motion(v6, tt, tpm.J2000)\r\n\r\n >>> v6_app = convert.convertv6(v6, s1=6, s2=19, utc=utc)\r\n\r\n >>> d = convert.v62cat(v6_app)\r\n >>> print tpm.r2d(d['alpha']), 90 - tpm.r2d(d['delta'])\r\n 133.49820871 22.0162437585\r\n\r\nTo calculate the observed hour angle and declination the `v6_app`\r\nvector obtained above can be used as input. We don't need to go back to\r\nthe FK5 equinox and epoch J2000.0 values. The input state is now `19`\r\nand the output, i.e., topocentric observed HA & Dec, is `20`.\r\n\r\n::\r\n\r\n >>> v6_hadec = convert.convertv6(v6_app, s1=19, s2=20, utc=utc)\r\n\r\n >>> d = convert.v62cat(v6_hadec)\r\n >>> print tpm.r2d(d['alpha'])\r\n 343.586827647\r\n >>> print tpm.r2d(d['delta'])\r\n 15.7683070508\r\n\r\nTo calculate the observed RA we need to find the LAST, since TPM only\r\nprovides apparent RA. The observed RA can be found by subtracting hour\r\nangle from LAST. This is one situation where we need to access the\r\nunderlying TPM machinery provided in `pytpm.tpm`. Please consult the\r\nTPM manual and the PyTPM documentation for more information.\r\n\r\n::\r\n\r\n >>> tstate = tpm.TSTATE()\r\n >>> tpm.tpm_data(tstate, tpm.TPM_INIT)\r\n >>> tstate.utc = utc\r\n >>> tstate.delta_ut = tpm.delta_UT(utc)\r\n >>> tstate.delta_at = tpm.delta_AT(utc)\r\n >>> tstate.lon = tpm.d2r(-111.598333)\r\n >>> tstate.lat = tpm.d2r(31.956389)\r\n >>> tpm.tpm_data(tstate, tpm.TPM_ALL)\r\n >>> last = tpm.r2d(tpm.r2r(tstate.last))\r\n >>> last - tpm.r2d(d['alpha']) + 360.0\r\n 185.85569737491355 \r\n\r\nThe same calculation with SLALIB, using `sla_aop` produces results that\r\nagree with PyTPM.\r\n\r\n::\r\n\r\n >>> dut = tpm.delta_UT(tpm.gcal2j(2010, 1, 1)) # DUT for mid-day.\r\n >>> utc = slalib.sla_caldj(2010, 1, 1)[0] + 0.5 # mid-day.\r\n >>> tt = slalib.sla_dtt(utc) / 86400.0 + utc\r\n\r\n >>> r, d = slalib.sla_map(ra_j2000, dec_j2000, 0, 0, 0, 0.0, 2000.0,\r\n ...: tt)\r\n\r\n >>> lon = tpm.d2r(-111.598333)\r\n >>> lat = tpm.d2r(31.956389)\r\n\r\n >>> az, zd, ha, dec, ra = slalib.sla_aop(r, d, utc, dut, lon, lat,\r\n ...: 2093.093, 0, 0, 273.15, 1013.25, 0, 0.550, 0.0065)\r\n\r\n >>> tpm.r2d(tpm.r2r(az)), tpm.r2d(tpm.r2r(zd))\r\n 133.498195532 22.0162383595\r\n\r\nThe hour angle, declination and right ascension are::\r\n\r\n >>> print tpm.r2d(tpm.r2r(ha))\r\n 343.586827289\r\n >>> print tpm.r2d(tpm.r2r(dec))\r\n 15.7683143606\r\n >>> print tpm.r2d(tpm.r2r(ra))\r\n 185.855680678\r\n\r\nConsult the appropriate section of the PyTPM documentation for a\r\ndetailed comparison between PyTPM and SLALIB.\r\n\r\nConverting positions and velocities\r\n-----------------------------------\r\n\r\nConverting positions and velocities follow exactly the same procedure\r\nas the examples shown above. The `convert.cat2v6` function will take\r\nproper motions, radial velocity and parallax in addition to\r\nposition. The returned dictionary will have appropriate fields for\r\nfinal proper motions, radial velocity and parallax.\r\n\r\nSee the file `doc/examples/conversions.py` for a full example. The file\r\nis also included with the HTML documentation and with the source\r\ndistribution. \r\n\r\nFor example if `tab` is a table that contains full 6-D coordinates with\r\nkeys `ra`, `dec`, `pma`, `pmd`, `px` and `rv`, then a full `V6C` vector\r\ncan be constructed as::\r\n\r\n >>> v6 = convert.cat2v6(tab['ra'], tab['dec'], tab['pma'],\r\n ...: tab['pmd'], tab['px'], rv, tpm.CJ)\r\n\r\nSee docstring of the `convert.convertv6` function for the required units\r\nfor each of these.\r\n\r\nTo convert this from, say FK5 to Ecliptic, at the same epoch, we can\r\nuse::\r\n\r\n >>> v6o = convert.convertv6(v6, s1=6, s2=3)\r\n >>> cat = convert.v62cat(v6o)\r\n\r\nThe variable `cat` will contain a dictionary, or a list of\r\ndictionaries, with the relevant catalog quantities. See the docstring\r\nof this `convert.v62cat` for units of output quantities.\r\n\r\n\r\nCredits and license\r\n===================\r\n\r\n`Jeffrey W Percival`_ wrote the TPM__ C library. See\r\n`src/tpm/TPM_LICENSE.txt` for TPM license.\r\n\r\nThe version used here was obtained from the coords_ package (version\r\n0.36) of the astrolib_ library. Some C source files missing from the\r\nabove source were provided by Jeff Percival.\r\n\r\nPython and Cython code for PyTPM is released under the BSD license; see\r\n`LICENSE.txt`.\r\n\r\nPlease send email to *prasanthhn*, at the *gmail.com* domain, for\r\nreporting errors, and for comments and suggestions.\r\n\r\n__ `Telescope Pointing Machine`_\r\n\r\n.. LocalWords: pyslalib SLALIB sla caldj utc tstate TPM PyTPM pytpm tpm WIYN\r\n.. LocalWords: numpydoc GCC virtualenvwrapper virtualenv LocalWords ReST\r\n.. LocalWords: docstring", "description_content_type": null, "docs_url": "https://pythonhosted.org/PyTPM/", "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/phn/pytpm", "keywords": "", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "PyTPM", "package_url": "https://pypi.org/project/PyTPM/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/PyTPM/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/phn/pytpm" }, "release_url": "https://pypi.org/project/PyTPM/0.7.1/", "requires_dist": null, "requires_python": null, "summary": "Python interface to Telescope Pointing Machine C library.", "version": "0.7.1" }, "last_serial": 785380, "releases": { "0.7": [ { "comment_text": "", "digests": { "md5": "d017ac2bd78719674e927c537c3f6c61", "sha256": "ca7246f85fd53a79f2d1166b76affde6db4ff36dfcbf40714e627527194bbbf1" }, "downloads": -1, "filename": "PyTPM-0.7.tar.gz", "has_sig": false, "md5_digest": "d017ac2bd78719674e927c537c3f6c61", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1706074, "upload_time": "2011-08-28T11:44:59", "url": "https://files.pythonhosted.org/packages/0b/f8/12e4a15ed8470510b324f254d0402b6c4b41600fedb199022b9353ccb0d1/PyTPM-0.7.tar.gz" } ], "0.7.1": [ { "comment_text": "", "digests": { "md5": "99a6fb3e56fcadcad3a1f60865c11071", "sha256": "37c1082482f0a338583d77932faf0b1ddee9aa19643a8c189890912759b82279" }, "downloads": -1, "filename": "PyTPM-0.7.1.tar.gz", "has_sig": false, "md5_digest": "99a6fb3e56fcadcad3a1f60865c11071", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1696540, "upload_time": "2012-02-02T14:57:49", "url": "https://files.pythonhosted.org/packages/9e/d4/8a0284d9042989e64cf85188fffc458309556d43cba1a10d09bf3ff3d4aa/PyTPM-0.7.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "99a6fb3e56fcadcad3a1f60865c11071", "sha256": "37c1082482f0a338583d77932faf0b1ddee9aa19643a8c189890912759b82279" }, "downloads": -1, "filename": "PyTPM-0.7.1.tar.gz", "has_sig": false, "md5_digest": "99a6fb3e56fcadcad3a1f60865c11071", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1696540, "upload_time": "2012-02-02T14:57:49", "url": "https://files.pythonhosted.org/packages/9e/d4/8a0284d9042989e64cf85188fffc458309556d43cba1a10d09bf3ff3d4aa/PyTPM-0.7.1.tar.gz" } ] }