Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/garrettmflynn/omnic-to-csv
Convert OMNIC data to CSV files
https://github.com/garrettmflynn/omnic-to-csv
Last synced: about 1 month ago
JSON representation
Convert OMNIC data to CSV files
- Host: GitHub
- URL: https://github.com/garrettmflynn/omnic-to-csv
- Owner: garrettmflynn
- Created: 2024-08-02T19:14:22.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-09-06T17:23:21.000Z (4 months ago)
- Last Synced: 2024-09-07T19:11:40.913Z (4 months ago)
- Language: Python
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# OMNIC to CSV
This script converts OMNIC files to CSV files.## Installation
Install `spectrochempy` and `pandas` into a virtual environment.
```bash
pip install spectrochempy pandas
```For your convenience, the `environment.yml` file is provided for creating a conda environment.
```bash
conda env create -f environment.yml
```## Getting Started
In OMNIC, export the data as `.spa` files by selecting the desired data and clicking `Series > Split Series File > Ok`.Make sure you save this **collection** of `.spa` files in a directory indicating the series name.
```
0000.spa
0001.spa
0002.spa
...
```## Usage
The `omnic_to_csv.py` script takes a directory of OMNIC `.spa` collections and converts them to CSV files corresponding to the collection names.```bash
python omnic_to_csv.py
```## Example
```bash
python omnic_to_csv.py data csv_files
```### Data
```
data
series1
series1000.spa
series1001.spa
series1002.spa
series2
series2000.spa
series2001.spa
series2002.spa
```### CSV Files
In the CSV file, the first column is the UNIX timestamp. Subsequent column headers indicate the wavenumber. Each row corresponds to the temperature at the given timestamp and wavenumber.
```
csv_files
series1.csv
series2.csv
```