NScat - a python package to query neutron star parameters from publicly available databases.

This python package is used for querying neutron star parameters from various publicly available databases. One of the databases we are queying right now is the McGill magnetar catalog (Olausen & Kaspi, 2014), and please refer to the URL (http://www.physics.mcgill.ca/~pulsar/magnetar/main.html).

While using the catalog from the specified URL, the user neither has an option to search directly nor can search by specifying any conditions on the parameters of magnetars.

This package attempts to solve this problem. It provides a python interface to the user to query the McGill Magnetar Catalog and will provide for several databases in the future.

It is neither affiliated nor endorsed by the Magnetar group at McGill University or any other group and university.

Comments and suggestions are welcome. This package is under development.

Please feel free to contact Rohit Chinchwadkar (chinchwadkarrohit4@gmail.com) for feedback and suggestions.

Installation

The package is pip installable and can be installed using the code given below This command can be run on the Ananconda prompt on Windows and the Linux terminal for Linux users. The can package can installed using:

``pip install NScat``

Requirements

The requirements for installing the code are:

  • requests

  • pandas

  • numpy

  • io

  • matplotlib

  • rich

Examples

Downloading the full database can be simply achieved via

>>> from NScat import query
>>> mag = query.mag1()

The package will display the names, spin periods and magnetic fields of these magnetars and ask the user to give an input for querying single or multiple parameters. Type ‘s’ for single and ‘m’ for multiple. You will be able to see a list of parameters that can be queried in this package.

_images/intro1.png

The parameters that can be queried are:

_images/params.png

For single input:

_images/input_single_1.png

For multiple inputs:

_images/mul_input_1.png

For saving the queried table as a CSV file, the user will be asked to type ‘y’ or ‘n’ in case he wants to save it, ifv given ‘y’ then another input needs to be given by specifying the <filename>.csv

_images/csv_save_1.png

If you want to save the table as a csv file, please write the <filename>.csv

_images/save_csv1.png

The user can also qyery the P-B plot and P-Pdot plot for these magnetars.

_images/asking_plots.png

The plots after querying

_images/plots.png