lbl-anp / becquerel

Becquerel is a Python package for analyzing nuclear spectroscopic measurements.
Other
44 stars 16 forks source link

Let date be a date, not just datetime; also default _at() methods to now() #235

Closed jvavrek closed 3 years ago

jvavrek commented 3 years ago

Closes #226

cosama commented 3 years ago

Looks good to me. Might make sense to add a test for the datetime.date thing.

Also there is this test: https://github.com/lbl-anp/becquerel/blob/update-date/tests/isotope_qty_test.py#L249. We could add no argument to it.

Looking at that I realized that there is a *_now method as well. Maybe can deprecate that and simplify the interface by defaulting to now with the *_at methods. @markbandstra Any thoughts?

jvavrek commented 3 years ago

@cosama this should be good to go:

cosama commented 3 years ago

just realize there is only ref_atoms but no ref_bq or other units. Probably worth adding that? Here or new one? Maybe a ref_quantity as well?

jvavrek commented 3 years ago

just realize there is only ref_atoms but no ref_bq or other units. Probably worth adding that? Here or new one? Maybe a ref_quantity as well?

The ref_atoms docstring says:

Access the reference atoms directly (for backwards compatibility)

so I assume that self._ref_quantities is the preferred way.