wincowgerDEV / OpenSpecy-package

Analyze, Process, Identify, and Share, Raman and (FT)IR Spectra
http://wincowger.com/OpenSpecy-package/
Creative Commons Attribution 4.0 International
23 stars 11 forks source link

[Feature]: Crop Zero Tails #167

Closed wincowgerDEV closed 5 months ago

wincowgerDEV commented 6 months ago

Guidelines

Description

I have been getting some user issues where they are confused why the output of Open Specy isn't giving them the correct identification by default. When I look at their spectra (see below), I see a series of zero values near the tails (likely due to the spectral range being beyond the limits of their detector. I am not sure how widespread this is but it could be good to create a function that will crop all zeros from both ends until the first nonzero value and add that to the shiny app by default. I could also see the opposite of this happening where 1s or 100s are at the tails. 1.csv

Problem

Instrument artifacts create distorted spectral analysis.

Proposed Solution

Remove tail values that are consistently zeros, 1s, or 100s until they no longer appear by default, treat them like NAs or potentially replace them with NAs.

Alternatives Considered

I have been telling people to do range subtraction.

wincowgerDEV commented 6 months ago

Also should remove empty rows from excel files and not throw error in the app.

wincowgerDEV commented 5 months ago

Should be fixed with 75411f12f685fe4a62e26cfbb239bb6eca7bba9d