ExportViewer#
- class jdaviz.configs.default.plugins.export_plot.export_plot.ExportViewer(*args, **kwargs)[source]#
Bases:
PluginTemplateMixin
,ViewerSelectMixin
See the Export Plot Plugin Documentation for more details.
Only the following attributes and methods are available through the public plugin API:
viewer
(ViewerSelect
): Viewer to select for exporting the figure image.save_movie()
(Cubeviz only)i_start
(Cubeviz only)i_end
(Cubeviz only)movie_fps
(Cubeviz only)movie_filename
(Cubeviz only)
Public constructor
Attributes Summary
Mixin to handle empty integer field.
Mixin to handle empty integer field.
A trait which allows any value.
Mixin to handle empty floating point field.
A boolean (True, False) trait.
A trait for unicode strings.
A boolean (True, False) trait.
Methods Summary
save_figure
([filename, filetype])Save the figure to an image with a provided filename or through an interactive save dialog.
save_movie
([i_start, i_end, fps, filename, ...])Save selected slices as a movie.
vue_interrupt_recording
(*args)vue_save_figure
(filetype)Callback for save figure events in the front end viewer toolbars.
vue_save_movie
(filetype)Callback for save movie events in the front end viewer toolbars.
Attributes Documentation
- i_end#
Mixin to handle empty integer field.
- i_start#
Mixin to handle empty integer field.
- movie_filename#
A trait which allows any value.
- movie_fps#
Mixin to handle empty floating point field.
- movie_interrupt#
A boolean (True, False) trait.
- movie_msg#
A trait for unicode strings.
- movie_recording#
A boolean (True, False) trait.
- template_file = ('/home/docs/checkouts/readthedocs.org/user_builds/jdaviz/envs/v3.6.2/lib/python3.11/site-packages/jdaviz/configs/default/plugins/export_plot/export_plot.py', 'export_plot.vue')#
- user_api#
Methods Documentation
- save_figure(filename=None, filetype=None)[source]#
Save the figure to an image with a provided filename or through an interactive save dialog.
If
filetype
is ‘png’ (or defaults to ‘png’ based onfilename
), the interactive save dialog will be bypassed (this is not supported for ‘svg’).
- save_movie(i_start=None, i_end=None, fps=None, filename=None, filetype=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
.
- i_start, i_endint or
- Returns:
- out_filenamestr
The absolute path to the actual output file.