What I want to do
My attempt and results
Some spectra have high baseline noise -- whether due to the webcam itself, or due to stray light in the spectrometer.
I used a Transform operation with the expression
Math.max(A-0.15,0)+(0.15*Math.max(A-0.15,0)) to subtract out data that falls below 15% -- and the way I did it also spreads the remaining data evenly from 0-100%. You can see the difference before and after the noise reduction here:
- takes the average and subtracts 15%:
- cuts off anything that falls below zero:
- adds back a proportion of 15% based on if the original value was >15%:
The last part is not perfect; if the original value is 100%, it only adds back a maximum of 85% of 15%, which drops the final value by 2.25% versus the original. This is shown at the highest peaks of the comparison graph, but the effect is most prominent only at the very highest peaks. I could remove this with a more complex expression, but it seems not worth it to me.
Try it out yourself by forking these two and tweaking the operation yourself: https://spectralworkbench.org/sets/show2/3163