Skip to content

Setting stretch as a string is problematic if the stretch requires a parameter #27

Closed
@mwcraig

Description

@mwcraig

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:

  1. add some more public properties that correspond to the settings for these stretches
  2. make a method set_stretch instead that allows optional parameters, and a get_stretch
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions