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
Do we have direct support for logscale colormaps support? The chlorophyll colormaps used in modis. Viirs, amd other ocean color missions are generally logscale.
As far as I remember VisAD has this support?
Kindly correct me.
It's about bringing this functionality into mcidas-v GUI.
Any thoughts on this?
There's no way currently through the Color Table Editor to do a logarithmic stretch. This is a part of Inquiry 1153. In the past we've suggested the following approaches to users looking to do a logarithmic stretch:
Display the log of the data. In this case, the color table will be logarithmic to match the data values. Here's a function you could try:
def logData(data):
# replace any zero data values with NaN
missData = setToMissing(data,0)
# run log function on setToMissing output
lData = log(missData)
return lData
In this function, values of 0 are set to "missing" so the enhancement stretches from the true min to max values of the output data object.
You can approximate a logarithmic stretch using piecewise linear stretching. You would just need to make sure you have enough breakpoints at the correct locations to make things look correct.
I'm not overly familiar with standalone VisAD, but from what I've seen it looks like you can manually build a color table with log-spaced entries, but this isn't built into McIDAS-V's Color Table Editor.
There is a concept of function in VisAD basecolorcontrol class which can be used to implement this functionality. Only UI part is missing in mcidas-v
We can add an optional in UI for logscale and supply log function to set colorcontrol accordingly.
Activity
rmcarp commentedon Aug 13, 2025
Hi Ghansham,
There's no way currently through the Color Table Editor to do a logarithmic stretch. This is a part of Inquiry 1153. In the past we've suggested the following approaches to users looking to do a logarithmic stretch:
In this function, values of 0 are set to "missing" so the enhancement stretches from the true min to max values of the output data object.
I'm not overly familiar with standalone VisAD, but from what I've seen it looks like you can manually build a color table with log-spaced entries, but this isn't built into McIDAS-V's Color Table Editor.
Thanks,
Bob
ghansham commentedon Aug 14, 2025
Okay Sir. Thanks
ghansham commentedon Aug 14, 2025
https://github.com/visad/visad/blob/master/core/src/visad/BaseColorControl.java
There is a concept of function in VisAD basecolorcontrol class which can be used to implement this functionality. Only UI part is missing in mcidas-v
We can add an optional in UI for logscale and supply log function to set colorcontrol accordingly.
https://github.com/visad/visad/blob/156206052e72eaba306948bb4f9c5a961479a84d/core/src/visad/BaseColorControl.java#L298
Will try if some prototype is demonstrable