Skip to content
Snippets Groups Projects
Commit 3b4be621 authored by David Hendriks's avatar David Hendriks
Browse files

testing things with the MC sampling

parent f83c20c7
No related branches found
No related tags found
No related merge requests found
""" """
Main script to provide the Monte-Carlo sampling class extensions Main script to provide the Monte-Carlo sampling class extensions
TODO: some of the parameters that we use to sample require previous parameters. We need to set up a method to include making CDFs for those:
TODO: rename the GridVariable to SamplingVariable
TODO: add a property of 'parameter_dependence' which holds a list of other parameters that the current samplingVariable needs to calculate their cdf from
TODO: build CDFS in a nested dict fashing where the parameter the current parameter depends on are stored in some binned way s.t. we can can access the CDFs
""" """
import datetime import datetime
...@@ -1088,11 +1083,19 @@ class monte_carlo_sampling: ...@@ -1088,11 +1083,19 @@ class monte_carlo_sampling:
Function to get the generator for the source_file sampling method. Called by _get_generator and used in the actual evolution loop. Function to get the generator for the source_file sampling method. Called by _get_generator and used in the actual evolution loop.
""" """
# Write monte_carlo generator # Write the sampling functions file
self._monte_carlo_sampling_write_generator() self._monte_carlo_sampling_write_sampling_functions_file()
# Load the sampling functions
self._monte_carlo_sampling_load_sampling_functions_file()
# Write generator file
self._monte_carlo_sampling_write_generator_file()
# Load generator # Load generator
self._monte_carlo_sampling_load_generator() self._monte_carlo_sampling_load_generator()
# Get generator file
generator = self.grid_options["_monte_carlo_sampling_generator"]( generator = self.grid_options["_monte_carlo_sampling_generator"](
self, print_results=False self, print_results=False
) )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment