1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
|
%global _empty_manifest_terminate_build 0
Name: python-psrqpy
Version: 1.2.7
Release: 1
Summary: A Python module for querying the ATNF pulsar catalogue
License: MIT
URL: https://github.com/mattpitkin/psrqpy
Source0: https://mirrors.aliyun.com/pypi/web/packages/ec/50/14a3c3c99dc81dd942a490319b53882dc521e04855b9a7788dbce3f47e53/psrqpy-1.2.7.tar.gz
BuildArch: noarch
Requires: python3-ads
Requires: python3-appdirs
Requires: python3-astropy
Requires: python3-beautifulsoup4
Requires: python3-matplotlib
Requires: python3-numpy
Requires: python3-packaging
Requires: python3-pandas
Requires: python3-requests
Requires: python3-scipy
Requires: python3-autodoc
Requires: python3-recommonmark
Requires: python3-sphinx
Requires: python3-sphinx-rtd-theme
Requires: python3-pytest
Requires: python3-pytest-cov
Requires: python3-pytest-socket
%description
J0534+2200 29.946923 1e-06 -3.77535e-10 2e-15 05:34:31.973 0.005 +22:00:52.06 0.06
J0537-6910 62.0261895958 1.3e-09 -1.992272e-10 4e-17 05:37:47.416 0.11 -69:10:19.88 0.6
```
You can set [conditions](http://www.atnf.csiro.au/research/pulsar/psrcat/psrcat_help.html?type=normal#condition) for the searches,
e.g.:
```python
import psrqpy
q = psrqpy.QueryATNF(params=['Jname', 'f0'], condition='f0 > 100 && f0 < 200', assoc='GC')
```
where `assoc=GC` looks for all pulsars in globular clusters.
When a query is generated the entire catalogue is downloaded and stored in the `QueryATNF` object as
a pandas [`DataFrame`](https://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.html).
The query can therefore be re-used to access data on different parameters, different pulsars, or
using different conditions, without the need to re-download the catalogue. We may originally want
to query pulsar frequencies using only frequencies greater than 10 Hz, with
```python
import psrqpy
q = psrqpy.QueryATNF(params=['F0'], condition='F0 > 10')
freqs = q.table['F0']
```
Using the same `QueryATNF` object we could change to get frequency derivatives for pulsars
with frequencies less than 10 Hz, with
```python
q.condition = 'F0 < 10'
q.query_params = 'F1'
fdot = q.table['F1']
```
In these cases the whole catalogue (with no conditions applied and all available parameters) stored as a pandas [`DataFrame`](https://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.html)
is accessible with
```python
catalogue = q.catalogue
```
You can also [generate](http://psrqpy.readthedocs.io/en/latest/query.html#psrqpy.search.QueryATNF.ppdot) a
_lovely_ period vs. period derivative plot based on the latest catalogue information, using
just three lines of code, e.g.:
```python
from psrqpy import QueryATNF
query = QueryATNF(params=['P0', 'P1', 'ASSOC', 'BINARY', 'TYPE', 'P1_I'])
query.ppdot(showSNRs=True, showtypes='all')
```
gives

## Development and Support
Code development is done via the package's [GitHib repository](https://github.com/mattpitkin/psrqpy).
Any contributions can be made via a [fork and pull request](https://help.github.com/articles/creating-a-pull-request-from-a-fork/) model
from that repository, and must adhere to the [MIT license](#License). Any problems with the code
or support requests can be submitted via the repository's [Issue tracker](https://github.com/mattpitkin/psrqpy/issues).
## Test suite
There are tests supplied that cover many of the functions within PSRQpy. These can be run from the
base directory of the repository (after installing the [`pytest`](https://docs.pytest.org/en/latest/) and
[`pytest-socket`](https://pypi.org/project/pytest-socket/) modules, e.g., with `pip`) by just calling:
```bash
pytest
```
These tests are not included in the `pip` installed version of the code.
## Copyright and referencing for the catalogue
Regarding the use of the catalogue and software behind it, the [following statements](http://www.atnf.csiro.au/research/pulsar/psrcat/download.html) apply:
> PSRCAT 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. PSRCAT 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.
>
> PSRCAT makes use of "evaluateExpression: A Simple Expression Evaluator". Copyright © 1996 - 1999 Parsifal Software, All Rights Reserved.
>
> The programs and databases remain the property of the Australia Telescope National Facility, CSIRO, and are covered by the [CSIRO Legal Notice and Disclaimer](http://www.csiro.au/en/About/Footer/Legal-notice).
>
> If you make use of information from the ATNF Pulsar Catalogue in a publication, we would appreciate acknowledgement by reference to the publication "[The ATNF Pulsar Catalogue](http://adsabs.harvard.edu/abs/2005AJ....129.1993M)", R. N. Manchester, G. B. Hobbs, A. Teoh & M. Hobbs, Astronomical Journal, 129, 1993-2006 (2005) and by quoting the web address http://www.atnf.csiro.au/research/pulsar/psrcat for updated versions.
If making use of this code to access the catalogue, or produce plots, I would be grateful if (as well as citing the ATNF pulsar catalogue [paper](http://adsabs.harvard.edu/abs/2005AJ....129.1993M) and [URL](http://www.atnf.csiro.au/research/pulsar/psrcat) given above) you consider citing the [JOSS](http://joss.theoj.org/) [paper](https://doi.org/10.21105/joss.00538) for this software:
```tex
@article{psrqpy,
author = {{Pitkin}, M.},
title = "{psrqpy: a python interface for querying the ATNF pulsar catalogue}",
volume = 3,
number = 22,
pages = 538,
month = feb,
year = 2018,
journal = "{Journal of Open Source Software}",
doi = {10.21105/joss.00538},
url = {https://doi.org/10.21105/joss.00538}
}
```
## License
This code is licensed under the [MIT License](http://opensource.org/licenses/MIT).
© Matt Pitkin, 2017
[](https://badge.fury.io/py/psrqpy)
[](https://anaconda.org/conda-forge/psrqpy)
[](https://pypi.org/project/psrqpy/)
[](https://github.com/mattpitkin/psrqpy/actions?query=workflow%3Abuild)
[](https://codecov.io/gh/mattpitkin/psrqpy)
[](http://psrqpy.readthedocs.io/en/latest/?badge=latest)
[](http://joss.theoj.org/papers/711dc5566159f6e9f8ea5d07dbfaf5d2)
[](https://doi.org/10.5281/zenodo.1489692)
[](http://ascl.net/1812.017)
%package -n python3-psrqpy
Summary: A Python module for querying the ATNF pulsar catalogue
Provides: python-psrqpy
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-pip
%description -n python3-psrqpy
J0534+2200 29.946923 1e-06 -3.77535e-10 2e-15 05:34:31.973 0.005 +22:00:52.06 0.06
J0537-6910 62.0261895958 1.3e-09 -1.992272e-10 4e-17 05:37:47.416 0.11 -69:10:19.88 0.6
```
You can set [conditions](http://www.atnf.csiro.au/research/pulsar/psrcat/psrcat_help.html?type=normal#condition) for the searches,
e.g.:
```python
import psrqpy
q = psrqpy.QueryATNF(params=['Jname', 'f0'], condition='f0 > 100 && f0 < 200', assoc='GC')
```
where `assoc=GC` looks for all pulsars in globular clusters.
When a query is generated the entire catalogue is downloaded and stored in the `QueryATNF` object as
a pandas [`DataFrame`](https://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.html).
The query can therefore be re-used to access data on different parameters, different pulsars, or
using different conditions, without the need to re-download the catalogue. We may originally want
to query pulsar frequencies using only frequencies greater than 10 Hz, with
```python
import psrqpy
q = psrqpy.QueryATNF(params=['F0'], condition='F0 > 10')
freqs = q.table['F0']
```
Using the same `QueryATNF` object we could change to get frequency derivatives for pulsars
with frequencies less than 10 Hz, with
```python
q.condition = 'F0 < 10'
q.query_params = 'F1'
fdot = q.table['F1']
```
In these cases the whole catalogue (with no conditions applied and all available parameters) stored as a pandas [`DataFrame`](https://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.html)
is accessible with
```python
catalogue = q.catalogue
```
You can also [generate](http://psrqpy.readthedocs.io/en/latest/query.html#psrqpy.search.QueryATNF.ppdot) a
_lovely_ period vs. period derivative plot based on the latest catalogue information, using
just three lines of code, e.g.:
```python
from psrqpy import QueryATNF
query = QueryATNF(params=['P0', 'P1', 'ASSOC', 'BINARY', 'TYPE', 'P1_I'])
query.ppdot(showSNRs=True, showtypes='all')
```
gives

## Development and Support
Code development is done via the package's [GitHib repository](https://github.com/mattpitkin/psrqpy).
Any contributions can be made via a [fork and pull request](https://help.github.com/articles/creating-a-pull-request-from-a-fork/) model
from that repository, and must adhere to the [MIT license](#License). Any problems with the code
or support requests can be submitted via the repository's [Issue tracker](https://github.com/mattpitkin/psrqpy/issues).
## Test suite
There are tests supplied that cover many of the functions within PSRQpy. These can be run from the
base directory of the repository (after installing the [`pytest`](https://docs.pytest.org/en/latest/) and
[`pytest-socket`](https://pypi.org/project/pytest-socket/) modules, e.g., with `pip`) by just calling:
```bash
pytest
```
These tests are not included in the `pip` installed version of the code.
## Copyright and referencing for the catalogue
Regarding the use of the catalogue and software behind it, the [following statements](http://www.atnf.csiro.au/research/pulsar/psrcat/download.html) apply:
> PSRCAT 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. PSRCAT 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.
>
> PSRCAT makes use of "evaluateExpression: A Simple Expression Evaluator". Copyright © 1996 - 1999 Parsifal Software, All Rights Reserved.
>
> The programs and databases remain the property of the Australia Telescope National Facility, CSIRO, and are covered by the [CSIRO Legal Notice and Disclaimer](http://www.csiro.au/en/About/Footer/Legal-notice).
>
> If you make use of information from the ATNF Pulsar Catalogue in a publication, we would appreciate acknowledgement by reference to the publication "[The ATNF Pulsar Catalogue](http://adsabs.harvard.edu/abs/2005AJ....129.1993M)", R. N. Manchester, G. B. Hobbs, A. Teoh & M. Hobbs, Astronomical Journal, 129, 1993-2006 (2005) and by quoting the web address http://www.atnf.csiro.au/research/pulsar/psrcat for updated versions.
If making use of this code to access the catalogue, or produce plots, I would be grateful if (as well as citing the ATNF pulsar catalogue [paper](http://adsabs.harvard.edu/abs/2005AJ....129.1993M) and [URL](http://www.atnf.csiro.au/research/pulsar/psrcat) given above) you consider citing the [JOSS](http://joss.theoj.org/) [paper](https://doi.org/10.21105/joss.00538) for this software:
```tex
@article{psrqpy,
author = {{Pitkin}, M.},
title = "{psrqpy: a python interface for querying the ATNF pulsar catalogue}",
volume = 3,
number = 22,
pages = 538,
month = feb,
year = 2018,
journal = "{Journal of Open Source Software}",
doi = {10.21105/joss.00538},
url = {https://doi.org/10.21105/joss.00538}
}
```
## License
This code is licensed under the [MIT License](http://opensource.org/licenses/MIT).
© Matt Pitkin, 2017
[](https://badge.fury.io/py/psrqpy)
[](https://anaconda.org/conda-forge/psrqpy)
[](https://pypi.org/project/psrqpy/)
[](https://github.com/mattpitkin/psrqpy/actions?query=workflow%3Abuild)
[](https://codecov.io/gh/mattpitkin/psrqpy)
[](http://psrqpy.readthedocs.io/en/latest/?badge=latest)
[](http://joss.theoj.org/papers/711dc5566159f6e9f8ea5d07dbfaf5d2)
[](https://doi.org/10.5281/zenodo.1489692)
[](http://ascl.net/1812.017)
%package help
Summary: Development documents and examples for psrqpy
Provides: python3-psrqpy-doc
%description help
J0534+2200 29.946923 1e-06 -3.77535e-10 2e-15 05:34:31.973 0.005 +22:00:52.06 0.06
J0537-6910 62.0261895958 1.3e-09 -1.992272e-10 4e-17 05:37:47.416 0.11 -69:10:19.88 0.6
```
You can set [conditions](http://www.atnf.csiro.au/research/pulsar/psrcat/psrcat_help.html?type=normal#condition) for the searches,
e.g.:
```python
import psrqpy
q = psrqpy.QueryATNF(params=['Jname', 'f0'], condition='f0 > 100 && f0 < 200', assoc='GC')
```
where `assoc=GC` looks for all pulsars in globular clusters.
When a query is generated the entire catalogue is downloaded and stored in the `QueryATNF` object as
a pandas [`DataFrame`](https://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.html).
The query can therefore be re-used to access data on different parameters, different pulsars, or
using different conditions, without the need to re-download the catalogue. We may originally want
to query pulsar frequencies using only frequencies greater than 10 Hz, with
```python
import psrqpy
q = psrqpy.QueryATNF(params=['F0'], condition='F0 > 10')
freqs = q.table['F0']
```
Using the same `QueryATNF` object we could change to get frequency derivatives for pulsars
with frequencies less than 10 Hz, with
```python
q.condition = 'F0 < 10'
q.query_params = 'F1'
fdot = q.table['F1']
```
In these cases the whole catalogue (with no conditions applied and all available parameters) stored as a pandas [`DataFrame`](https://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.html)
is accessible with
```python
catalogue = q.catalogue
```
You can also [generate](http://psrqpy.readthedocs.io/en/latest/query.html#psrqpy.search.QueryATNF.ppdot) a
_lovely_ period vs. period derivative plot based on the latest catalogue information, using
just three lines of code, e.g.:
```python
from psrqpy import QueryATNF
query = QueryATNF(params=['P0', 'P1', 'ASSOC', 'BINARY', 'TYPE', 'P1_I'])
query.ppdot(showSNRs=True, showtypes='all')
```
gives

## Development and Support
Code development is done via the package's [GitHib repository](https://github.com/mattpitkin/psrqpy).
Any contributions can be made via a [fork and pull request](https://help.github.com/articles/creating-a-pull-request-from-a-fork/) model
from that repository, and must adhere to the [MIT license](#License). Any problems with the code
or support requests can be submitted via the repository's [Issue tracker](https://github.com/mattpitkin/psrqpy/issues).
## Test suite
There are tests supplied that cover many of the functions within PSRQpy. These can be run from the
base directory of the repository (after installing the [`pytest`](https://docs.pytest.org/en/latest/) and
[`pytest-socket`](https://pypi.org/project/pytest-socket/) modules, e.g., with `pip`) by just calling:
```bash
pytest
```
These tests are not included in the `pip` installed version of the code.
## Copyright and referencing for the catalogue
Regarding the use of the catalogue and software behind it, the [following statements](http://www.atnf.csiro.au/research/pulsar/psrcat/download.html) apply:
> PSRCAT 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. PSRCAT 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.
>
> PSRCAT makes use of "evaluateExpression: A Simple Expression Evaluator". Copyright © 1996 - 1999 Parsifal Software, All Rights Reserved.
>
> The programs and databases remain the property of the Australia Telescope National Facility, CSIRO, and are covered by the [CSIRO Legal Notice and Disclaimer](http://www.csiro.au/en/About/Footer/Legal-notice).
>
> If you make use of information from the ATNF Pulsar Catalogue in a publication, we would appreciate acknowledgement by reference to the publication "[The ATNF Pulsar Catalogue](http://adsabs.harvard.edu/abs/2005AJ....129.1993M)", R. N. Manchester, G. B. Hobbs, A. Teoh & M. Hobbs, Astronomical Journal, 129, 1993-2006 (2005) and by quoting the web address http://www.atnf.csiro.au/research/pulsar/psrcat for updated versions.
If making use of this code to access the catalogue, or produce plots, I would be grateful if (as well as citing the ATNF pulsar catalogue [paper](http://adsabs.harvard.edu/abs/2005AJ....129.1993M) and [URL](http://www.atnf.csiro.au/research/pulsar/psrcat) given above) you consider citing the [JOSS](http://joss.theoj.org/) [paper](https://doi.org/10.21105/joss.00538) for this software:
```tex
@article{psrqpy,
author = {{Pitkin}, M.},
title = "{psrqpy: a python interface for querying the ATNF pulsar catalogue}",
volume = 3,
number = 22,
pages = 538,
month = feb,
year = 2018,
journal = "{Journal of Open Source Software}",
doi = {10.21105/joss.00538},
url = {https://doi.org/10.21105/joss.00538}
}
```
## License
This code is licensed under the [MIT License](http://opensource.org/licenses/MIT).
© Matt Pitkin, 2017
[](https://badge.fury.io/py/psrqpy)
[](https://anaconda.org/conda-forge/psrqpy)
[](https://pypi.org/project/psrqpy/)
[](https://github.com/mattpitkin/psrqpy/actions?query=workflow%3Abuild)
[](https://codecov.io/gh/mattpitkin/psrqpy)
[](http://psrqpy.readthedocs.io/en/latest/?badge=latest)
[](http://joss.theoj.org/papers/711dc5566159f6e9f8ea5d07dbfaf5d2)
[](https://doi.org/10.5281/zenodo.1489692)
[](http://ascl.net/1812.017)
%prep
%autosetup -n psrqpy-1.2.7
%build
%py3_build
%install
%py3_install
install -d -m755 %{buildroot}/%{_pkgdocdir}
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
pushd %{buildroot}
if [ -d usr/lib ]; then
find usr/lib -type f -printf "\"/%h/%f\"\n" >> filelist.lst
fi
if [ -d usr/lib64 ]; then
find usr/lib64 -type f -printf "\"/%h/%f\"\n" >> filelist.lst
fi
if [ -d usr/bin ]; then
find usr/bin -type f -printf "\"/%h/%f\"\n" >> filelist.lst
fi
if [ -d usr/sbin ]; then
find usr/sbin -type f -printf "\"/%h/%f\"\n" >> filelist.lst
fi
touch doclist.lst
if [ -d usr/share/man ]; then
find usr/share/man -type f -printf "\"/%h/%f.gz\"\n" >> doclist.lst
fi
popd
mv %{buildroot}/filelist.lst .
mv %{buildroot}/doclist.lst .
%files -n python3-psrqpy -f filelist.lst
%dir %{python3_sitelib}/*
%files help -f doclist.lst
%{_docdir}/*
%changelog
* Thu Jun 08 2023 Python_Bot <Python_Bot@openeuler.org> - 1.2.7-1
- Package Spec generated
|