You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@Stoft1 has suggested strongly that we make native data storage match original data, which would be 8-bit, 0-255. That'd mean removing the scaling from those lines, and from the matching encodeJSON code at:
sigFigIntensity: 4,// since image channel data is 0-255, or 000.4-100.0
On SpectralWorkbench.org, lots of data is stored scaled (not 8-bit). So we'd want to have an easy converter in case people want to compare across.
Update:
we can create an attribute called spectrum.native8bit which is set to true for all data that does this, so that legacy data will not have this default.
we can make a spectrum.scaleData() method which checks for spectrum.native8bit and scales data if it is not true.
The text was updated successfully, but these errors were encountered:
Currently, we use the expression
parseInt(line[1] / 2.55)/100
to save image data, which scales it to 0-100%.In JSON:
spectral-workbench.js/src/SpectralWorkbench.Spectrum.js
Lines 106 to 110 in ef52eac
and from arrays:
spectral-workbench.js/src/SpectralWorkbench.Spectrum.js
Lines 63 to 66 in ef52eac
@Stoft1 has suggested strongly that we make native data storage match original data, which would be 8-bit, 0-255. That'd mean removing the scaling from those lines, and from the matching
encodeJSON
code at:spectral-workbench.js/src/SpectralWorkbench.Spectrum.js
Lines 131 to 134 in ef52eac
Tests would then have to be refactored to look for values in 0-255. We could stick to integer values in
sigFigIntensity
at:spectral-workbench.js/src/SpectralWorkbench.Spectrum.js
Line 4 in ef52eac
On SpectralWorkbench.org, lots of data is stored scaled (not 8-bit). So we'd want to have an easy converter in case people want to compare across.
Update:
spectrum.native8bit
which is set totrue
for all data that does this, so that legacy data will not have this default.spectrum.scaleData()
method which checks forspectrum.native8bit
and scales data if it is not true.The text was updated successfully, but these errors were encountered: