Skip to content
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

Isotopes notebook has errors #325

Closed
jaromrax opened this issue Mar 28, 2022 · 6 comments
Closed

Isotopes notebook has errors #325

jaromrax opened this issue Mar 28, 2022 · 6 comments

Comments

@jaromrax
Copy link

jaromrax commented Mar 28, 2022

Comment 1

activated_qty = IsotopeQuantity(iso2, date='2017-05-01', bq=103.2)
na23_qty = ni.activate(barns, initial=iso, activated=activated_qty)

gives nan g

Comment 2

/home/ojr/.local/lib/python3.8/site-packages/becquerel/tools/isotope_qty.py:351: DeprecationWarning: bq_now() is deprecated and will be removed in a future release. Use bq_at(date=None) instead.

is shown many times....

Comment 3

/usr/local/lib/python3.8/dist-packages/ipykernel/ipkernel.py:283: DeprecationWarning: `should_run_async` will not call `transform_cell` automatically in the future. Please pass the result to `transformed_cell` argument and any exception that happen during thetransform in `preprocessing_exc_tuple` in IPython 7.17 and above.

appears also sometimes in different notebooks.

Comment 4

Also JSON from compendium may not be loaded with all materials...

@jccurtis
Copy link
Collaborator

Hi @jaromrax, thanks for the notes! I've added some sections to your description to improve our ability to address each one.

  1. Can you expand this to a MWE, i.e. what are the iso2, barns, iso and activated_qty vars?
  2. See Remove notebook calls to IsotopeQuantity.*_now methods and update docs #326, this will go in soon. Thanks for the head's up!
  3. I cannot find this text in any of our notebooks. I believe this was fixed here: Follow up DeprecationWarning Fix ipython/ipykernel#617. If you don't want to update ipykernel you can downgrade ipython to 7.10 as mentioned here: DeprecationWarning has unclear origin: should_run_async will not call transform_cell automatically in the future ipython/ipykernel#540 (comment). FYI if you are using a conda env (highly recommended) you can update this with conda update ipykernel jupyter.
  4. @markbandstra is this related to Latest Compendium materials JSON causes errors #324?

@markbandstra
Copy link
Member

Yes, I'm guessing comment 4 pertains to #324, and I hope to get in a fix soon.

@jccurtis
Copy link
Collaborator

Excellent, thanks @markbandstra!

@jvavrek
Copy link
Contributor

jvavrek commented Mar 28, 2022

Comment 1

activated_qty = IsotopeQuantity(iso2, date='2017-05-01', bq=103.2)
na23_qty = ni.activate(barns, initial=iso, activated=activated_qty)

gives nan g

Here iso and iso2 are Na-23 and Na-24, respectively. Na-23 is stable, so the division by self.decay_const (which is 0) produces the nan. @jccurtis @markbandstra I think there's a physics error in the example, not in the IsotopeQuantity code.

@jccurtis
Copy link
Collaborator

jccurtis commented Apr 1, 2022

@jvavrek thanks for the context. Totally makes sense. I think the comments have all been addressed.

@jaromrax let us know if these comments address the issues you have encountered. Thanks!

@jvavrek
Copy link
Contributor

jvavrek commented May 16, 2022

Closed by #339 #333 #326. @jaromrax please let us know if any problems persist by opening a new issue.

@jvavrek jvavrek closed this as completed May 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants