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.basic_bokeh_plot(ctd_data, print_plot=False, output_name='', output_directory='', metadata=True, show_plot=True, y_axis_params=['pressure', 'depth'], config_path='vis_config.toml')[source]

Create a .html plot for a CTD cast.

Parameters:
  • ctd_data (Path | str | Dataset) – The data to operate on

  • print_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 axis

  • config_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='', 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 files

  • output_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