-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add MockPulsar class, for easy use of Mock data with Enterprise #361
base: dev
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #361 +/- ##
==========================================
+ Coverage 71.53% 73.31% +1.77%
==========================================
Files 13 13
Lines 3246 3391 +145
==========================================
+ Hits 2322 2486 +164
+ Misses 924 905 -19
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
This adds a very rudimentary MockPulsar class: a class that can be easily instantiated without a timing package (PINT/Tempo2). All Enterprise models can be run on this type of pulsar object, but it can be instantiated from mock data very quickly. This is useful for anyone who wants to use Enterprise on fake data. Previously, one had to rely on fake par/tim files, created through libstempo.toasim or otherwise.
Note: this is coded up as part of Enterprise, and not Enterprise_extensions, because the pulsar class is essential for usage of Enterprise. Allowing Enterprise to be useful without a timing package was a big plus, but with libstempo/PINT optional I guess that's less of an advantage now
Todo:
Additional todo, perhaps not part of this PR:
As in the test suite, a typical way to add this pulsar is:
This pulsar now has
psr.name == 'J1855+0939'
, and the design matrix contains astrometry and spin models (so 8 parameters). Residuals can be set with:This pulsar is extremely fast to make, and can be combined with most Enterprise functionality. Astrometry parameters depend on Astropy (optional dependency).