Using Mosviz in a Jupyter Notebook¶
To initialize an instance of the Mosviz app in a Jupyter notebook, simply run the following code in a cell of the notebook:
>>> from jdaviz import MosViz >>> mosviz = MosViz() >>> mosviz.app
After running the code above, you can interact with the Mosviz application from
subsequent notebook cells via the API methods attached to the
for example loading data into the app as described in Import Data.
- Cubeviz data export
Cubeviz documentation on data exporting.
MosViz helper class can be used similarly to how
cubeviz is used in the previous link.
The viewers in
mosviz that can be used that way are
It is also possible to extract the contents of the table viewer via:
Which will save the data from the
mosviz table into a csv file named
filename. If the
selected parameter is set to
True, only the checked
rows in the table will be output. A previous csv file of the same name can
be overwritten by setting the
overwrite parameter to
The contents of
table-viewer can also be extracted to a notebook cell by
running the following: