Skip to content

SpectralRegion extract not calculating the indices correctly #287

@brechmos-stsci

Description

@brechmos-stsci

Unfortunately, I introduced a bug into SpectralRegion in the to_pixel() method. Currently the line is:

left_index = int(np.ceil(spectrum.wcs.world_to_pixel(np.array(self._lower))))

but the np.array() strips the units off the self._lower which is not a good thing. It likely should be wrapped as a list rather than np.array().
Looking into it.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions