Closed ejeschke closed 1 year ago
Default behavior is unchanged because all "reset" preferences are False
by default.
Screenshot of the changes to Preferences
plugin:
Note to self: need to update Preferences screenshot, add notes in user manual
New preferences screenshot:
Now the sections are in the order the items are applied: reset, remember, new/auto
@pllim, do you want to have a look at this? If you want to mostly review the documentation, take a look at the docstring for the Preferences
plugin.
Quick explanation from the doc:
As an example of using the Reset and Remember settings, suppose that you frequently use the contrast adjustment. You would like the contrast that you set with a particular image to be restored when that image is viewed again. However, when you view a new image, you would like the contrast to start out at some normal setting.
To accomplish this, manually reset the contrast to the desired default setting. Check “Reset Contrast” and then press “Update Viewer Profile”. Finally, check “Remember Contrast”. Click “Save Settings” to make the channel settings persistent.
There is no change from the regular behavior if you don't check any of the "Reset" or "Remember" settings.
Thanks! Seems useful.
Some of the screenshots not really changing but getting larger in file size; is that really necessary?
I can try to make them smaller. My display is 4K and there is a stretch factor that is applied in the OS to make applications not look so tiny (because the pixels are really tiny on a desktop-sized 4K display). This results in a larger screenshot because a given GUI feature actually takes more pixels. Rescaling down usually makes the screenshots look worse, so my only alternative is trying to find an old display (increasingly difficult, these days) or running the application in a VNC window.
Also, it is not clear from the docs where this preference file is saved; somewhere in
~/.ginga
? I guess the saved preferences will be invalid when user renames or moves the file afterwards, so eventually they might want to clear all the outdated saved preferences?
Yes, this doesn't change the name or location of the settings files--$HOME/.ginga (or $GINGAHOME if the user wants a custom location). It's just the normal "channel
Existing comment: "If "Save Settings" is pressed, it will save the settings to the user's home Ginga folder so that when a channel with the same name is created in future Ginga sessions it will obtain the same settings."
Suggested edit: "If "Save Settings" is pressed, it will save the settings to the user's $HOME/.ginga folder (a "channel_NAME.cfg" file for each channel NAME) so that when a channel with the same name is created in future Ginga sessions it will obtain the same settings."
Sound ok?
@pllim, what do you think of the sizes in the doc now?
I used the width attribute for the figures to make it similar in size to the old figures.
Figures look good over at https://ginga--1040.org.readthedocs.build/en/1040/manual/plugins_local/preferences.html . Thanks!
Thanks for the review, @pllim!
This adds a feature called a "default viewer profile" to the ginga viewer widget. Using this, the viewer can be optionally reset to some default settings between images. This can be effectively used with the "remember" settings to have the viewer automatically recall the exact way an image was viewed previously (when viewed again), but have the settings restored to some reasonable default when viewing a new image. The default viewer profile is considered to be the state of the viewer just after creation and initializing with any saved settings.
This also separates out the color distribution algorithm and contrast settings as "remember-able" and "default settable" items separate from the color map settings.
The way the settings are applied when changing to an image is as follows: