Initial commit.

This commit is contained in:
jupfi 2023-08-24 08:12:58 +02:00
commit f5cdfdda4b
10 changed files with 112 additions and 0 deletions

29
.gitignore vendored Normal file
View file

@ -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

21
LICENSE Normal file
View file

@ -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.

0
README.md Normal file
View file

32
pyproject.toml Normal file
View file

@ -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"

View file

@ -0,0 +1,5 @@
from nqrduck_spectrometer.base_spectrometer_controller import BaseSpectrometerController
class SimulatorController(BaseSpectrometerController):
def __init__(self, module):
super().__init__(module)

View file

@ -0,0 +1,5 @@
from nqrduck_spectrometer.base_spectrometer_model import BaseSpectrometerModel
class SimulatorModel(BaseSpectrometerModel):
def __init__(self, module):
super().__init__(module)

View file

@ -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

View file

@ -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)

View file

@ -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()