Exporting data from Mosviz#

Note

This is the config-specific version of documentation and is deprecated. See the general documentation for the most up-to-date information.

Initialize an instance of the Mosviz app in a Jupyter notebook using the following code:

from jdaviz import Mosviz
mosviz = Mosviz()
# If solely using the Mosviz API, feel free to comment out the following line.
mosviz.show()

After running the code above, you can interact with the Mosviz application from subsequent notebook cells via the API methods attached to the Mosviz object, for example loading data into the app as described in Importing Data into Mosviz.

The Mosviz helper class can be used similarly to how Cubeviz is used in Exporting Data from Cubeviz. The viewers in Mosviz that can be used that way are image-viewer, spectrum-viewer, and spectrum-2d-viewer.

See also

Cubeviz data export

Cubeviz documentation on data exporting.

It is also possible to extract the contents of the table viewer using to_csv:

mosviz.to_csv(filename="MOS_data.csv", selected=False)

which will save the data from the Mosviz table into the given CSV filename. If the selected keyword 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 keyword to True. The contents of table-viewer can also be extracted to a notebook cell by running to_table():

mosviz.to_table()