Metadata-Version: 2.4
Name: nqrduck-broadband
Version: 0.0.15
Summary: A module for the NQRduck program (a simple python script™) to do broadband magnetic resonance measurements.
Project-URL: Homepage, https://nqrduck.cool
Project-URL: Bug Tracker, https://git.private.coffee/nqrduck/nqrduck-broadband/issues
Project-URL: Source Code, https://git.private.coffee/nqrduck/nqrduck-broadband
Author-email: jupfi <support@nqrduck.cool>
License: MIT License
        
        Copyright (c) 2023 jupfi
        
        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.
License-File: LICENSE
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.10
Requires-Dist: matplotlib
Requires-Dist: nqrduck
Requires-Dist: nqrduck-spectrometer
Requires-Dist: pyqt6
Requires-Dist: quackseq
Description-Content-Type: text/markdown

# NQRduck Module: nqrduck-broadband

A module for the [nqrduck](https://git.private.coffee/nqrduck/nqrduck) project. This module is used for broadband magnetic resonance experiments.

Tuning and Matching is done using the [ATM-system](https://git.private.coffee/nqrduck/ATM) in combination with the [nqrduck-autotm](https://git.private.coffee/nqrduck/nqrduck-autotm) module.

For mechanically tunable probe coils stepper motors for Tuning and Matching are used. 
For electrically tunable probe coils varactor diodes are used. The system is able to output a Tuning and Matching voltage in a range from 0 to 5V.

## Installation

### Requirements
Dependencies are handled via the pyproject.toml file.

### Setup
To install the module you need the NQRduck core. You can find the installation instructions for the NQRduck core [here](https://git.private.coffee/nqrduck/nqrduck).

Ideally you should install the module in a virtual environment. You can create a virtual environment by running the following command in the terminal:
```bash
python -m venv nqrduck
# Activate the virtual environment
. nqrduck/bin/activate
```

You can install this module and the dependencies by running the following command in the terminal while the virtual environment is activated and you are in the root directory of this module:
```bash
pip install .
```
Alternatively, you can install the module and the dependencies by running the following command in the terminal while the virtual environment is activated:
```bash
pip install nqrduck-broadband
```

## Usage
The module is used with the [ATM-system](https://git.private.coffee/nqrduck/ATM) in combination with the [nqrduck-autotm](https://git.private.coffee/nqrduck/nqrduck-autotm) module. 

Depending on what kind of probe coil is used you can generate a Lookup Table for a certain frequency range using the 'Tuning and Matching' tab.
If you are using a low Q broadband probe coil you don't have to generate a Lookup Table.

The pulse sequence and spectrometer settings can be adjusted using the 'Spectrometer' tab. 

<img src="https://raw.githubusercontent.com/nqrduck/nqrduck-autotm/d15d85be91195e3e7b514b60b3cef6d1dcde5e1e/docs/img/autotm-labeled.png" alt="drawing" width="800">

- a.) The measurements settings with the frequency range and the number of steps. These settings are locked when generating a Lookup Table.
- b.) The information about the active Lookup Table.
- c.) The 'Broadband Plot'. Here the measured data is displayed. The plot is separated into the full broadband magnitude plot, the last time domain plot and the last frequency domain plot.
- d.) The 'Info Box'. Here information about the current status of the broadband measurement is displayed.



### Notes
- The active user needs to be in the correct group to use serial ports for the ATM-system. For example 'uucp' in Arch Linux and 'dialout' in Ubuntu.

## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details

## Contributing
If you're interested in contributing to the project, start by checking out our [nqrduck-module template](https://git.private.coffee/nqrduck/nqrduck-module). To contribute to existing modules, please first open an issue in the respective module repository to discuss your ideas or report bugs.
