-
-
Notifications
You must be signed in to change notification settings - Fork 421
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
wkerzendorf
merged 68 commits into
tardis-sn:numba_montecarlo
from
arjunsavel:disable_scatterings
Sep 2, 2020
Merged
Final numba PR #1285
wkerzendorf
merged 68 commits into
tardis-sn:numba_montecarlo
from
arjunsavel:disable_scatterings
Sep 2, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…into add_input_seed
Check out this pull request on Review Jupyter notebook visual diffs & provide feedback on notebooks. Powered by ReviewNB |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Checklist: