In [12]:
%matplotlib widget
In [1]:
%load_ext lab_black
In [2]:
import matplotlib.pyplot as plt
In [3]:
from pyuvis import QUBE, FUV_PDS
In [17]:
lbl = "/Users/klay6683/Dropbox/data/uvis/EUV2009_173_15_16.LBL"
In [18]:
qube = QUBE(lbl)
In [19]:
import xarray as xr
In [20]:
xarr = xr.DataArray(
qube.data,
dims=["spectral", "spatial", "samples"],
coords={"spectral": qube.waves},
)
In [21]:
plt.figure()
plt.imshow(qube.data[..., 0], aspect="auto")
Out[21]:
In [9]:
xarr
Out[9]:
In [10]:
import hvplot.xarray
In [11]:
xarr.hvplot()
Out[11]:
In [19]:
from astropy import units as u
In [30]:
np.linspace(qube.wave_min.value, qube.wave_max.value, qube.shape[0])
Out[30]:
In [29]:
qube.shape[0]
Out[29]:
In [25]:
from astropy.units import QuantityIterator
In [18]:
xarr
Out[18]:
In [14]:
def show_slice(i):
im = plt.imshow(qube.data[i], aspect="auto", interpolation="nearest")
plt.colorbar(im, ax=plt.gca())
interactive(show_slice, i=(0, qube.shape[0]))
The preview data from the UVIS data catalog seems to be often the mean value over the bands, at least I could match the preview images quite often. Just for your data file, it does not make sense yet, but maybe because of the missing binning implementation.
In [33]:
plt.imshow(qube.data.mean(axis=0), aspect='auto', interpolation='nearest',
cmap=plt.cm.rainbow)
Out[33]:
In [34]:
qube.line_range
Out[34]:
In [35]:
qube.band_range
Out[35]:
In [36]:
qube.data1D
Out[36]:
In [37]:
qube.data.shape
Out[37]:
In [ ]:
qube