2017-10-10 12:11:21 -04:00
|
|
|
# Bruker OPUS Reader
|
|
|
|
|
|
|
|
## Introduction
|
2018-07-12 05:37:46 -04:00
|
|
|
The brukeropusreader Python package enables reading the binary OPUS files generated by Bruker spectrometers.
|
2017-07-11 04:28:19 -04:00
|
|
|
|
2019-07-13 05:11:47 -04:00
|
|
|
## Installation
|
|
|
|
### Install with pip
|
|
|
|
```pip install brukeropusreader```
|
|
|
|
|
2017-07-11 04:28:19 -04:00
|
|
|
## Usage
|
2018-10-31 06:43:08 -04:00
|
|
|
`read_file` parses OPUS file and returns `OpusData` object:
|
|
|
|
```
|
|
|
|
from brukeropusreader import read_file
|
|
|
|
|
|
|
|
opus_data = read_file('opus_file.0')
|
|
|
|
```
|
|
|
|
|
2019-08-27 10:11:06 -04:00
|
|
|
`OpusData` is a dict consisting of all fields found in opus file:
|
2018-10-31 06:43:08 -04:00
|
|
|
```
|
2019-08-27 10:11:06 -04:00
|
|
|
print(f'Parsed fields: '
|
|
|
|
f'{list(opus_data.keys())}')
|
2018-10-31 06:43:08 -04:00
|
|
|
|
2019-08-27 10:11:06 -04:00
|
|
|
print(f'Absorption spectrum: '
|
|
|
|
f'{opus_data["AB"]}'
|
2018-10-31 06:43:08 -04:00
|
|
|
```
|
|
|
|
|
|
|
|
For full code see [example](example.py).
|
2017-07-11 04:28:19 -04:00
|
|
|
|
2019-08-27 10:11:06 -04:00
|
|
|
## Algorithm
|
|
|
|
Algorithm taken from
|
|
|
|
https://bitbucket.org/hirschbeutel/ono/src/default/ono/bruker_opus_filereader.py
|
2017-10-10 12:11:21 -04:00
|
|
|
|
2019-08-27 10:11:06 -04:00
|
|
|
Author: @twagner
|
2017-07-11 04:28:19 -04:00
|
|
|
|
2017-10-10 12:11:21 -04:00
|
|
|
## Contact
|
|
|
|
For developer issues, please start a ticket in Github.
|
2018-07-12 05:37:46 -04:00
|
|
|
You can also write to the dev team directly at brukeropusreader-dev@qed.ai.
|
|
|
|
For other issues, please write to: brukeropusreader@qed.ai
|
2017-07-11 04:28:19 -04:00
|
|
|
|
2018-07-10 06:32:43 -04:00
|
|
|
## License
|
|
|
|
Copyright (c) 2018 [Quantitative Engineering Design](https://qed.ai). All rights reserved.
|
|
|
|
This project is released under the terms of the AGPL license, which is included in LICENSE.txt.
|
|
|
|
|
2017-10-10 12:11:21 -04:00
|
|
|
--
|
|
|
|
QED | https://qed.ai
|