I updated t_colorSpectrum to use display objects and displayGet. I think I figured out the isetbio approved way of doing gamma correction for the displayed image, but since I was pretty much guessing it would be worth your having a quick look at that section. Particularly check the comments. Note that comment about a unit convention difference for spectra between isetbio and PTB. At least I think I guessed correctly the convention used in isetbio.
The PTB convention is worse, I think, but is so deeply woven into all PTB calculations that it shouldn't be changed. It is mainly something to be aware of when importing spectral data from PTB-land, and can be handled at import time.
RTB3 uses the same convention as isetbio, because that is what the renderers use. We have import functions there that bring data in from PTB and handle the conversion, and this seems to work fine.
Looks good. I edited the script to make the spectrum look (a little) nicer. Added some comments here and there. But what you did was very good, or, as you say, fine.
I updated t_colorSpectrum to use display objects and displayGet. I think I figured out the isetbio approved way of doing gamma correction for the displayed image, but since I was pretty much guessing it would be worth your having a quick look at that section. Particularly check the comments. Note that comment about a unit convention difference for spectra between isetbio and PTB. At least I think I guessed correctly the convention used in isetbio.
The PTB convention is worse, I think, but is so deeply woven into all PTB calculations that it shouldn't be changed. It is mainly something to be aware of when importing spectral data from PTB-land, and can be handled at import time.
RTB3 uses the same convention as isetbio, because that is what the renderers use. We have import functions there that bring data in from PTB and handle the conversion, and this seems to work fine.