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
While setting the stretch using a string (e.g. viewer.stretch = 'sqrt') is very convenient, saome stretches require parameters (e.g. PowerStretch) and many have optional parameters (e.g. AsinhStretch).
I don't see a way to handle that without one of these:
add some more public properties that correspond to the settings for these stretches
make a method set_stretch instead that allows optional parameters, and a get_stretch
Allow stretch to be set to either a string or an astropy stretch object.
Of these, 1 seems confusing, 2 is straightforward, 3 is maybe more convenient in many cases.
The text was updated successfully, but these errors were encountered:
mwcraig
added
question
Further information is requested
API
Issues that relate to the API itself rather than implementations
labels
Jul 17, 2021
Actually, the original implementation called for an Astropy stretch to be the value, I think it was turned into a string to get ginga working quickly, maybe?
2 and 3 are basically the same solution, but just a matter of preferring method over attribute setter, or vice versa.
👎 on disallowing string for Ginga though. I don't see the point to have to manually build an astropy.visualization object when I can just pass in a string to it.
👎 on disallowing string for Ginga though. I don't see the point to have to manually build an astropy.visualization object when I can just pass in a string to it.
While setting the stretch using a string (e.g.
viewer.stretch = 'sqrt'
) is very convenient, saome stretches require parameters (e.g. PowerStretch) and many have optional parameters (e.g. AsinhStretch).I don't see a way to handle that without one of these:
set_stretch
instead that allows optional parameters, and aget_stretch
stretch
to be set to either a string or an astropy stretch object.Of these, 1 seems confusing, 2 is straightforward, 3 is maybe more convenient in many cases.
The text was updated successfully, but these errors were encountered: