Coder Social home page Coder Social logo

nickswainston / pulsar_spectra Goto Github PK

View Code? Open in Web Editor NEW
15.0 15.0 12.0 8.07 MB

A simple interface to record pulsar's flux density measurements for a large number of papers and perform fitting of spectral models.

Home Page: https://pulsar-spectra.readthedocs.io

License: MIT License

Python 99.88% Dockerfile 0.12%

pulsar_spectra's People

Contributors

cplee1 avatar mengyaoxue avatar nickswainston avatar robotopia avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

pulsar_spectra's Issues

Incorrect ATNF data

The following is a list of publications where we have found incorrect ATNF data. We are using this as notes so we cant notify ATNF with a single email.

  • Bell_2016: their flux errors are an order of magnitude too small
  • Zhao_2019: found an error in a data point for J0953+0755 and J0835-4510. It looks like they input the average value, but it was off by an order of magnitude.
  • Mignani_2017: Off by three orders of magnitude as the paper records flux in micro Jy

Appear to be adjusted for the ATNF frequencies based on their spectral index

  • Stovall_2015
  • Lorimer_1995

ATNF label

Make documentation to explain what seeing the ATNF label in references means and why it is inaccurate and needs to be fixed.

KeyError: 'gac+20'

I am trying to make plots for my pulsars sample, BUT just tried simple example (mentioned in documentation) and experiencing following error

"KeyError: 'gac+20'"

I tried to fix the problem by running following command line as suggested in FAQS in documentation.

''import psrqpy
psrqpy.get_references(updaterefcache=True)
psrqpy.QueryATNF(checkupdate=True)''

BUT nothing seems to be work.
Any suggestions?

Reference frequency calculation

The reference frequency used in the models is currently constant at v=1.3 GHz for an unknown reason. To test how this affects the model fits, this should be instead calculated at the centre frequency of the frequency range of a particular fit.

Improve Bandwidth docs

The following docs must be updated to fully explain the changes made in #56

  • Update the doc strings in models.py to explain the new functions (integration and Taylor models)
  • Improve the explanations in the derivations, so they are clear
  • Add links between the functions and the derivations so it's clear where they're used in the code
  • Make an example of how to output which functions are being used in model_settings
  • Add an explanation of bandwidth integration
  • Explain the xerrorbars are the bandwidth, not a frequency uncertainty
  • Explain when the bandwidth correction is not used, eg when there is ANTF data

Remember to let the other know once you begin working on a task so we don't both work on the same thing.

Implement method of including censored data in the model fit

Some papers include lower or upper limits on flux density measurements. This is an example of upper limits on a Jankowski 2018 plot. He plotted them but did not include them in the fit.
censored_example

At some point, it may be useful to implement an option to include censored data in the fit using a statistical method such as the Tobit model. Alternatively, or perhaps as well, we could implement a feature to plot the data (with arrows indicating limits) whilst not including them in the fit, as seen in papers like Jankowski et al and Bilous et al.

Papers with censored data:

Useful Links:

Report the peak frequency of log-parabolic spectra

The peak frequency of an LPS spectrum is not a fit parameter, however it is a useful value to know and to cite in a paper. It is calculated easily using the formula for the peak of a quadratic. We could report it separately to the fit parameters (perhaps in a dictionary alongside other values such as the AIC and p_best)

Remove redundant fluxes

Sometimes we have fluxes from papers that are also in ANTF so we should remove the redundant ANTF fluxes

Paper names

These papers need their publication years changed:

  • Xue 2017 -> Xue 2018
  • van Ommen 1994 2000 -> van Ommen 1997

Include more publications in the database

Our database lacks publications focusing on MSPs, high frequency measurements, and northern-sky pulsars. Here we are keeping a list of publications which may be useful additions to the database.

Flags:

  • MSPs: *
  • Northern-sky: ^
  • Southern-sky: v
  • Low-frequencies: L
  • High-frequencies: H

List of publications:

Model fit uncertainties

The uncertainties on the model parameters are calculated from the covariance matrix, which assumes that the likelihood is symmetric (i.e. normally distributed) around the best-fit value. This method can lead to underestimated and inaccurate uncertainties.

A more robust method would be to use a Markov Chain Monte Carlo (MCMC) algorithm to sample the probability distributions of the model parameters. It would be beneficial to implement this as an option in the software, although the higher computational cost warrants having option to not use it as well.

Implement an option to fit a double broken power-law

We currently have a working double BPL model. However, due to the lack of information available in the literature, this model has been excluded for now. It would be useful to have an option to fit the double BPL.

The Vela pulsar is a perfect example of a pulsar that may potentially be a double BPL. Here is an example fit:
j0835-4510_double_broken_power_law_fit

Another fit using pulsar_spectra:
double_BPL_second_example

The double BPL was fit in Bilous et al (2016; https://ui.adsabs.harvard.edu/abs/2016A%26A...591A.134B/abstract). See, for example, this plot:
bilous_example_double_BPL

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.