Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,14 @@
*.so.*
*.dylib

# Executables
# Build
*.exe
builds/

# Metadata
*.aliases
*.lvlps
.cache/

# Computer-specific settings
*.lvlps
Expand Down
6 changes: 3 additions & 3 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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.
ReactIR trademark is owned by Metter Toledo and its affiliated entities.
75 changes: 64 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -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

<details>
<summary>Click to expand</summary>

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

</details>

## 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
`<documents>/RxnRover/Plugins/Analyzers` directory to finish installation.
Create the `Analyzers` subdirectory if it does not already exist.
### 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)
Comment thread
JohnBrittaein marked this conversation as resolved.

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

Comment thread
JohnBrittaein marked this conversation as resolved.
### 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 `<documents>/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 (`<report_dir>`) 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 `<report_dir>` 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.

Comment thread
JohnBrittaein marked this conversation as resolved.
**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 `<report_dir>`. 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 (`<report_dir>`) 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.

<!-- TODO: Add corresponding numbers to the image for each feature discussed. -->
Comment thread
JohnBrittaein marked this conversation as resolved.

![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)
2 changes: 0 additions & 2 deletions ReactIR Report Parser.aliases

This file was deleted.

Binary file added docs/_media/main_window_with_spectra.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_media/select_report_directory_dialog.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.