A macro for linear calibration based on Chris Fastie's: http://spectralworkbench.org/macro/cfastie/CalibrateTemplate, https://gist.github.com/Fastie/5109944. Enter the pixel distance to each peak (zero left), and the known wavelengths for the 2 peaks.
This file contains 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
setup: function() { | |
// code to run on startup | |
$W.calibrate($W.spectrum_id,prompt("Enter pixel position A, counting from the left:"),prompt("Enter wavelength at pixel position A:"),prompt("Enter pixel position B, counting from the left:"),prompt("Enter wavelength at pixel position A:")) | |
}, | |
draw: function() { | |
// code to run every frame | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment