ejeschke / ginga

The Ginga astronomical FITS file viewer
BSD 3-Clause "New" or "Revised" License
120 stars 77 forks source link

Add contrast and brightness controls to Preferences #1047

Closed ejeschke closed 1 year ago

ejeschke commented 1 year ago

This adds contrast and brightness (bias) sliders to the channel preferences, offering another way to set these values that may be more intuitive for some users.

This also changes the ginga.RGBMap object to remove the shift_array and color_array preferences. These are now replaced by color_map_invert, color_map_rot_pct, contrast and brightness. The former were array values and the latter are scalars; this makes the channel settings file a little easier to read and parse. This is backward incompatible from an API standpoint to the RGBMap object with regard to these arrays. However, it removes some problematic issues with managing color preferences.

For end users, the effect is simply that an old channel settings file will not load any saved contrast, inverted or rotated color settings. Once they save any channel settings again the new keywords will be saved and take effect on the next restart.

ejeschke commented 1 year ago

@pllim, when you get a chance, try out this PR and checkout the differences in the channel settings (Preferences plugin). Let me know what you think.

ejeschke commented 1 year ago

@pllim, would you have a chance to check this before SciPy? I'd like to include this merge this into dev for a v5.0.0 release this fall. Perhaps we can discuss that release at the conference.

pllim commented 1 year ago

Sorry, it's on my queue but things keep popping up. I'll bump this up for next week.

ejeschke commented 1 year ago

Rebased on top of latest release

ejeschke commented 1 year ago

Thank you, @pllim!