Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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.
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
You can’t perform that action at this time.