bug fix for Relab library: Sometimes data files don't have description#182
Open
kvngvikram wants to merge 1 commit intospectralpython:developfrom
Open
bug fix for Relab library: Sometimes data files don't have description#182kvngvikram wants to merge 1 commit intospectralpython:developfrom
kvngvikram wants to merge 1 commit intospectralpython:developfrom
Conversation
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.
Hi,
The Relab spectral database sometimes doesn't have description in their data files (.asc files). This can be any number of lines before the last lines of Source info and Date lines.
And I guess it is arbitary. Some have and some don't.
In the current state for files with no description, creating database results in an error because there is no
s.sample['description']which is necessary.So this pull request adds a test spectra that doesn't have the description along with the existing one.
And the code was edited so that anything lines that do not have 'Source' or 'Date' are appended as description. And even if there is no description, the
s.measurement['name']will be used (as intended previously).Note:
Here is the error message for the newer test files but older code: