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

Final numba PR #1285

Merged
Merged

Conversation

arjunsavel
Copy link
Contributor

Description

Added abilities to disable line and electron scattering, fixed doppler calculation bug, enabled scatter line interaction.

Motivation and Context

How Has This Been Tested?

Runs locally, but still has deviations from the C code.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • [] Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have assigned/requested two reviewers for this pull request.

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

Review Jupyter notebook visual diffs & provide feedback on notebooks.


Powered by ReviewNB

@wkerzendorf wkerzendorf merged commit 5d6b790 into tardis-sn:numba_montecarlo Sep 2, 2020
atharva-2001 pushed a commit to atharva-2001/tardis that referenced this pull request Oct 1, 2021
* Add montecarlo_seed value to global module

* Add user-input seed to each seed setting

* Make sure montecarlo_seed for global module is set during configuration

* Include packet_seeds within montecarlo_configuration module

* Initialize packet seeds

* Set user seed before instantiating *any* random process!

* Pass packet seeds to montecarlo_main_loop; use said seeds

* Bring rpacket creation outside of if/else

* Initialize seeds within initialize_packets

* Set mu and nu sampling on a per-seed basis

* Use single_packet_seed to index existing packet_seeds array

* Perform packet-by-packet creation of trajectories, nu in packet_source

* Try initializing xis outside of blackbody function

* Remove print statements

* Do not concatenate arrays in packet_source running; add njit

* Name create_array more explicitly

* Make montecarlo seeds attributes of r_packet

* Add rationale for size of random array

* Clean up documentation of blackbody sampling

* Remove extraneous numba import

* Remove extra kwarg in basepacket create_packets

* Add packet_source docstrings

* Justify and change MAX_SEED_VAL

* Refactor packet_source so that all packet properties are made in the same func

* Attach seed to r_packet

* Clean up create_packets func

* Clean up docstrings for packet_source

* @jitclass BlackBodySimpleSource

* Ensure that the iteration is added to the seed each time montecarlorunner is run

* jitclass uniform packets

* Pass iteration to montecarlorunner

* Remove njit from uniform packet energies

* Provide a better-motivated upper bound for the seed value

* Use random.sample instead of np.random.randint to prevent possible repetitions

* Raise more explicit error if too many packets

* Set seed of random module before calling random.sample

* Address merge error in montecarlo_main_loop

* Clarify ValueError for seeds

* Do not generate packet properties on a seed-by-seed basis

* Remove seeds from create_packets function call

* use new random number generator to make packet seeds

* Bump numpy version to 1.19.0

* Pass rng to packet source functions for randomness

* actually define rng in montecarlo/base

* Delete error raised for too many packets

* Allow packet seeds to overlap

* Remove random module import

* Clarify C comparison

* Include numba comparison plots

* Add Testing TARDIS section to docs

* Make sure custom packet source works

* Add disabling to yml file

* Make changes to mc_config_module when necessary

* Add scatter-disabling functionality to global module

* Set tau_sobolev to 0 in plasma setting

* Add rudimentary last_interaction_type

* Address combined > event for tau_trace

* reference module for sigma_thomson

* Explicitly pass sigma_thomson

* Only reset nu for e-scatter

* Split thomson_scatter and line_scatter entirely

* check doppler factor

* Account for interaction type

* Do not hardcode the array size anymore

* Remove extra commented statments

* Remove reference to flag
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants