Skip to content

Initializing Rainbow with 2D wavelength arrays #249

@gmduvvuri

Description

@gmduvvuri

As currently implemented, it is not possible to initialize a Rainbow with a 2D wavelength array because the initial test of sorting the wavelength parameter acts on the flattened array. My workaround is to initialize the Rainbow using the wavelength axis of the first time element, then populate the .fluxlike["wavelength_2d"] entry, run align_wavelengths(), then work with the newly aligned Rainbow. The advantage to requiring this process is that it incentivizes checking the alignment.

I'm raising this issue to ask whether it is worth allowing a Rainbow to be initialized with a 2D wavelength array to begin with. If yes, then there is a question of whether to implement a 2D test for the wavelength parameter or allow a separate wavelength_2d parameter and run the sort test if wavelength_2D is None (or ... or ...).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions