kuwisdelu / Cardinal

Mass spectrometry imaging toolbox
http://www.cardinalmsi.org
Artistic License 2.0
42 stars 14 forks source link

error when plotting image of reference ion after normalization (method="reference") #19

Closed MASHUOA closed 3 years ago

MASHUOA commented 3 years ago

Hello, An error occurred when trying to plot the ref ion image after normalization using the "reference" method.

Error in image.default(1, vals, t(as.matrix(vals)), col = col, xaxt = "n", : increasing 'x' and 'y' values expected

A possible reason is that the normalization creates a reference ion vector with the same value. And the color scale failed to create a color range pallet for this.

range(imdata_ed@imageData$data$intensity[ref_ion,])

c(1,1)

For a null feature, the vector may only contain the zero value which can be treated as a blank ion image.

MASHUOA commented 3 years ago

an identical issue with the #12