CARTAvis / carta-python

CARTA scripting wrapper written in Python
GNU General Public License v3.0
0 stars 0 forks source link

validate value range of the bias and contrast in Image.set_colormap() #59

Open kswang1029 opened 1 year ago

kswang1029 commented 1 year ago

The GUI limits bias in [-1, +1] and contrast in [0, +2]. Shall we also validate the range too? The frontend actually can accept values outside those ranges though.

confluence commented 1 year ago

Good question. I would be inclined to allow any value if any value is actually accepted -- there are some other cases in which we allow the user to do something that is not exposed in the GUI, for example if something can be an arbitrary HTML colour the GUI doesn't allow transparency in the picker, but we can set an RGBA value through the scripting UI and I think that's fine.

Are bias / contrast values outside these ranges invalid, or are they just not "sensible"?