zkbt / chromatic

Tools for visualizing spectrosopic light curves, with flux as a function of wavelength and time.
MIT License
14 stars 4 forks source link

Successfully bin NRES spectra #113

Closed will-waalkes closed 2 years ago

will-waalkes commented 2 years ago

NRES echelle spectra are having difficulty being binned. They can either be binned or have their wavelengths aligned, but not both. If both are attempted, in either order, the following error is returned:

`--------------------------------------------------------------------------- AttributeError Traceback (most recent call last)

in ----> 1 _a = a.align_wavelengths() ~/Desktop/PhD_Thesis/chromatic/chromatic/rainbows/actions/align_wavelengths.py in align_wavelengths(self, **kw) 130 131 # create a shared wavelength array --> 132 shared_wavelengths = self._create_shared_wavelength_axis(**kw) 133 134 # bin the rainbow onto that new grid, starting from 2D wavelengths ~/Desktop/PhD_Thesis/chromatic/chromatic/rainbows/actions/align_wavelengths.py in _create_shared_wavelength_axis(rainbow, wscale, supersampling, visualize) 60 plt.tight_layout() 61 ---> 62 min_w, max_w = np.nanmin(w).to("micron").value, np.nanmax(w).to("micron").value 63 if wscale == "linear": 64 dw = np.nanmedian(dw_per_time).to("micron").value / supersampling AttributeError: 'numpy.float64' object has no attribute 'to'`
zkbt commented 2 years ago

Closed by #117