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

Switches/check boxes for preprocess tab #9

Closed zsteinmetz closed 3 years ago

zsteinmetz commented 3 years ago

I'm currently struggling with making this bit of code work with the new functions:

https://github.com/wincowgerDEV/OpenSpecy/blob/bde5f109207940dac1985313a3838ba0f1b4810f/inst/shiny/server.R#L205-L221

This is mainly because of the nested if statements and function logic being inconsistent with the UI: A smoother of p = 0 or a background substration with degree = 0 are not the same as no smoothing/subtraction. Would it make sense to add some switches/check boxes to the tab to toggle each filter on and off?

zsteinmetz commented 3 years ago

It's not beautiful but works.

wincowgerDEV commented 3 years ago

I agree that the p=0 and degree = 0 workaround I made was not elegant. I think having a switch to totally remove the smoothing or background subtraction or range selection would be ideal.

zsteinmetz commented 3 years ago

image

Maybe something like this?

wincowgerDEV commented 3 years ago

Yeah! That looks awesome. I guess we want the Question mark to be right next to the words smoothing polynomial so that it doesn't get hidden if we decide to hide the slider. We could have the check box either completely hide the slider or just gray it out.

Warm Regards, Win

On Tue, Mar 16, 2021 at 8:16 AM Zacharias Steinmetz < @.***> wrote:

[image: image] https://user-images.githubusercontent.com/10266826/111333244-cd148580-8672-11eb-8411-0eb7b1d06ecd.png

Maybe something like this?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/wincowgerDEV/OpenSpecy/issues/9#issuecomment-800351911, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGMUJU6GWKKLMZJBHZTPPIDTD5Y3HANCNFSM4YXDEHFQ .

--

´¯·.¸¸.·´¯·.´¯·.¸¸.·´¯ツ ------------------------------

Win Cowger PhD Candidate, Environmental Sciences: Soil and Water University of California, Riverside

NSF Graduate Research Fellow Research Advisor to 5 Gyres https://www.5gyres.org/advisors/ Data Advisor to Let's Do It World https://www.letsdoitworld.org/

Contact Info

515-298-3869 | @.***

Websites www.openspecy.org www.wincowger.com http://andrewgray.ucr.edu/people/wcowger.html


zsteinmetz commented 3 years ago

We could have the check box either completely hide the slider or just gray it out.

Good idea!

wincowgerDEV commented 3 years ago

This feature has been added with https://github.com/wincowgerDEV/OpenSpecy/pull/28#issue-595933594