-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
670c9b5
commit 503a261
Showing
84 changed files
with
20,663 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
main module | ||
=========== | ||
|
||
.. automodule:: main | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
source | ||
====== | ||
|
||
.. toctree:: | ||
:maxdepth: 4 | ||
|
||
utilities | ||
uvvis |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
```{include} ../../README.md | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: |
Oops, something went wrong.