-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Water raman scans processing and viz * Debugging the S3 demo data download * attempting to migrate from circleCI to github actions * attempting to migrate from circleCI to github actions * attempting to migrate from circleCI to github actions * attempting to migrate from circleCI to github actions * attempting to migrate from circleCI to github actions * attempting to migrate from circleCI to github actions * attempting to migrate from circleCI to github actions * Playing with github actions. Publish to pypi on release. * integrating pre-commit and black * getting the GH action linter working * GH action for docs * GH action for docs * Debugging GH action for docs * Debugging GH action for docs * Debugging GH action for docs * increment minor version for new release * added some tests for new plotting functions. * debugging codecov GH action. * debugging codecov GH action. * debugging codecov GH action. * debugging codecov GH action. * Update README * JOSS paper prep. * Added the MIT REMORA instrument and fixed minor bugs.
- Loading branch information
Showing
16 changed files
with
254 additions
and
53 deletions.
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,31 @@ | ||
name: Codecov | ||
on: [push] | ||
jobs: | ||
run: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
env: | ||
OS: ${{ matrix.os }} | ||
PYTHON: '3.7' | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: Setup Python | ||
uses: actions/setup-python@master | ||
with: | ||
python-version: 3.7 | ||
- name: Generate coverage report | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -e .[tests] | ||
pip install pytest-cov | ||
pytest --cov=./ --cov-report=xml | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v1.0.5 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
file: ./coverage.xml | ||
flags: unittests | ||
name: codecov-umbrella | ||
fail_ci_if_error: true |
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
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 @@ | ||
MIT License | ||
|
||
Copyright (c) 2016-2020 David H Hagan and Jesse H Kroll | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
File renamed without changes.
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
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,4 @@ | ||
from .remora import Remora | ||
|
||
name = "MIT" | ||
instruments = [Remora] |
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,83 @@ | ||
import pandas as pd | ||
|
||
|
||
class Remora: | ||
"""The MIT REMORA, a field compact deployable spectrofluorometer.""" | ||
|
||
manufacturer = "MIT" | ||
"""Name of Manufacturer.""" | ||
|
||
name = "REMORA" | ||
"""Name of Instrument.""" | ||
|
||
supported_models = ["REMORA-V1"] | ||
"""List of supported models.""" | ||
|
||
def __init__(self, model, sn=None): | ||
""" | ||
Args: | ||
model (str): The model name of the instrument. | ||
sn (str or int, optional): The serial number of the instrument. | ||
Defaults to None. | ||
""" | ||
self.model = model | ||
self.sn = sn | ||
|
||
@staticmethod | ||
def load_eem(filepath): | ||
"""Loads an Excitation Emission Matrix which is generated by the instrument. | ||
Args: | ||
filepath (str): The filepath of the data file. | ||
Returns: | ||
pandas.DataFrame: An Excitation Emission Matrix. | ||
""" | ||
eem_df = pd.read_csv(filepath, index_col=0) | ||
eem_df.columns = eem_df.columns.astype(float) | ||
eem_df = eem_df.sort_index(axis=0) | ||
eem_df = eem_df.sort_index(axis=1) | ||
eem_df.index.name = "emission_wavelength" | ||
return eem_df | ||
|
||
def load_absorbance(filepath): | ||
"""Loads an absorbance spectrum which is generated by the instrument. | ||
Args: | ||
filepath (str): The filepath of the data file. | ||
Returns: | ||
pandas.DataFrame: An absorbance spectrum. | ||
""" | ||
absorb_df = pd.read_csv(filepath, index_col=0) | ||
absorb_df.index.name = "excitation_wavelength" | ||
absorb_df.sort_index(axis=0) | ||
absorb_df.index = absorb_df.index.astype("float64") | ||
return absorb_df | ||
|
||
def load_water_raman(filepath): | ||
"""Loads a water Raman spectrum which is generated by the instrument. | ||
Args: | ||
filepath (str): The filepath of the data file. | ||
Returns: | ||
pandas.DataFrame: An absorbance spectrum. | ||
""" | ||
raman_df = pd.read_csv(filepath, index_col=0) | ||
raman_df.columns = raman_df.columns.astype(float) | ||
raman_df = raman_df.sort_index(axis=0) | ||
|
||
raman_df = raman_df.rename(columns={raman_df.columns[0]: "intensity"}) | ||
raman_df.index.name = "emission_wavelength" | ||
return raman_df | ||
|
||
@staticmethod | ||
def load_spectral_corrections(): | ||
"""TODO - Should load instrument specific spectral corrections which will | ||
be used in data preprocessing. | ||
Raises: | ||
NotImplementedError: On the TODO list... | ||
""" | ||
raise NotImplementedError() |
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,6 +1,13 @@ | ||
from . import agilent, horiba, tecan | ||
from . import MIT, agilent, horiba, tecan | ||
from .base import _get_dataset_instruments_df, get_supported_instruments | ||
|
||
supported, _supported = get_supported_instruments() | ||
|
||
__all__ = ["agilent", "horiba", "tecan", "get_supported_instruments", "supported"] | ||
__all__ = [ | ||
"agilent", | ||
"horiba", | ||
"tecan", | ||
"MIT", | ||
"get_supported_instruments", | ||
"supported", | ||
] |
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
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
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
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
Oops, something went wrong.