commit f5cdfdda4b0d02fa88f505a35841edee52cedac3 Author: jupfi Date: Thu Aug 24 08:12:58 2023 +0200 Initial commit. diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..473acdf --- /dev/null +++ b/.gitignore @@ -0,0 +1,29 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.pyc +*$py.class + +# Distribution / packaging +dist/ +build/ +*.egg-info/ + +# IDE-specific files +.idea/ +.vscode/ + +# Logs +*.log + +# Virtual environments +venv/ + +# Other +*.DS_Store + +# Contrib files without permission +src/nqrduck_spectrometer_limenqr/contrib/limr.py +src/nqrduck_spectrometer_limenqr/contrib/pulseN_test_USB.cpp +src/nqrduck_spectrometer_limenqr/contrib/pulseN_test_USB +src/nqrduck_spectrometer_limenqr/contrib/pulseN_test_USB_TX2 +src/nqrduck_spectrometer_limenqr/contrib/pulseN_test_USB_TX2.cpp \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..94b1433 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 Julia Pfitzer + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..6a5dcbe --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,32 @@ +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[tool.hatch.metadata] +allow-direct-references = true + +[project] +name = "nqrduck-spectrometer-simulator" +version = "0.0.1" +authors = [ + { name="Julia Pfitzer", email="git@jupfi.me" }, +] + +description = "A submodule for the nqrduck-spectrometer module which implements the functionality of a NQR bloch simulator. This should enable easy simulation of NQR experiments." +readme = "README.md" +license = { file="LICENSE" } +requires-python = ">=3.8" + +classifiers = [ + "Programming Language :: Python :: 3", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", +] + +dependencies = [ + "nqrduck-spectrometer", + "pyqt6", +] + +[project.entry-points."nqrduck"] +"nqrduck-spectrometer-simulator" = "nqrduck_spectrometer_simulator.simulator:Simulator" \ No newline at end of file diff --git a/src/nqrduck_spectrometer_simulator/__init__.py b/src/nqrduck_spectrometer_simulator/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/nqrduck_spectrometer_simulator/controller.py b/src/nqrduck_spectrometer_simulator/controller.py new file mode 100644 index 0000000..0619b02 --- /dev/null +++ b/src/nqrduck_spectrometer_simulator/controller.py @@ -0,0 +1,5 @@ +from nqrduck_spectrometer.base_spectrometer_controller import BaseSpectrometerController + +class SimulatorController(BaseSpectrometerController): + def __init__(self, module): + super().__init__(module) diff --git a/src/nqrduck_spectrometer_simulator/model.py b/src/nqrduck_spectrometer_simulator/model.py new file mode 100644 index 0000000..4ee1483 --- /dev/null +++ b/src/nqrduck_spectrometer_simulator/model.py @@ -0,0 +1,5 @@ +from nqrduck_spectrometer.base_spectrometer_model import BaseSpectrometerModel + +class SimulatorModel(BaseSpectrometerModel): + def __init__(self, module): + super().__init__(module) \ No newline at end of file diff --git a/src/nqrduck_spectrometer_simulator/resources/simulator.ini b/src/nqrduck_spectrometer_simulator/resources/simulator.ini new file mode 100644 index 0000000..3c94478 --- /dev/null +++ b/src/nqrduck_spectrometer_simulator/resources/simulator.ini @@ -0,0 +1,7 @@ +[META] +name = nqrduck-spectrometer-simulator +toolbar_name = Simulator +tooltip = Application used for simulating the bloch equations + +[FILES] +config = resources/simulator.ini diff --git a/src/nqrduck_spectrometer_simulator/simulator.py b/src/nqrduck_spectrometer_simulator/simulator.py new file mode 100644 index 0000000..1a88510 --- /dev/null +++ b/src/nqrduck_spectrometer_simulator/simulator.py @@ -0,0 +1,6 @@ +from nqrduck_spectrometer.base_spectrometer import BaseSpectrometer +from .model import SimulatorModel +from .view import SimulatorView +from .controller import SimulatorController + +Simulator = BaseSpectrometer(SimulatorModel, SimulatorView, SimulatorController) \ No newline at end of file diff --git a/src/nqrduck_spectrometer_simulator/view.py b/src/nqrduck_spectrometer_simulator/view.py new file mode 100644 index 0000000..81c6c4b --- /dev/null +++ b/src/nqrduck_spectrometer_simulator/view.py @@ -0,0 +1,7 @@ +from nqrduck_spectrometer.base_spectrometer_view import BaseSpectrometerView + +class SimulatorView(BaseSpectrometerView): + def __init__(self, module): + super().__init__(module) + + self.widget = self.load_settings_ui() \ No newline at end of file