-
Notifications
You must be signed in to change notification settings - Fork 67
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
Modifications to the Pulsar class #365
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #365 +/- ##
==========================================
+ Coverage 86.74% 86.99% +0.24%
==========================================
Files 13 13
Lines 3115 3144 +29
==========================================
+ Hits 2702 2735 +33
+ Misses 413 409 -4
Continue to review full report in Codecov by Sentry.
|
@vhaasteren does storing the string data change the memory requirement for the object significantly? |
Significantly is a relative term. The tim files for some pulsars are several MB in size. Must be around 20MB for the largest pulsars in the IPTA? I didn't even think about it, but I suppose for an entire PTA it could add up. Currently, it's stored if we set |
This PR does not add any new functionality or change any functionality. Instead, it slightly refactors the Pulsar class in a way that makes it easier to create derived classes without code replications.
Modifications:
PintPulsar
andTempo2Pulsar
classes now have attributesdrop_not_picklable
, which initially was implemented in the base class.Pulsar
is attempted to be used inside of a try blockThese modifications allow, for instance, for the
h5pulsar
package to be used as a drop-in replacement instead of the base Enterprise pulsar classes. Theh5pulsar
derives it's pulsar classes from Enterprise without code duplication. The modifications in this PR are completely independent from that package though, and simply make the code more modular.