Skip to content

Commit

Permalink
Merge pull request #6 from mattpitkin/dev
Browse files Browse the repository at this point in the history
Moved Pulsar/Pulsars class to submodule
  • Loading branch information
mattpitkin authored Nov 22, 2017
2 parents e528e1f + a12b366 commit 18d5ba9
Show file tree
Hide file tree
Showing 6 changed files with 581 additions and 172 deletions.
7 changes: 4 additions & 3 deletions psrqpy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

""" A Python tool for interacting with the ATNF pulsar catalogue """

__version__ = "0.1.2"
__version__ = "0.2.1"

from .search import QueryATNF, Pulsar
from .utils import *
from .search import QueryATNF
from .pulsar import Pulsar, Pulsars
from .utils import *
16 changes: 8 additions & 8 deletions psrqpy/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
ATNF_BASE_URL = r'http://www.atnf.csiro.au/people/pulsar/psrcat/'
ATNF_URL = ATNF_BASE_URL + r'proc_form.php?version={version}'

PARAMS_QUERY = '{params}'
USERDEFINED_QUERY = '&startUserDefined=true&c1_val=&c2_val=&c3_val=&c4_val='
CONDITION_QUERY = '&condition={condition}'
PSRNAMES_QUERY = '&pulsar_names={psrnames}'
SORT_QUERY = '&sort_attr={sortattr}&sort_order={sortorder}'
EPHEMERIS_QUERY = '&submit_ephemeris={getephemeris}'
QUERY_FLUFF = '&ephemeris=long&coords_unit=raj%2Fdecj&radius=&coords_1=&coords_2=&style=Long+with+errors&no_value=*&nohead=nohead&state=query&table_bottom.x=30&table_bottom.y=22'
PARAMS_QUERY = r'{params}'
USERDEFINED_QUERY = r'&startUserDefined=true&c1_val=&c2_val=&c3_val=&c4_val='
CONDITION_QUERY = r'&condition={condition}'
PSRNAMES_QUERY = r'&pulsar_names={psrnames}'
SORT_QUERY = r'&sort_attr={sortattr}&sort_order={sortorder}'
EPHEMERIS_QUERY = r'&submit_ephemeris={getephemeris}'
QUERY_FLUFF = r'&ephemeris=long&coords_unit=raj%2Fdecj&radius=&coords_1=&coords_2=&style=Long+with+errors&no_value=*&nohead=nohead&state=query&table_bottom.x=30&table_bottom.y=22'

QUERY_URL = ATNF_URL + PARAMS_QUERY + USERDEFINED_QUERY + SORT_QUERY + CONDITION_QUERY + PSRNAMES_QUERY + EPHEMERIS_QUERY + QUERY_FLUFF

Expand All @@ -33,7 +33,7 @@
'PMRA': {'ref': True, 'err': True, 'units': 'mas/yr', 'format': 'f8'}, # Proper motion in the right ascension direction (mas/yr)
'PMDEC': {'ref': True, 'err': True, 'units': 'mas/yr', 'format': 'f8'}, # Proper motion in declination (mas/yr)
'PX': {'ref': True, 'err': True, 'units': 'mas', 'format': 'f8'}, # Annual parallax (mas)
'POSEPOCH': {'ref': True, 'err': False, 'units': 'd', 'format': 'f8'}, # Epoch of position, defaults to PEpoch (MJD)
'POSEPOCH': {'ref': True, 'err': False, 'units': 'd', 'format': 'f8'}, # Epoch of position, defaults to PEpoch (MJD)
'ELONG': {'ref': True, 'err': True, 'units': 'deg', 'format': 'f8'}, # Ecliptic longitude (degrees)
'ELAT': {'ref': True, 'err': True, 'units': 'deg', 'format': 'f8'}, # Ecliptic latitude (degrees)
'PMELONG': {'ref': True, 'err': True, 'units': 'mas/yr', 'format': 'f8'}, # Proper motion in the ecliptic longitude direction (mas/yr)
Expand Down
Loading

0 comments on commit 18d5ba9

Please sign in to comment.