Metadata-Version: 2.4
Name: open_osc
Version: 0.0.0
Summary: Open source binary decoder for OSC file format.
Author-email: Sang-Hyeok Lee <lee@imm.rwth-aachen.de>
Maintainer-email: Sang-Hyeok Lee <lee@imm.rwth-aachen.de>
Project-URL: Homepage, https://git.rwth-aachen.de/imm_git/openosc
Keywords: file reader,osc,development
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3 :: Only
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: documentation
Requires-Dist: numpydoc; extra == "documentation"
Requires-Dist: sphinx; extra == "documentation"
Requires-Dist: sphinx-autoapi; extra == "documentation"
Requires-Dist: sphinx-material; extra == "documentation"
Requires-Dist: jupyter; extra == "documentation"
Requires-Dist: nbsphinx; extra == "documentation"
Dynamic: license-file

# OpenOSC: OSC file reader

## Installation

```shell
pip install open-osc
```

## Dependencies

No dependencies. This library only uses Python standard library for normal use.

## Capability

The software can decode different sections of the OSC file, not just the EBSD data. The software can decode the following sections:

- EBSD data (Euler angles, X, Y, ...)
- Hough points
- EDS (ROI integration) data, if available
- ROI (region of interest) data, if available. Basically high resolution detector signal data in 8 bit grey scale image.
- Phases
- Header

This software does not decode all the fields in the OSC file. It only decodes the data identified by the authors/contributors. Use the software at your own risk.

## Usage

```python
from open_osc import load_osc

# Load
osc_file = load_osc('path/to/file.osc')

# Interact with the decoded data
ebsd_data = osc_file.data_as_dictionary()
euler1 = ebsd_data['phi1']
euler2 = ebsd_data['phi']
euler3 = ebsd_data['phi2']
```

## Stage

- The software can decode most publicly available OSC files.
- Not ready for production. Use at your own risk.

## Developments

### Known bugs

- Inference of NCOL_EVEN and NCOL_ODD is sometimes faulty.

### Todo

- Identify the field for the elastic modulus
- Decode the hough indexing parameters.
- Identify the header fields. It is largely unknown.

## Bug / Incompatibility Reporting

If you encounter an incompatibility with the OSC file, please open a new issue and attach the following files:

- The *.OSC file in question.
- The corresponding *.ANG file, directly exported from the manufacturer software.

To ensure proper testing, submitted files may be uploaded to the Git repository and released under the same license as this repository. (MIT) as this repository. Please submit the file only if you agree to this condition, and the file you submit MUST be owned by you, or you have the right to distribute/license it. If possible, please submit a small osc file (< 3 MB).

Please also provide the following information:

- The manufacturer-software version.
- The instrument used to measure the data (electron microscope, EBSD detector, ...).
- If applicable, the context of the data. In the case of someone who might want to use the data for their own purposes (the MIT licence does not prohibit off-purpose use).

## Acknowledgement

### Test data sources

Test datasets are not yet included in this repository, though they will be bundled in ./tests/data/ for testing purposes. These files will originate either from our research group or from external sources under compatible licenses (e.g., MIT, Public Domain), with *.bibtex files alongside them detailing original sources and licenses.

### Funding

Funded by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) as part of Collaborative Research Centre CRC 1394 - Structural and Chemical Atomic Complexity - From Defect Phase Diagrams to Material Properties (project number 409476157) and under the National Research Data Infrastructure – NFDI 38/1 (project number 460247524)
