diff --git a/.gitignore b/.gitignore index a7d72e6..cb58937 100644 --- a/.gitignore +++ b/.gitignore @@ -8,8 +8,14 @@ *.so.* *.dylib -# Executables +# Build *.exe +builds/ + +# Metadata +*.aliases +*.lvlps +.cache/ # Computer-specific settings *.lvlps diff --git a/LICENSE.txt b/LICENSE.txt index 8ccf21e..e8ee7bb 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,6 +1,6 @@ -Copyright © 2023, Iowa State University +Copyright (C) 2023, 2026, Iowa State University -All rights reserved. Copyright 2023. Iowa State University. This software was produced under U.S. Government contract --- for The Ames Laboratory, which is operated by Iowa State University for the U.S. Department of Energy. The U.S. Government has rights to use, reproduce, and distribute this software. NEITHER THE GOVERNMENT NOR IOWA STATE UNIVERSITY MAKES ANY WARRANTY, EXPRESS OR IMPLIED, OR ASSUMES ANY LIABILITY FOR THE USE OF THIS SOFTWARE. If software is modified to produce derivative works, such modified software should be clearly marked, so as not to confuse it with the version available from The Ames Laboratory. Additionally, redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +All rights reserved. Copyright 2023, 2026. Iowa State University. This software was produced under U.S. Government contract --- for The Ames Laboratory, which is operated by Iowa State University for the U.S. Department of Energy. The U.S. Government has rights to use, reproduce, and distribute this software. NEITHER THE GOVERNMENT NOR IOWA STATE UNIVERSITY MAKES ANY WARRANTY, EXPRESS OR IMPLIED, OR ASSUMES ANY LIABILITY FOR THE USE OF THIS SOFTWARE. If software is modified to produce derivative works, such modified software should be clearly marked, so as not to confuse it with the version available from The Ames Laboratory. Additionally, redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - Redistribution in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with distribution. @@ -10,4 +10,4 @@ THIS SOFTWARE IS PROVIDED BY IOWA STATE UNIVERSITY AND CONTRIBUTORS "AS IS" AND =============================================================================== -ReactIR trademark is owned by Metter Toledo and its affiliated entities. \ No newline at end of file +ReactIR trademark is owned by Metter Toledo and its affiliated entities. diff --git a/README.md b/README.md index 82ff531..54b5757 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,70 @@ # ReactIR Report Parser -This plugin parses report files output from a ReactIR(TM) to -extract the peak intensity of an analyte. The plugin will average the results -of three scans before reporting a new concentration value to Rxn Rover. -A sample report is included with the plugin, whose format must be matched -exactly for the parser to work. +This plugin parses report files output from a [Mettler Toledo ReactIR](https://www.mt.com/ph/en/home/products/L1_AutochemProducts/ftir-and-raman-spectrometers/ftir-spectrometers.html) to extract the intensity of a specified peak. The plugin will average the results of a default of three scans before reporting a new concentration value to Rxn Rover. -**Note:** The ReactIR trademark is owned by Mettler Toledo -and its affiliated entities. +## Table of Contents + +
+Click to expand + +- [Installation](#installation) + - [Prerequisites](#prerequisites) + - [As a VIPM Package (Recommended)](#as-a-vipm-package-recommended) + - [Manual Installation](#manual-installation) +- [Basic Usage](#basic-usage) + - [ReactIR Setup](#reactir-setup) + - [Choosing a Report Directory](#choosing-a-report-directory) + - [Main Window](#main-window) + +
## Installation -Download this plugin by clicking the "Code" button in the top right of its -GitHub repository and selecting "Download ZIP". Extract the ZIP file into your -`/RxnRover/Plugins/Analyzers` directory to finish installation. -Create the `Analyzers` subdirectory if it does not already exist. \ No newline at end of file +### Prerequisites + +- [Dynamic Reentrant](https://github.com/RxnRover/DynamicReentrant/releases/) >= 2, < 3 +- [JKI VI Package Manager](https://www.vipm.io/) (if installing through VIPM package; commonly installed by default with LabVIEW) + +### As a VIPM Package (Recommended) + +1. Navigate to the [latest release](https://github.com/RxnRover/plugin_reactir_report_parser/releases/latest) +2. Download the latest `*.vip` file +3. Double click to install it via VIPM + +### Manual Installation + +1. Navigate to the [plugin repo](https://github.com/RxnRover/plugin_reactir_report_parser). +2. Download this plugin by clicking the "Code" button in the top right of its GitHub repository and selecting "Download ZIP". +3. Extract the ZIP file into your `/RxnRover/Plugins/Analyzers` directory. Create the `Analyzers` subdirectory if it does not already exist. + +## Basic Usage + +### ReactIR Setup + +Before running this plugin, in the ReactIR software, set a folder where spectra will be output (``) and ensure that they are output in CSV format. The files must be named to match the following pattern, `SPC_*.CSV`, where `*` **MUST** be a monotonically ascending report number (leading zeroes are allowed). + +For example, `SPC_00003.CSV` is valid and `SPC_004.CSV` or `SPC_00204.CSV` would be parsed if they appeared afterward, but `SPC_00001.CSV` will not be read if it appears in the `` at a later time in the same session. For now, *file names are case sensitive*, so `SPC_001.CSV` will work, but `spc_001.csv` will not. + +**NOTE:** See `examples/` in the [plugin repository](https://github.com/RxnRover/plugin_reactir_report_parser) for examples of valid spectra and report directories for testing. + +### Choosing a Report Directory + +Once the plugin is started, use the first "Select Report Directory" to select this ``. You can manually paste the report directory path into the path input field or use the "Browse for folder" button with a folder icon. Then, press "Confirm" to use the chosen folder or "Cancel" to quit the plugin. + +![Dialog window to select the report directory. There is a LabVIEW path input field on the left side with a "Browse for folder" button to its right. On the right side of the window is a "Confirm" button above a "Cancel" button.](docs/_media/select_report_directory_dialog.png) + +**NOTE:** Existing spectra will be ignored! Only spectra files created after the report directory is chosen will be detected. + +### Main Window + +Once a report directory (``) is selected, you will be presented with the main plugin window. Along with a plot of the parsed spectra to be averaged, the following features are available to configure plugin behavior: + +1. The target peak wavenumber ($cm^{-1}$) can be specified, defaulting to 3600 $cm^{-1}$. +2. The target peak tolerance ($\pm\ x\ cm^{-1}$) can be specified to accomodate shifting peaks. +3. The number of points to be averaged before a peak intensity is reported to Rxn Rover or another remote connection. This defaults to 3 spectra. To disable averaging, set this to 1. +4. The reported absorbance from the plugin can be scaled by a max absorbance value. This is a simple division of the measured intensity by the max intensity after averaging. The max intensity defaults to 1 which has no scaling effect. +5. The averaged, scaled absorbance reported to Rxn Rover or another remote connection. + + + +![Main plugin window displaying three parsed spectra in a wavenumber vs. absorbance plot at the top. Below the plot are the plugin behavior settings described in the text: Target Peak, Peak Tolerance, Points to Average, Max Absorbance, and reported Scaled Absorbance. At the bottom of the window are indicators for the chosen report directory and most recently parsed spectrum file.](docs/_media/main_window_with_spectra.png) diff --git a/ReactIR Report Parser.aliases b/ReactIR Report Parser.aliases deleted file mode 100644 index fbe82ff..0000000 --- a/ReactIR Report Parser.aliases +++ /dev/null @@ -1,2 +0,0 @@ -[My Computer] -My Computer = "172.26.240.1" diff --git a/docs/_media/main_window_with_spectra.png b/docs/_media/main_window_with_spectra.png new file mode 100644 index 0000000..c034e2f Binary files /dev/null and b/docs/_media/main_window_with_spectra.png differ diff --git a/docs/_media/select_report_directory_dialog.png b/docs/_media/select_report_directory_dialog.png new file mode 100644 index 0000000..cbbb538 Binary files /dev/null and b/docs/_media/select_report_directory_dialog.png differ