Export#

class jdaviz.configs.default.plugins.export.export.Export(*args, **kwargs)[source]#

Bases: PluginTemplateMixin, ViewerSelectMixin, SubsetSelectMixin, DatasetMultiSelectMixin, PluginTableSelectMixin, PluginPlotSelectMixin, MultiselectMixin

See the Export Plugin Documentation for more details.

Only the following attributes and methods are available through the public plugin API:

Public constructor

Attributes Summary

data_invalid_msg

A trait for unicode strings.

dataset_format_items

An instance of a Python list.

dataset_format_selected

A trait for unicode strings.

dev_multi_support

A boolean (True, False) trait.

filename_auto

A boolean (True, False) trait.

filename_default

A trait for unicode strings.

filename_invalid_msg

A trait for unicode strings.

filename_value

A trait for unicode strings.

i_end

Mixin to handle empty integer field.

i_start

Mixin to handle empty integer field.

movie_enabled

A boolean (True, False) trait.

movie_fps

Mixin to handle empty floating point field.

movie_interrupt

A boolean (True, False) trait.

movie_recording

A boolean (True, False) trait.

overwrite_warn

A boolean (True, False) trait.

plugin_plot_format_items

An instance of a Python list.

plugin_plot_format_selected

A trait for unicode strings.

plugin_table_format_items

An instance of a Python list.

plugin_table_format_selected

A trait for unicode strings.

subset_format_items

An instance of a Python list.

subset_format_selected

A trait for unicode strings.

subset_invalid_msg

A trait for unicode strings.

template_file

user_api

viewer_format_items

An instance of a Python list.

viewer_format_selected

A trait for unicode strings.

viewer_invalid_msg

A trait for unicode strings.

Methods Summary

export(*args, **kwargs)

save_figure(viewer[, filename, filetype, ...])

save_movie(viewer, filename, filetype[, ...])

Save selected slices as a movie.

save_subset_as_region(selected_subset_label, ...)

Save a subset to file as a Region object in the working directory.

save_subset_as_table(filename)

vue_export_from_ui(*args, **kwargs)

vue_interrupt_recording(*args)

vue_overwrite_from_ui(*args, **kwargs)

Attempt to force writing the output if the user confirms the desire to overwrite.

Attributes Documentation

data_invalid_msg#

A trait for unicode strings.

dataset_format_items#

An instance of a Python list.

dataset_format_selected#

A trait for unicode strings.

dev_multi_support#

A boolean (True, False) trait.

filename_auto#

A boolean (True, False) trait.

filename_default#

A trait for unicode strings.

filename_invalid_msg#

A trait for unicode strings.

filename_value#

A trait for unicode strings.

i_end#

Mixin to handle empty integer field.

i_start#

Mixin to handle empty integer field.

movie_enabled#

A boolean (True, False) trait.

movie_fps#

Mixin to handle empty floating point field.

movie_interrupt#

A boolean (True, False) trait.

movie_recording#

A boolean (True, False) trait.

overwrite_warn#

A boolean (True, False) trait.

plugin_plot_format_items#

An instance of a Python list.

plugin_plot_format_selected#

A trait for unicode strings.

plugin_table_format_items#

An instance of a Python list.

plugin_table_format_selected#

A trait for unicode strings.

subset_format_items#

An instance of a Python list.

subset_format_selected#

A trait for unicode strings.

subset_invalid_msg#

A trait for unicode strings.

template_file = ('/home/docs/checkouts/readthedocs.org/user_builds/jdaviz/envs/latest/lib/python3.11/site-packages/jdaviz/configs/default/plugins/export/export.py', 'export.vue')#
user_api#
viewer_format_items#

An instance of a Python list.

viewer_format_selected#

A trait for unicode strings.

viewer_invalid_msg#

A trait for unicode strings.

Methods Documentation

export(*args, **kwargs)#
save_figure(viewer, filename=None, filetype='png', show_dialog=False)[source]#
save_movie(viewer, filename, filetype, i_start=None, i_end=None, fps=None, rm_temp_files=True)[source]#

Save selected slices as a movie.

This method creates a PNG file per frame (._cubeviz_movie_frame_<n>.png) in the working directory before stitching all the frames into a movie. Please make sure you have sufficient memory for this operation. PNG files are deleted after the movie is created unless otherwise specified. If another PNG file with the same name already exists, it will be silently replaced.

Parameters:
i_start, i_endint or None

Slices to record; each slice will be a frame in the movie. If not given, it is obtained from plugin inputs. Unlike Python indexing, i_end is inclusive. Wrapping and reverse indexing are not supported.

fpsfloat or None

Frame rate in frames per second (FPS). If not given, it is obtained from plugin inputs.

filenamestr or None

Filename for the movie to be recorded. Include path if necessary. If not given, it is obtained from plugin inputs. If another file with the same name already exists, it will be silently replaced.

filetype{‘mp4’, None}

Currently only MPEG-4 is supported. This keyword is reserved for future support of other format(s).

rm_temp_filesbool

Remove temporary PNG files after movie creation. Default is True.

Returns:
out_filenamestr

The absolute path to the actual output file.

save_subset_as_region(selected_subset_label, filename)[source]#

Save a subset to file as a Region object in the working directory. Currently only enabled for non-composite spatial subsets. Can be saved as a .fits or .reg file. If link type is currently set to ‘pixel’, then a pixel region will be saved. If link type is ‘wcs’, then a sky region will be saved. If a file with the same name already exists in the working directory, it will be overwriten.

save_subset_as_table(filename)[source]#
vue_export_from_ui(*args, **kwargs)[source]#
vue_interrupt_recording(*args)[source]#
vue_overwrite_from_ui(*args, **kwargs)[source]#

Attempt to force writing the output if the user confirms the desire to overwrite.