ctdam.vis.visualize module¶
- ctdam.vis.visualize.check_and_create_path(dir)[source]¶
Create given directory path if not found.
- Parameters:
dir (
Path|str) – Path to target directory
- ctdam.vis.visualize.cruise_plots(directory='', output_directory='html', output_name='main.html', embed_contents=False, html_title='', overwrite=False, no_new_plots=False, size_limit=10, filter='', show_html=True, config_path='vis_config.toml', file_type='cnv')[source]¶
Run basic_bokeh_plot and create_main_html and handle inputs.
- Parameters:
directory (
Path|str) – The directory to look for data files to plot (Default value = “”)output_directory (
Path|str) – The directory to save .html file to (Default value = “html”)output_name (
str) – The name of the main html file (Default value = “main.html”)embed_contents (
bool) – Whether to embed plot htmls into main html (Default value = False)html_title (
str) – The header of the main html (Default value = “”)overwrite (
bool) – Whether to overwrite an existing main html (Default value = False)no_new_plots (
bool) – Whether to not overwrite existing plot htmls (Default value = False)size_limit (
int) – Data file size limit in MB (Default value = 10)filter (
str) – A search filter for files (Default value = “”)show_html (
bool) – Whether to open main html in browser (Default value = True)config_path (
Path|str) – The path to vis configuration info (Default value = “vis_config.toml”)file_type (
str) – The file type to search for (Default value = “cnv”)
- Return type:
Path|None
- ctdam.vis.visualize.basic_bokeh_plot(ctd_data, print_plot=False, output_name='', output_directory='', metadata=True, show_plot=True, y_axis_params=['prDM', 'depSM'], config_path='vis_config.toml')[source]¶
Create a .html plot for a CTD cast.
- Parameters:
ctd_data (
CTDData|CnvFile|Path|str) – The data to operate onprint_plot (
bool) – Whether to save the plot to disk (Default value = False)output_name (
str) – The name of the output file (Default value = “”)output_directory (
Path|str) – The directory to store the output file in (Default value = “”)metadata (
bool) – Whether to save metadata in the file (Default value = True)show_plot (
bool) – Whether to open the plot in a browser (Default value = True)y_axis_params (
list[str]) – Possible parameters for the y axisconfig_path (
Path|str) – The path to the config file (Default value = “vis_config.toml”)
- ctdam.vis.visualize.create_main_html(directory_path, output_name='main_plots.html', output_directory='', embed_contents=True, title='', show_html=True)[source]¶
Assemble a main .html file that stores all individual .html plots.
Does also allow to interactively change plotting parameters and the seamless selection of plots.
- Parameters:
directory_path (
Path|str) – The path to the .html plot filesoutput_name (
str) – The name of the main .html file (Default value = “main_plots.html”)output_directory (
Path|str) – The directory to write the main .html file to (Default value = “”)embed_contents (
bool) – Whether to embed the .html plots into the main html file (Default value = True)title (
str) – The title of the main file (Default value = “”)show_html (
bool) – Whether to open the main .html in a browser (Default value = True)
- Return type:
Path|None