Skip to content

Commit

Permalink
Working version.
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexHenderson committed Oct 24, 2021
1 parent 670c9b5 commit 503a261
Show file tree
Hide file tree
Showing 84 changed files with 20,663 additions and 1 deletion.
16 changes: 16 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
cff-version: 1.2.0
message: If you use this software, please cite it using these metadata.
title: OceanInsightUVVIS
abstract: Python package to read the Ocean Insight ultraviolet-visible spectroscopy (uv-vis) file format.
authors:
- family-names: Henderson
given-names: Alex
orcid: "https://orcid.org/0000-0002-5791-8555"
affiliation: University of Manchester, UK
email: [email protected]
website: https://alexhenderson.info
version: 1.0.0
date-released: "2021-10-24"
license: MIT
license-url: https://spdx.org/licenses/MIT#licenseText
repository: "https://github.com/UoMMIB/OceanInsightUVVIS/"
55 changes: 54 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,55 @@
# OceanInsightUVVIS
Text file parser for Ocean Insight UV-VIS files.

Python package to read the Ocean Insight ultraviolet-visible spectroscopy (uv-vis) file format.

[Ocean Insight](https://www.oceaninsight.com/) (formerly Ocean Optics) produce instrumentation for spectroscopy.
Their data acquisition package – [OceanView](https://www.oceaninsight.com/products/software/) – can export
spectra in a number of file formats. Here we read the `ASCII (with header data)` text format.

## Usage
### Construction
To read a spectrum file, first create an instance of an OceanInsightUVVIS class, then pass the spectrum filename to
the `read`function. As a shortcut, pass the spectrum filename directly to the constructor.

```python

from uvvis.uvvis_spectrum import UVVisSpectrum

obj = UVVisSpectrum()
spectrum = obj.read("myfile.txt")
```
or

```python

from uvvis.uvvis_spectrum import UVVisSpectrum

spectrum = UVVisSpectrum("myfile.txt")
```

### Functionality
Retrieve the filename of the currently active spectrum
`filename = spectrum.filename`

Retrieve the spectral data as a Pandas dataframe
`data = spectrum.data`

Retrieve the raw file header information as a dictionary
`header = spectrum.header`

Retrieve the file metadata as a dictionary
`metadata = spectrum.metadata_as_dict()`

Retrieve the file metadata as a JSON string
`jsonmetadata = spectrum.metadata_as_json()`

## Copyright and Licence for use
Copyright (C) 2021 Alex Henderson [[email protected]](mailto:[email protected])

This work is licensed under a [MIT](https://opensource.org/licenses/MIT) license.
SPDX-License-Identifier: MIT

The most recent version of this software library can be found here: [https://github.com/UoMMIB/OceanInsightUVVIS/](https://github.com/UoMMIB/OceanInsightUVVIS/)

## Contributors
Alex Henderson, University of Manchester. [[email protected]](mailto:[email protected])
20 changes: 20 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
BUILDDIR = build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
21 changes: 21 additions & 0 deletions docs/html/_sources/index.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
.. OceanInsightUVVIS documentation master file, created by
sphinx-quickstart on Sat Oct 2 16:17:19 2021.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
.. include:: readme-shim.md
:parser: myst_parser.sphinx_

.. toctree::
:maxdepth: 3
:caption: Contents:

modules


Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
7 changes: 7 additions & 0 deletions docs/html/_sources/main.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
main module
===========

.. automodule:: main
:members:
:undoc-members:
:show-inheritance:
8 changes: 8 additions & 0 deletions docs/html/_sources/modules.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
source
======

.. toctree::
:maxdepth: 4

utilities
uvvis
2 changes: 2 additions & 0 deletions docs/html/_sources/readme-shim.md.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
```{include} ../../README.md
```
21 changes: 21 additions & 0 deletions docs/html/_sources/utilities.datetimeutils.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
utilities.datetimeutils package
===============================

Submodules
----------

utilities.datetimeutils.jsondatetimeencoder module
--------------------------------------------------

.. automodule:: utilities.datetimeutils.jsondatetimeencoder
:members:
:undoc-members:
:show-inheritance:

Module contents
---------------

.. automodule:: utilities.datetimeutils
:members:
:undoc-members:
:show-inheritance:
21 changes: 21 additions & 0 deletions docs/html/_sources/utilities.jsonutils.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
utilities.jsonutils package
===========================

Submodules
----------

utilities.jsonutils.multiplejsonencoders module
-----------------------------------------------

.. automodule:: utilities.jsonutils.multiplejsonencoders
:members:
:undoc-members:
:show-inheritance:

Module contents
---------------

.. automodule:: utilities.jsonutils
:members:
:undoc-members:
:show-inheritance:
29 changes: 29 additions & 0 deletions docs/html/_sources/utilities.pintutils.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
utilities.pintutils package
===========================

Submodules
----------

utilities.pintutils.jsonpintencoder module
------------------------------------------

.. automodule:: utilities.pintutils.jsonpintencoder
:members:
:undoc-members:
:show-inheritance:

utilities.pintutils.unitmanager module
--------------------------------------

.. automodule:: utilities.pintutils.unitmanager
:members:
:undoc-members:
:show-inheritance:

Module contents
---------------

.. automodule:: utilities.pintutils
:members:
:undoc-members:
:show-inheritance:
20 changes: 20 additions & 0 deletions docs/html/_sources/utilities.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
utilities package
=================

Subpackages
-----------

.. toctree::
:maxdepth: 4

utilities.datetimeutils
utilities.jsonutils
utilities.pintutils

Module contents
---------------

.. automodule:: utilities
:members:
:undoc-members:
:show-inheritance:
21 changes: 21 additions & 0 deletions docs/html/_sources/uvvis.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
uvvis package
=============

Submodules
----------

uvvis.uvvis\_spectrum module
----------------------------

.. automodule:: uvvis.uvvis_spectrum
:members:
:undoc-members:
:show-inheritance:

Module contents
---------------

.. automodule:: uvvis
:members:
:undoc-members:
:show-inheritance:
Loading

0 comments on commit 503a261

Please sign in to comment.