TableMixin#

class jdaviz.core.template_mixin.TableMixin(**kwargs: Any)[source]#

Bases: VuetifyTemplate, HubListener

Table subcomponent mixin.

In addition to table, this provides the following methods at the plugin-level:

To render in the plugin’s vue file:

<jupyter-widget :widget="table_widget"></jupyter-widget>

Public constructor

Attributes Summary

table_widget

A trait for unicode strings.

Methods Summary

clear_table()

Clear all entries/markers from the current table.

export_table([filename])

Export the QTable representation of the table.

select_all()

Select all rows in table.

select_none()

Deselect all rows in table.

select_rows(rows)

Select rows from the current table by index, indices, or slice.

vue_clear_table([data])

Attributes Documentation

table_widget#

A trait for unicode strings.

Methods Documentation

clear_table()[source]#

Clear all entries/markers from the current table.

export_table(filename=None, **kwargs)[source]#

Export the QTable representation of the table.

Parameters:
filenamestr, optional

If provided, will write to the file, otherwise will just return the QTable object.

formatstr, optional

The format to write the table in. If not provided, will be inferred from the filename extension. See astropy.table.Table.write for supported formats.

overwritebool, optional

If filename already exists, should it be overwritten.

Returns:
out_tblastropy.table.Table

The table object that was written to file or the current table if no filename was provided.

select_all()[source]#

Select all rows in table.

select_none()[source]#

Deselect all rows in table.

select_rows(rows)[source]#

Select rows from the current table by index, indices, or slice.

Parameters:
rowsint, list of int, slice, or tuple of slice

The rows to select. This can be: - An integer specifying a single row index. - A list of integers specifying multiple row indices. - A slice object specifying a range of rows. - A tuple of slices (e.g using numpy slice)

vue_clear_table(data=None)[source]#