A Python module for querying the ATNF pulsar catalogue
Project description
# PSRQpy
This module aims to provide a python interface for querying the [ATNF pulsar catalogue](http://www.atnf.csiro.au/people/pulsar/psrcat/).
It is inspired by, and has some minor similarities to, the [`ads`](https://ads.readthedocs.io) module for interfacing with the
[NASA ADS](https://ui.adsabs.harvard.edu/) [API](https://github.com/adsabs/adsabs-dev-api). It is an unofficial
package and is not endorsed or affiliated with the ATNF.
Any comments or suggestions are welcome.
## Installation
To install the code from source clone the git repository and run either:
```
python setup.py install --user
```
to install as a user, or
```
sudo python setup.py install --user
```
to install as root.
### Requirements
The requirements for installing the code are:
* `six`
* `requests`
* `beautifulsoup4`
* `numpy`
* `astropy`
* `datetime`
The `ads` module is an optional requirement that is needed to get ADS URLs for references.
## Example
A simple query of the catalogue, e.g., to just return all pulsar frequencies, would be:
```
import psrqpy
q = QueryATNF(params='F0')
# get frequencies as an astropy table
t = q.table()
print t['F0']
```
You can query multiply parameters, e.g.:
```
import psrqpy
q = QueryATNF(params=['F0', 'F1', 'RAJ', 'DecJ'])
# get values as an astropy table
t = q.table()
print t['F0']
```
You can query specific pulsars, e.g.:
```
import psrqpy
q = psrqpy.QueryATNF(params=['JName', 'F0', 'F1', 'RAJ', 'DecJ'], psrs=['J0534+2200', 'J0537-6910'])
# get values as an astropy table
t = q.table()
```
If you really want to query the catalogue many times in quick succession it is advisable not to use this module, as
it could result in too much load on the ATNF catalogue's server. Instead it is probably preferable to [download
the catalogue](http://www.atnf.csiro.au/research/pulsar/psrcat/download.html) and query it with the software
provided.
## License
This code is licensed under the [MIT License](http://opensource.org/licenses/MIT).
© Matt Pitkin, 2017
This module aims to provide a python interface for querying the [ATNF pulsar catalogue](http://www.atnf.csiro.au/people/pulsar/psrcat/).
It is inspired by, and has some minor similarities to, the [`ads`](https://ads.readthedocs.io) module for interfacing with the
[NASA ADS](https://ui.adsabs.harvard.edu/) [API](https://github.com/adsabs/adsabs-dev-api). It is an unofficial
package and is not endorsed or affiliated with the ATNF.
Any comments or suggestions are welcome.
## Installation
To install the code from source clone the git repository and run either:
```
python setup.py install --user
```
to install as a user, or
```
sudo python setup.py install --user
```
to install as root.
### Requirements
The requirements for installing the code are:
* `six`
* `requests`
* `beautifulsoup4`
* `numpy`
* `astropy`
* `datetime`
The `ads` module is an optional requirement that is needed to get ADS URLs for references.
## Example
A simple query of the catalogue, e.g., to just return all pulsar frequencies, would be:
```
import psrqpy
q = QueryATNF(params='F0')
# get frequencies as an astropy table
t = q.table()
print t['F0']
```
You can query multiply parameters, e.g.:
```
import psrqpy
q = QueryATNF(params=['F0', 'F1', 'RAJ', 'DecJ'])
# get values as an astropy table
t = q.table()
print t['F0']
```
You can query specific pulsars, e.g.:
```
import psrqpy
q = psrqpy.QueryATNF(params=['JName', 'F0', 'F1', 'RAJ', 'DecJ'], psrs=['J0534+2200', 'J0537-6910'])
# get values as an astropy table
t = q.table()
```
If you really want to query the catalogue many times in quick succession it is advisable not to use this module, as
it could result in too much load on the ATNF catalogue's server. Instead it is probably preferable to [download
the catalogue](http://www.atnf.csiro.au/research/pulsar/psrcat/download.html) and query it with the software
provided.
## License
This code is licensed under the [MIT License](http://opensource.org/licenses/MIT).
© Matt Pitkin, 2017
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
psrqpy-0.1.1.linux-x86_64.tar.gz
(19.8 kB
view hashes)
Built Distributions
psrqpy-0.1.1-py3-none-any.whl
(14.4 kB
view hashes)
psrqpy-0.1.1-py2.7.egg
(22.7 kB
view hashes)
psrqpy-0.1.1-py2-none-any.whl
(14.4 kB
view hashes)
Close
Hashes for psrqpy-0.1.1.linux-x86_64.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 74d64530307900a6a806aaa97061943d79e5747c6a2c737bef79dd0902be338b |
|
MD5 | 3d36984db724f6072d35d299ff5d630f |
|
BLAKE2b-256 | 39a013b43448b9337a7be44cb053f8994cf4712220d8f84fe7babf782828a549 |