<jupyter_start><jupyter_text>Make a test directory to do your work in<jupyter_code>!mkdir test<jupyter_output><empty_output><jupyter_text>Import some of the modules<jupyter_code>from BurstCube.simGenerator import configurator
from BurstCube.bcSim import simFiles
from BurstCube.plotSim import plotAeff
from os import path<jupyter_output><empty_output><jupyter_text>Start with a premade config file that should be in the repository<jupyter_code>filename = path.expandvars("$BURSTCUBE/Simulation/MEGAlib/test/config.yaml")
conf = configurator(filename)<jupyter_output><empty_output><jupyter_text>Modify and save it so the output goes in the test folder you made.<jupyter_code>conf.config['run']['simdir'] = '$BURSTCUBE/Simulation/Notebooks/test/'
conf.config['run']['srcdir'] = '$BURSTCUBE/Simulation/Notebooks/test/'
conf.saveConfig('test/config.yaml')<jupyter_output><empty_output><jupyter_text>Make the source files for cosima<jupyter_code>conf.createSourceFiles()<jupyter_output><empty_output><jupyter_text>Now, execute the runSims.py program:`> cd test``> python $BURSTCUBE/Simulation/MEGAlib/bin/runSims.py --runCosima true --sourcePath $BURSTCUBE/Simulation/Notebooks/test/ 4` Load in the sim files you just created.<jupyter_code>sfs = simFiles('test/config.yaml')<jupyter_output>Loading $BURSTCUBE/Simulation/Notebooks/test//test_100.000keV_0.00ze_0.00az.inc1.id1.sim
Loading $BURSTCUBE/Simulation/Notebooks/test//test_173.205keV_0.00ze_0.00az.inc1.id1.sim
Loading $BURSTCUBE/Simulation/Notebooks/test//test_300.000keV_0.00ze_0.00az.inc1.id1.sim
Loading $BURSTCUBE/Simulation/Notebooks/test//test_100.000keV_0.00ze_30.00az.inc1.id1.sim
Loading $BURSTCUBE/Simulation/Notebooks/test//test_173.205keV_0.00ze_30.00az.inc1.id1.sim
Loading $BURSTCUBE/Simulation/Notebooks/test//test_300.000keV_0.00ze_30.00az.inc1.id1.sim
Loading $BURSTCUBE/Simulation/Notebooks/test//test_100.000keV_0.00ze_60.00az.inc1.id1.sim
Loading $BURSTCUBE/Simulation/Notebooks/test//test_173.205keV_0.00ze_60.00az.inc1.id1.sim
Loading $BURSTCUBE/Simulation/Notebooks/test//test_300.000keV_0.00ze_60.00az.inc1.id1.sim
Loading $BURSTCUBE/Simulation/Notebooks/test//test_100.000keV_30.00ze_0.00az.inc1.id1.sim
Loading $BURSTCUBE/Simulation/Notebooks/test//test_173.205keV_30.00ze_0.00az.inc1.id1.sim
Loading $BURS[...]<jupyter_text>Now you can plot things.  You can add the GBM NaI curve to the plots as well.<jupyter_code>plotAeff(sfs, plotGBM=True)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12071778140293637, 'fraction_numerical': 0.0664763458401305, 'mean_word_length': 7.176666666666667, 'pattern_counts': {'":': 0, '<': 28, '<?xml version=': 0, '>': 30, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '7', 'dir': 'jupyter-structured-clean-dedup', 'id': '298379', 'license': 'MIT', 'n_tokens_mistral': 1090, 'n_tokens_neox': 951, 'n_words': 127, 'path': 'Notebooks/Simulation_Example.ipynb', 'repo_name': 'BurstCube/Simulation', 'size': '2452'}