Some code cleanup- and added the ability to concatenate smartmooring#15
Open
pieterbartsmit wants to merge 1 commit intomainfrom
Open
Some code cleanup- and added the ability to concatenate smartmooring#15pieterbartsmit wants to merge 1 commit intomainfrom
pieterbartsmit wants to merge 1 commit intomainfrom
Conversation
Collaborator
pieterbartsmit
commented
Apr 25, 2023
- added a requirements.txt for installation
- removed the weird local scope importing I used to do and replaced with global imports
- introduced standard "import numpy as np"
- allow for smartmooring parsing (very rudimentary)
- allow for parsing of files if no sys files are available (use latest defaults to try and parse).
- removed the weird local scope importing I used to do and replaced with global imports - introduced standard "import numpy as np" - allow for smartmooring parsing (very rudimentary) - allow for parsing of files if no sys files are available (use latest defaults to try and parse).
tcj
requested changes
Apr 25, 2023
Contributor
tcj
left a comment
There was a problem hiding this comment.
@pieterbartsmit thanks for all the useful changes and cleanup!
I am noticing one problem, which I can dig into more later. While testing with data from SPOT-0552:
Traceback (most recent call last):
File "/Users/tcj/src/spotter-sd-parser/sd_file_parser.py", line 1699, in <module>
main(**arguments)
File "/Users/tcj/src/spotter-sd-parser/sd_file_parser.py", line 553, in main
if spectra.spectral_data_is_available:
AttributeError: 'str' object has no attribute 'spectral_data_is_available'
Contributor
|
@tcj - It looks like that should be diff --git a/sd_file_parser.py b/sd_file_parser.py
index 1d29dec..04e13ad 100755
--- a/sd_file_parser.py
+++ b/sd_file_parser.py
@@ -550,7 +550,7 @@ def main( path = None , outpath=None, outputFileType='CSV',
# Generate bulk parameter file
if bulkParameters:
spectrum = Spectrum(path=outpath,outpath=outpath)
- if spectra.spectral_data_is_available:
+ if spectrum.spectral_data_is_available:
spectrum.generate_text_file()
#Versions
# |
Contributor
|
@pieterbartsmit import fnmatch
import gzip
import os
import sys
import time
import numpy as np
import pandas as pd
from scipy import io, signal |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.