diff --git a/.gitignore b/.gitignore index ec38f9044ce9200369197068d6e9e1478e65b4b5..d502502ed47712fd1921ee7b7536aab81105d8a8 100644 --- a/.gitignore +++ b/.gitignore @@ -9,8 +9,8 @@ __pycache__/ # Jupyter Notebook checkpoints .ipynb_checkpoints -# Matplotlib plot images -*.png +# Output folder +output/* # Data files *.csv diff --git a/README.md b/README.md index c4595954ccdb4a376d1200c579745a692772f11b..6170acfb58104d3083ad79b3d60f91933e9124bd 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,8 @@ pip install -r requirements.txt to install all the required python packages (best in a new python virtual environment) ## Usage -Create/modify Main_example.py: +Create/modify Example.py: ``` -python Main_example.py +python user/Example.py +python user/ExampleTransients.py ``` \ No newline at end of file diff --git a/lightsimtastic_logo.png b/etc/lightsimtastic_logo.png similarity index 100% rename from lightsimtastic_logo.png rename to etc/lightsimtastic_logo.png diff --git a/Example.py b/user/Example.py similarity index 95% rename from Example.py rename to user/Example.py index 69f0d7ca4f5ded82f809c259eeaa8b3b6952c384..8503da8df383c4f3ce5e5510206a4fbfc9947332 100644 --- a/Example.py +++ b/user/Example.py @@ -1,3 +1,6 @@ +import sys +import os +sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) from LightSimtastic import SiPMSimulation import matplotlib.pyplot as plt import numpy as np @@ -89,5 +92,4 @@ plt.yscale("log") plt.xticks(fontsize=25) plt.yticks(fontsize=25) plt.xlabel("# GD", fontsize=25), -plt.savefig("./Example.png") - +plt.savefig("./output/Example.png") diff --git a/ExampleTransients.py b/user/ExampleTransients.py similarity index 96% rename from ExampleTransients.py rename to user/ExampleTransients.py index d6b940cf2b5f903731e669646f4a9b0c72dbd7fd..9946ab9f09a3f201683d88a6aae38baeb487d47f 100644 --- a/ExampleTransients.py +++ b/user/ExampleTransients.py @@ -1,3 +1,6 @@ +import sys +import os +sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) from LightSimtastic import SiPMSimulation import matplotlib.pyplot as plt import numpy as np @@ -126,5 +129,4 @@ plt.yscale("log") plt.xticks(fontsize=25) plt.yticks(fontsize=25) plt.xlabel("# GD", fontsize=25), -plt.savefig("./Example.png") - +plt.savefig("./output/ExampleTransients.png") diff --git a/Main_example_2.py b/user/Main_example_2.py similarity index 96% rename from Main_example_2.py rename to user/Main_example_2.py index 1c7e9a6cb359581691bc066be7f1aba4998b6b46..c624c1e38198a8de11403b64d50505320b19d1dc 100644 --- a/Main_example_2.py +++ b/user/Main_example_2.py @@ -1,3 +1,7 @@ +import sys +import os +sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) + from LightSimtastic import SiPMSimulation import matplotlib.pyplot as plt import numpy as np @@ -126,5 +130,4 @@ plt.yscale("log") plt.xticks(fontsize=25) plt.yticks(fontsize=25) plt.xlabel("# GD", fontsize=25), -plt.savefig("./Example.png") - +plt.savefig("./output/Example.png")