casys.visualization.diagnostics

Diagnostics visualization sub-modules.

Classes

Binned2dPlot(name, field_x, field_y, data, stat)

Plot class representing a non-geographical binned statistic with two dimensions, with a color mesh plot.

Binned2dCurvePlot(name, field_x, field_y, ...)

Plot class representing a non-geographical binned statistic with two dimensions, with a set of curves.

Binned2dBox3dPlot(name, field_x, field_y, ...)

Plot class representing a non-geographical binned statistic with two dimensions, with a color box 3d plot.

Binned2dSurfacePlot(name, field_x, field_y, ...)

Plot class representing a non-geographical binned statistic with two dimensions, with a surface color mesh 3d plot.

BinnedPlot(name, field_x, field_y, data, stat)

Plot class representing a non-geographical box statistic.

GeoBoxPlot(name, field_x, field_y, data, stat)

Plot class representing a geographical box statistic.

HistoPlot(name, field_x, field_y, data, stat)

Plot class representing a histogram statistic.

ScatterPlot(name, field_x, field_y, data, stat)

Plot class representing a scatter statistic.

TimePlot(name, field_x, field_y, data, stat)

Plot class representing a time statistic.

CrossoverPlot(name, field_x, field_y, data, stat)

Plot class representing crossover data.

EditingRawPlot(name, field_x, field_y, data, ...)

Plot class representing editing data.

EditingTimePlot(name, field_x, field_y, ...)

Plot class representing an editing data.

MissingPointsRawPlot(name, field_x, field_y, ...)

Plot class representing missing points data.

MissingPointsTimePlot(name, field_x, ...[, ...])

Plot class representing a time statistic.

PlotContainer(name, field_x, field_y, data, stat)

Abstract class representing plot associated to statistics and raw data.

RawPlot(name, field_x, field_y, data, stat)

Plot class representing a raw data.

RawComparisonPlot(name, field_x, field_y, ...)

Plot class representing a raw comparison data.

RawComparisonPlot3DSurface(name, field_x, ...)

Plot class representing a raw comparison data.

RawComparisonPlot3DScatter(name, field_x, ...)

Plot class representing a raw comparison data.

RawPlot3DSurface(name, field_x, field_y, ...)

Plot class representing a raw data as a surface in 3D.

RawPlot3DScatter(name, field_x, field_y, ...)

Plot class representing a raw data as scatter in 3D.

SectionPlot(name, field_x, field_y, data, stat)

Plot class representing section analyses data.

SpectralAnalysisIndividualPsdPlot(name, ...)

Plot class representing a multiple PSD Plot for SpectralAnalysisDiag.

SpectralAnalysisPsdPlot(name, field_x, ...)

Plot class representing a merged PSD Plot for SpectralAnalysisDiag.

SpectralAnalysisSegmentPlot(name, field_x, ...)

Plot class representing segments of a spectral analysis.

class casys.visualization.diagnostics.Binned2dBox3dPlot(name, field_x, field_y, data, stat, orf=None, template=<factory>, field_z=None)

Bases: Binned2dSurfacePlot

Plot class representing a non-geographical binned statistic with two dimensions, with a color box 3d plot.

Parameters:
  • name (str) – Name of the data.

  • field_x (Field) – Field used for x axes.

  • field_y (Field) – Field used for y axes.

  • data (xr.Dataset) – Data as a dataset.

  • stat (StatType) – Statistic included in this data.

  • orf (ong_indexer.PassIndexer | None) – Orf used to read data

  • template (PlotTemplate) – Parameters template to use.

  • field_z (Field) – Field used for z axes.

add_color_bar(*, params)
Parameters:

params (AxeParams)

add_event(*, event)
Parameters:

event (CasysEvent) – Event to add.

add_hist_bar(params)
Parameters:

params (AxeParams)

add_plot(container, shared_ax)
Parameters:
add_stat_bar(*, params)
Parameters:

params (AxeParams)

add_stat_graph(*, params)
Parameters:

params (AxeParams)

add_ticks_space(*, space, position)

Add ticks space at the given position.

Parameters:
  • space (float) – Space to add.

  • position (Position) – Position where to add space.

add_watermark(params)
Parameters:

params (WatermarkParams)

adjust_coordinates(longitude, latitude)

Adjust plots longitudes and latitudes coordinates.

Parameters:
  • longitude (float) – Value to add.

  • latitude (float) – Value to add.

ax: mpl_axes_t.Axes | carto_geo_ax_t.GeoAxes = None
property axis_fields: dict[str, str]

Dictionary of axis fields (x, y, and z) with their field name.

classmethod can_add_hist_bar()

Whether this class allow the addition of a hist_graph element or not.

Return type:

bool

Returns:

True or False.

classmethod can_add_stat_graph(for_axis)

Whether this class allow the addition of a stat_graph element for a specific axis or not.

Parameters:

for_axis (TargetAxisType) – Axis (x, y or z)

Return type:

bool

Returns:

True or False.

can_merge_with(plot)

Test whether this class can be merged with the provided container.

Parameters:

plot (PlotContainer) – PlotContainer to merge.

Return type:

bool

Returns:

True if mergeable, False otherwise.

compute_plot_params(x=None, y=None, z=None)

Compute the plot parameters (required for discretized color maps).

Parameters:
Returns:

Computed plot parameters.

computed_color_bar(data)

Compute the color bar (required for discretized color maps).

Parameters:

data (ndarray) – Data to be drawn.

Return type:

AxeParams

Returns:

Computed color map.

data: xr.Dataset
data_used: xr.Dataset = None
draw(*, fig_handler=None, ax_type=MAIN)

Draw the provided container’s data.

Parameters:
  • fig_handler (FigureHandler) – Figure handler on which to draw.

  • ax_type (AxeType) – Axe’s type on which to draw.

property field: Field

Field of the main variable represented by this data.

field_x: Field
field_y: Field
field_z: Field = None
property fig_handler: FigureHandler
classmethod get_class(dtype)
Parameters:

dtype (DataType)

Return type:

type[PlotContainer]

init_figure(interactive=False)

Initialize a figure.

Parameters:

interactive (bool) – Whether to use an interactive (pyplot figure or not)

initialize(reset=True)

Initialize this container.

Parameters:

reset (bool) – Whether to reset the plot to its initial parameters or not (default to true).

is_drawn: bool = False
name: str
orf: ong_indexer.PassIndexer | None = None
classmethod register()

Register a virtual subclass of an ABC.

Returns the subclass, to allow usage as a class decorator.

remove_events()

Remove all events from this plot.

set_data_params(params)

Change the plot’s data parameters.

Parameters:

params (DataParams) – Plot’s data parameters.

set_data_transform(*, transform)

Update the data center value.

Parameters:

transform (Union[str, int, float, Callable, None]) – Value, clip like str or function to use on the plot data.

set_element_params(element, params)

Change the element parameters.

Parameters:
set_legend(label)
Parameters:

label (str)

set_new_data(data)

Change the data used for the plot.

Parameters:

data (Dataset) – New data to use.

set_plot_params(params)

Change the plot’s visualization parameters.

Parameters:

params (PlotParams) – Plot’s visualization parameters.

set_size(*, width, height)

Set the figure size.

Parameters:
  • width (float) – Width of the figure.

  • height (float) – Height of the figure.

set_text_params(params)

Change the text parameters and refresh it.

Parameters:

params (TextParams) – Text parameters.

set_text_size(size, elements)
Parameters:
set_ticks(*, axt, fmt, params=None)

Change ticks labels on specified axis.

Parameters:
  • axt (AxisType) – Axis on which to change the ticks.

  • fmt (CyclePassFmt | None) – Cycle / pass format to display (‘C’, ‘P’ or ‘CP’) if not None.

  • params (AxeParams) – axe parameters.

set_title(title)
Parameters:

title (str)

set_xlabel(label)
Parameters:

label (str)

set_ylabel(label)
Parameters:

label (str)

stat: StatType
property stype: DataType

PlotContainer type.

template: PlotTemplate
vador_plots()

Generate a list of vador plots for this container.

Return type:

list[Operation]

Returns:

List of vador plots.

property variable: str

Name of the main variable represented by this data.

class casys.visualization.diagnostics.Binned2dCurvePlot(name, field_x, field_y, data, stat, orf=None, template=<factory>, field_z=None, res_x=None, res_y=None)

Bases: Binned2dPlot

Plot class representing a non-geographical binned statistic with two dimensions, with a set of curves.

Parameters:
  • name (str) – Name of the data.

  • field_x (Field) – Field used for x axes.

  • field_y (Field) – Field used for y axes.

  • data (xr.Dataset) – Data as a dataset.

  • stat (StatType) – Statistic included in this data.

  • orf (ong_indexer.PassIndexer | None) – Orf used to read data

  • template (PlotTemplate) – Parameters template to use.

  • field_z (Field) – Field used for z axes.

  • res_x (DataResolution) – Resolution parameters along x-axis used for the binning

  • res_y (DataResolution) – Resolution parameters along y-axis used for the binning

add_color_bar(*, params)
Parameters:

params (AxeParams)

add_event(*, event)
Parameters:

event (CasysEvent) – Event to add.

add_hist_bar(params)
Parameters:

params (AxeParams)

add_plot(container, shared_ax)
Parameters:
add_stat_bar(*, params)
Parameters:

params (AxeParams)

add_stat_graph(*, params)
Parameters:

params (AxeParams)

add_ticks_space(*, space, position)

Add ticks space at the given position.

Parameters:
  • space (float) – Space to add.

  • position (Position) – Position where to add space.

add_watermark(params)
Parameters:

params (WatermarkParams)

adjust_coordinates(longitude, latitude)

Adjust plots longitudes and latitudes coordinates.

Parameters:
  • longitude (float) – Value to add.

  • latitude (float) – Value to add.

ax: mpl_axes_t.Axes | carto_geo_ax_t.GeoAxes = None
property axis_fields: dict[str, str]

Dictionary of axis fields (x, y, and z) with their field name.

classmethod can_add_hist_bar()

Whether this class allow the addition of a hist_graph element or not.

Return type:

bool

Returns:

True or False.

classmethod can_add_stat_graph(for_axis)

Whether this class allow the addition of a stat_graph element for a specific axis or not.

Parameters:

for_axis (TargetAxisType) – Axis (x, y or z)

Return type:

bool

Returns:

True or False.

can_merge_with(plot)

Test whether this class can be merged with the provided container.

Parameters:

plot (PlotContainer) – PlotContainer to merge.

Return type:

bool

Returns:

True if mergeable, False otherwise.

compute_plot_params(x=None, y=None, z=None)

Compute the plot parameters (required for discretized color maps).

Parameters:
Returns:

Computed plot parameters.

computed_color_bar(data)

Compute the color bar (required for discretized color maps).

Parameters:

data (ndarray) – Data to be drawn.

Return type:

AxeParams

Returns:

Computed color map.

data: xr.Dataset
data_used: xr.Dataset = None
draw(*, fig_handler=None, ax_type=MAIN)

Draw the provided container’s data.

Parameters:
  • fig_handler (FigureHandler) – Figure handler on which to draw.

  • ax_type (AxeType) – Axe’s type on which to draw.

property field: Field

Field of the main variable represented by this data.

field_x: Field
field_y: Field
field_z: Field = None
property fig_handler: FigureHandler
classmethod get_class(dtype)
Parameters:

dtype (DataType)

Return type:

type[PlotContainer]

init_figure(interactive=False)

Initialize a figure.

Parameters:

interactive (bool) – Whether to use an interactive (pyplot figure or not)

initialize(reset=True)

Initialize this container.

Parameters:

reset (bool) – Whether to reset the plot to its initial parameters or not (default to true).

is_drawn: bool = False
name: str
orf: ong_indexer.PassIndexer | None = None
classmethod register()

Register a virtual subclass of an ABC.

Returns the subclass, to allow usage as a class decorator.

remove_events()

Remove all events from this plot.

res_x: DataResolution = None
res_y: DataResolution = None
set_data_params(params)

Change the plot’s data parameters.

Parameters:

params (DataParams) – Plot’s data parameters.

set_data_transform(*, transform)

Update the data center value.

Parameters:

transform (Union[str, int, float, Callable, None]) – Value, clip like str or function to use on the plot data.

set_element_params(element, params)

Change the element parameters.

Parameters:
set_legend(label)
Parameters:

label (str)

set_new_data(data)

Change the data used for the plot.

Parameters:

data (Dataset) – New data to use.

set_plot_params(params)

Change the plot’s visualization parameters.

Parameters:

params (PlotParams) – Plot’s visualization parameters.

set_size(*, width, height)

Set the figure size.

Parameters:
  • width (float) – Width of the figure.

  • height (float) – Height of the figure.

set_text_params(params)

Change the text parameters and refresh it.

Parameters:

params (TextParams) – Text parameters.

set_text_size(size, elements)
Parameters:
set_ticks(*, axt, fmt, params=None)

Change ticks labels on specified axis.

Parameters:
  • axt (AxisType) – Axis on which to change the ticks.

  • fmt (CyclePassFmt | None) – Cycle / pass format to display (‘C’, ‘P’ or ‘CP’) if not None.

  • params (AxeParams) – axe parameters.

set_title(title)
Parameters:

title (str)

set_xlabel(label)
Parameters:

label (str)

set_ylabel(label)
Parameters:

label (str)

stat: StatType
property stype: DataType

PlotContainer type.

template: PlotTemplate
vador_plots()

Generate a list of vador plots for this container.

Return type:

list[Operation]

Returns:

List of vador plots.

property variable: str

Name of the main variable represented by this data.

class casys.visualization.diagnostics.Binned2dPlot(name, field_x, field_y, data, stat, orf=None, template=<factory>, field_z=None)

Bases: CommonBinned2dPlot

Plot class representing a non-geographical binned statistic with two dimensions, with a color mesh plot.

Parameters:
  • name (str) – Name of the data.

  • field_x (Field) – Field used for x axes.

  • field_y (Field) – Field used for y axes.

  • data (xr.Dataset) – Data as a dataset.

  • stat (StatType) – Statistic included in this data.

  • orf (ong_indexer.PassIndexer | None) – Orf used to read data

  • template (PlotTemplate) – Parameters template to use.

  • field_z (Field) – Field used for z axes.

add_color_bar(*, params)
Parameters:

params (AxeParams)

add_event(*, event)
Parameters:

event (CasysEvent) – Event to add.

add_hist_bar(params)
Parameters:

params (AxeParams)

add_plot(container, shared_ax)
Parameters:
add_stat_bar(*, params)
Parameters:

params (AxeParams)

add_stat_graph(*, params)
Parameters:

params (AxeParams)

add_ticks_space(*, space, position)

Add ticks space at the given position.

Parameters:
  • space (float) – Space to add.

  • position (Position) – Position where to add space.

add_watermark(params)
Parameters:

params (WatermarkParams)

adjust_coordinates(longitude, latitude)

Adjust plots longitudes and latitudes coordinates.

Parameters:
  • longitude (float) – Value to add.

  • latitude (float) – Value to add.

ax: mpl_axes_t.Axes | carto_geo_ax_t.GeoAxes = None
property axis_fields: dict[str, str]

Dictionary of axis fields (x, y, and z) with their field name.

classmethod can_add_hist_bar()

Whether this class allow the addition of a hist_graph element or not.

Return type:

bool

Returns:

True or False.

classmethod can_add_stat_graph(for_axis)

Whether this class allow the addition of a stat_graph element for a specific axis or not.

Parameters:

for_axis (TargetAxisType) – Axis (x, y or z)

Return type:

bool

Returns:

True or False.

can_merge_with(plot)

Test whether this class can be merged with the provided container.

Parameters:

plot (PlotContainer) – PlotContainer to merge.

Return type:

bool

Returns:

True if mergeable, False otherwise.

compute_plot_params(x=None, y=None, z=None)

Compute the plot parameters (required for discretized color maps).

Parameters:
Returns:

Computed plot parameters.

computed_color_bar(data)

Compute the color bar (required for discretized color maps).

Parameters:

data (ndarray) – Data to be drawn.

Return type:

AxeParams

Returns:

Computed color map.

data: xr.Dataset
data_used: xr.Dataset = None
draw(*, fig_handler=None, ax_type=MAIN)

Draw the provided container’s data.

Parameters:
  • fig_handler (FigureHandler) – Figure handler on which to draw.

  • ax_type (AxeType) – Axe’s type on which to draw.

property field: Field

Field of the main variable represented by this data.

field_x: Field
field_y: Field
field_z: Field = None
property fig_handler: FigureHandler
classmethod get_class(dtype)
Parameters:

dtype (DataType)

Return type:

type[PlotContainer]

init_figure(interactive=False)

Initialize a figure.

Parameters:

interactive (bool) – Whether to use an interactive (pyplot figure or not)

initialize(reset=True)

Initialize this container.

Parameters:

reset (bool) – Whether to reset the plot to its initial parameters or not (default to true).

is_drawn: bool = False
name: str
orf: ong_indexer.PassIndexer | None = None
classmethod register()

Register a virtual subclass of an ABC.

Returns the subclass, to allow usage as a class decorator.

remove_events()

Remove all events from this plot.

set_data_params(params)

Change the plot’s data parameters.

Parameters:

params (DataParams) – Plot’s data parameters.

set_data_transform(*, transform)

Update the data center value.

Parameters:

transform (Union[str, int, float, Callable, None]) – Value, clip like str or function to use on the plot data.

set_element_params(element, params)

Change the element parameters.

Parameters:
set_legend(label)
Parameters:

label (str)

set_new_data(data)

Change the data used for the plot.

Parameters:

data (Dataset) – New data to use.

set_plot_params(params)

Change the plot’s visualization parameters.

Parameters:

params (PlotParams) – Plot’s visualization parameters.

set_size(*, width, height)

Set the figure size.

Parameters:
  • width (float) – Width of the figure.

  • height (float) – Height of the figure.

set_text_params(params)

Change the text parameters and refresh it.

Parameters:

params (TextParams) – Text parameters.

set_text_size(size, elements)
Parameters:
set_ticks(*, axt, fmt, params=None)

Change ticks labels on specified axis.

Parameters:
  • axt (AxisType) – Axis on which to change the ticks.

  • fmt (CyclePassFmt | None) – Cycle / pass format to display (‘C’, ‘P’ or ‘CP’) if not None.

  • params (AxeParams) – axe parameters.

set_title(title)
Parameters:

title (str)

set_xlabel(label)
Parameters:

label (str)

set_ylabel(label)
Parameters:

label (str)

stat: StatType
property stype: DataType

PlotContainer type.

template: PlotTemplate
vador_plots()

Generate a list of vador plots for this container.

Return type:

list[Operation]

Returns:

List of vador plots.

property variable: str

Name of the main variable represented by this data.

class casys.visualization.diagnostics.Binned2dSurfacePlot(name, field_x, field_y, data, stat, orf=None, template=<factory>, field_z=None)

Bases: CommonBinned2dPlot

Plot class representing a non-geographical binned statistic with two dimensions, with a surface color mesh 3d plot.

Parameters:
  • name (str) – Name of the data.

  • field_x (Field) – Field used for x axes.

  • field_y (Field) – Field used for y axes.

  • data (xr.Dataset) – Data as a dataset.

  • stat (StatType) – Statistic included in this data.

  • orf (ong_indexer.PassIndexer | None) – Orf used to read data

  • template (PlotTemplate) – Parameters template to use.

  • field_z (Field) – Field used for z axes.

add_color_bar(*, params)
Parameters:

params (AxeParams)

add_event(*, event)
Parameters:

event (CasysEvent) – Event to add.

add_hist_bar(params)
Parameters:

params (AxeParams)

add_plot(container, shared_ax)
Parameters:
add_stat_bar(*, params)
Parameters:

params (AxeParams)

add_stat_graph(*, params)
Parameters:

params (AxeParams)

add_ticks_space(*, space, position)

Add ticks space at the given position.

Parameters:
  • space (float) – Space to add.

  • position (Position) – Position where to add space.

add_watermark(params)
Parameters:

params (WatermarkParams)

adjust_coordinates(longitude, latitude)

Adjust plots longitudes and latitudes coordinates.

Parameters:
  • longitude (float) – Value to add.

  • latitude (float) – Value to add.

ax: mpl_axes_t.Axes | carto_geo_ax_t.GeoAxes = None
property axis_fields: dict[str, str]

Dictionary of axis fields (x, y, and z) with their field name.

classmethod can_add_hist_bar()

Whether this class allow the addition of a hist_graph element or not.

Return type:

bool

Returns:

True or False.

classmethod can_add_stat_graph(for_axis)

Whether this class allow the addition of a stat_graph element for a specific axis or not.

Parameters:

for_axis (TargetAxisType) – Axis (x, y or z)

Return type:

bool

Returns:

True or False.

can_merge_with(plot)

Test whether this class can be merged with the provided container.

Parameters:

plot (PlotContainer) – PlotContainer to merge.

Return type:

bool

Returns:

True if mergeable, False otherwise.

compute_plot_params(x=None, y=None, z=None)

Compute the plot parameters (required for discretized color maps).

Parameters:
Returns:

Computed plot parameters.

computed_color_bar(data)

Compute the color bar (required for discretized color maps).

Parameters:

data (ndarray) – Data to be drawn.

Return type:

AxeParams

Returns:

Computed color map.

data: xr.Dataset
data_used: xr.Dataset = None
draw(*, fig_handler=None, ax_type=MAIN)

Draw the provided container’s data.

Parameters:
  • fig_handler (FigureHandler) – Figure handler on which to draw.

  • ax_type (AxeType) – Axe’s type on which to draw.

property field: Field

Field of the main variable represented by this data.

field_x: Field
field_y: Field
field_z: Field = None
property fig_handler: FigureHandler
classmethod get_class(dtype)
Parameters:

dtype (DataType)

Return type:

type[PlotContainer]

init_figure(interactive=False)

Initialize a figure.

Parameters:

interactive (bool) – Whether to use an interactive (pyplot figure or not)

initialize(reset=True)

Initialize this container.

Parameters:

reset (bool) – Whether to reset the plot to its initial parameters or not (default to true).

is_drawn: bool = False
name: str
orf: ong_indexer.PassIndexer | None = None
classmethod register()

Register a virtual subclass of an ABC.

Returns the subclass, to allow usage as a class decorator.

remove_events()

Remove all events from this plot.

set_data_params(params)

Change the plot’s data parameters.

Parameters:

params (DataParams) – Plot’s data parameters.

set_data_transform(*, transform)

Update the data center value.

Parameters:

transform (Union[str, int, float, Callable, None]) – Value, clip like str or function to use on the plot data.

set_element_params(element, params)

Change the element parameters.

Parameters:
set_legend(label)
Parameters:

label (str)

set_new_data(data)

Change the data used for the plot.

Parameters:

data (Dataset) – New data to use.

set_plot_params(params)

Change the plot’s visualization parameters.

Parameters:

params (PlotParams) – Plot’s visualization parameters.

set_size(*, width, height)

Set the figure size.

Parameters:
  • width (float) – Width of the figure.

  • height (float) – Height of the figure.

set_text_params(params)

Change the text parameters and refresh it.

Parameters:

params (TextParams) – Text parameters.

set_text_size(size, elements)
Parameters:
set_ticks(*, axt, fmt, params=None)

Change ticks labels on specified axis.

Parameters:
  • axt (AxisType) – Axis on which to change the ticks.

  • fmt (CyclePassFmt | None) – Cycle / pass format to display (‘C’, ‘P’ or ‘CP’) if not None.

  • params (AxeParams) – axe parameters.

set_title(title)
Parameters:

title (str)

set_xlabel(label)
Parameters:

label (str)

set_ylabel(label)
Parameters:

label (str)

stat: StatType
property stype: DataType

PlotContainer type.

template: PlotTemplate
vador_plots()

Generate a list of vador plots for this container.

Return type:

list[Operation]

Returns:

List of vador plots.

property variable: str

Name of the main variable represented by this data.

class casys.visualization.diagnostics.BinnedPlot(name, field_x, field_y, data, stat, orf=None, template=<factory>, res_x=None)

Bases: PlotContainer

Plot class representing a non-geographical box statistic.

Parameters:
  • name (str) – Name of the data.

  • field_x (Field) – Field used for x axes.

  • field_y (Field) – Field used for y axes.

  • data (xr.Dataset) – Data as a dataset.

  • stat (StatType) – Statistic included in this data.

  • orf (ong_indexer.PassIndexer | None) – Orf used to read data

  • template (PlotTemplate) – Parameters template to use.

  • res_x (DataResolution) – Min, max and width for the x-axis.

add_color_bar(*, params)
Parameters:

params (AxeParams)

add_event(*, event)
Parameters:

event (CasysEvent) – Event to add.

add_hist_bar(params)
Parameters:

params (AxeParams)

add_plot(container, shared_ax)
Parameters:
add_stat_bar(*, params)
Parameters:

params (AxeParams)

add_stat_graph(*, params)
Parameters:

params (AxeParams)

add_ticks_space(*, space, position)

Add ticks space at the given position.

Parameters:
  • space (float) – Space to add.

  • position (Position) – Position where to add space.

add_watermark(params)
Parameters:

params (WatermarkParams)

adjust_coordinates(longitude, latitude)

Adjust plots longitudes and latitudes coordinates.

Parameters:
  • longitude (float) – Value to add.

  • latitude (float) – Value to add.

ax: mpl_axes_t.Axes | carto_geo_ax_t.GeoAxes = None
property axis_fields: dict[str, str]

Dictionary of axis fields (x, y, and z) with their field name.

classmethod can_add_hist_bar()

Whether this class allow the addition of a hist_graph element or not.

Return type:

bool

Returns:

True or False.

classmethod can_add_stat_graph(for_axis)

Whether this class allow the addition of a stat_graph element for a specific axis or not.

Parameters:

for_axis (TargetAxisType) – Axis (x, y or z)

Return type:

bool

Returns:

True or False.

can_merge_with(plot)

Test whether this class can be merged with the provided container.

Parameters:

plot (PlotContainer) – PlotContainer to merge.

Return type:

bool

Returns:

True if mergeable, False otherwise.

compute_plot_params(x=None, y=None, z=None)

Compute the plot parameters (required for discretized color maps).

Parameters:
Returns:

Computed plot parameters.

computed_color_bar(data)

Compute the color bar (required for discretized color maps).

Parameters:

data (ndarray) – Data to be drawn.

Return type:

AxeParams

Returns:

Computed color map.

data: xr.Dataset
data_used: xr.Dataset = None
draw(*, fig_handler=None, ax_type=MAIN)

Draw the provided container’s data.

Parameters:
  • fig_handler (FigureHandler) – Figure handler on which to draw.

  • ax_type (AxeType) – Axe’s type on which to draw.

property field: Field

Field of the main variable represented by this data.

field_x: Field
field_y: Field
property fig_handler: FigureHandler
classmethod get_class(dtype)
Parameters:

dtype (DataType)

Return type:

type[PlotContainer]

init_figure(interactive=False)

Initialize a figure.

Parameters:

interactive (bool) – Whether to use an interactive (pyplot figure or not)

initialize(reset=True)

Initialize this container.

Parameters:

reset (bool) – Whether to reset the plot to its initial parameters or not (default to true).

is_drawn: bool = False
name: str
orf: ong_indexer.PassIndexer | None = None
classmethod register()

Register a virtual subclass of an ABC.

Returns the subclass, to allow usage as a class decorator.

remove_events()

Remove all events from this plot.

res_x: DataResolution = None
set_data_params(params)

Change the plot’s data parameters.

Parameters:

params (DataParams) – Plot’s data parameters.

set_data_transform(*, transform)

Update the data center value.

Parameters:

transform (Union[str, int, float, Callable, None]) – Value, clip like str or function to use on the plot data.

set_element_params(element, params)

Change the element parameters.

Parameters:
set_legend(label)
Parameters:

label (str)

set_new_data(data)

Change the data used for the plot.

Parameters:

data (Dataset) – New data to use.

set_plot_params(params)

Change the plot’s visualization parameters.

Parameters:

params (PlotParams) – Plot’s visualization parameters.

set_size(*, width, height)

Set the figure size.

Parameters:
  • width (float) – Width of the figure.

  • height (float) – Height of the figure.

set_text_params(params)

Change the text parameters and refresh it.

Parameters:

params (TextParams) – Text parameters.

set_text_size(size, elements)
Parameters:
set_ticks(*, axt, fmt, params=None)

Change ticks labels on specified axis.

Parameters:
  • axt (AxisType) – Axis on which to change the ticks.

  • fmt (CyclePassFmt | None) – Cycle / pass format to display (‘C’, ‘P’ or ‘CP’) if not None.

  • params (AxeParams) – axe parameters.

set_title(title)
Parameters:

title (str)

set_xlabel(label)
Parameters:

label (str)

set_ylabel(label)
Parameters:

label (str)

stat: StatType
property stype: DataType

PlotContainer type.

template: PlotTemplate
vador_plots()

Generate a list of vador plots for this container.

Return type:

list[Operation]

Returns:

List of vador plots.

property variable: str

Name of the main variable represented by this data.

class casys.visualization.diagnostics.CrossoverPlot(name, field_x, field_y, data, stat, orf=None, template=<factory>, field_z=None, index=None, time=None)

Bases: RawPlot

Plot class representing crossover data.

Parameters:
  • name (str) – Name of the data.

  • field_x (Field) – Field used for x axes.

  • field_y (Field) – Field used for y axes.

  • data (xr.Dataset) – Data as a dataset.

  • stat (StatType) – Statistic included in this data.

  • orf (ong_indexer.PassIndexer | None) – Orf used to read data

  • template (PlotTemplate) – Parameters template to use.

  • field_z (Field) – Field used for z axes.

  • index (str | None) – Name of the data index.

  • time (str | None) – Name of the time variable. Optional.

add_color_bar(*, params)
Parameters:

params (AxeParams)

add_event(*, event)
Parameters:

event (CasysEvent) – Event to add.

add_hist_bar(params)
Parameters:

params (AxeParams)

add_plot(container, shared_ax)
Parameters:
add_stat_bar(*, params)
Parameters:

params (AxeParams)

add_stat_graph(*, params)
Parameters:

params (AxeParams)

add_ticks_space(*, space, position)

Add ticks space at the given position.

Parameters:
  • space (float) – Space to add.

  • position (Position) – Position where to add space.

add_watermark(params)
Parameters:

params (WatermarkParams)

adjust_coordinates(longitude, latitude)

Adjust plots longitudes and latitudes coordinates.

Parameters:
  • longitude (float) – Value to add.

  • latitude (float) – Value to add.

ax: mpl_axes_t.Axes | carto_geo_ax_t.GeoAxes = None
property axis_fields: dict[str, str]

Dictionary of axis fields (x, y, and z) with their field name.

classmethod can_add_hist_bar()

Whether this class allow the addition of a hist_graph element or not.

Return type:

bool

Returns:

True or False.

classmethod can_add_stat_graph(for_axis)

Whether this class allow the addition of a stat_graph element for a specific axis or not.

Parameters:

for_axis (TargetAxisType) – Axis (x, y or z)

Return type:

bool

Returns:

True or False.

can_merge_with(plot)

Test whether this class can be merged with the provided container.

Parameters:

plot (PlotContainer) – PlotContainer to merge.

Return type:

bool

Returns:

True if mergeable, False otherwise.

compute_plot_params(x=None, y=None, z=None)

Compute the plot parameters (required for discretized color maps).

Parameters:
Returns:

Computed plot parameters.

computed_color_bar(data)

Compute the color bar (required for discretized color maps).

Parameters:

data (ndarray) – Data to be drawn.

Return type:

AxeParams

Returns:

Computed color map.

data: xr.Dataset
data_used: xr.Dataset = None
draw(*, fig_handler=None, ax_type=MAIN)

Draw the provided container’s data.

Parameters:
  • fig_handler (FigureHandler) – Figure handler on which to draw.

  • ax_type (AxeType) – Axe’s type on which to draw.

property field: Field

Field of the main variable represented by this data.

field_x: Field
field_y: Field
field_z: Field = None
property fig_handler: FigureHandler
classmethod get_class(dtype)
Parameters:

dtype (DataType)

Return type:

type[PlotContainer]

index: str | None = None
init_figure(interactive=False)

Initialize a figure.

Parameters:

interactive (bool) – Whether to use an interactive (pyplot figure or not)

initialize(reset=True)

Initialize this container.

Parameters:

reset (bool) – Whether to reset the plot to its initial parameters or not (default to true).

is_drawn: bool = False
name: str
orf: ong_indexer.PassIndexer | None = None
classmethod register()

Register a virtual subclass of an ABC.

Returns the subclass, to allow usage as a class decorator.

remove_events()

Remove all events from this plot.

set_data_params(params)

Change the plot’s data parameters.

Parameters:

params (DataParams) – Plot’s data parameters.

set_data_transform(*, transform)

Update the data center value.

Parameters:

transform (Union[str, int, float, Callable, None]) – Value, clip like str or function to use on the plot data.

set_element_params(element, params)

Change the element parameters.

Parameters:
set_legend(label)
Parameters:

label (str)

set_new_data(data)

Change the data used for the plot.

Parameters:

data (Dataset) – New data to use.

set_plot_params(params)

Change the plot’s visualization parameters.

Parameters:

params (PlotParams) – Plot’s visualization parameters.

set_size(*, width, height)

Set the figure size.

Parameters:
  • width (float) – Width of the figure.

  • height (float) – Height of the figure.

set_text_params(params)

Change the text parameters and refresh it.

Parameters:

params (TextParams) – Text parameters.

set_text_size(size, elements)
Parameters:
set_ticks(*, axt, fmt, params=None)

Change ticks labels on specified axis.

Parameters:
  • axt (AxisType) – Axis on which to change the ticks.

  • fmt (CyclePassFmt | None) – Cycle / pass format to display (‘C’, ‘P’ or ‘CP’) if not None.

  • params (AxeParams) – axe parameters.

set_title(title)
Parameters:

title (str)

set_xlabel(label)
Parameters:

label (str)

set_ylabel(label)
Parameters:

label (str)

stat: StatType
property stype: DataType

PlotContainer type.

template: PlotTemplate
time: str | None = None
vador_plots()

Generate a list of vador plots for this container.

Return type:

list[Operation]

Returns:

List of vador plots.

property variable: str

Name of the main variable represented by this data.

class casys.visualization.diagnostics.EditingRawPlot(name, field_x, field_y, data, stat, orf=None, template=<factory>, field_z=None, index=None, time=None, editing=None)

Bases: RawPlot

Plot class representing editing data.

Parameters:
  • name (str) – Name of the data.

  • field_x (Field) – Field used for x axes.

  • field_y (Field) – Field used for y axes.

  • data (xr.Dataset) – Data as a dataset.

  • stat (StatType) – Statistic included in this data.

  • orf (ong_indexer.PassIndexer | None) – Orf used to read data

  • template (PlotTemplate) – Parameters template to use.

  • field_z (Field) – Field used for z axes.

  • index (str | None) – Name of the data index.

  • time (str | None) – Name of the time variable. Optional.

  • editing (ong_edit_t.EditingResults) – Editing results.

add_color_bar(*, params)
Parameters:

params (AxeParams)

add_event(*, event)
Parameters:

event (CasysEvent) – Event to add.

add_hist_bar(params)
Parameters:

params (AxeParams)

add_plot(container, shared_ax)
Parameters:
add_stat_bar(*, params)
Parameters:

params (AxeParams)

add_stat_graph(*, params)
Parameters:

params (AxeParams)

add_ticks_space(*, space, position)

Add ticks space at the given position.

Parameters:
  • space (float) – Space to add.

  • position (Position) – Position where to add space.

add_watermark(params)
Parameters:

params (WatermarkParams)

adjust_coordinates(longitude, latitude)

Adjust plots longitudes and latitudes coordinates.

Parameters:
  • longitude (float) – Value to add.

  • latitude (float) – Value to add.

ax: mpl_axes_t.Axes | carto_geo_ax_t.GeoAxes = None
property axis_fields: dict[str, str]

Dictionary of axis fields (x, y, and z) with their field name.

classmethod can_add_hist_bar()

Whether this class allow the addition of a hist_graph element or not.

Return type:

bool

Returns:

True or False.

classmethod can_add_stat_graph(for_axis)

Whether this class allow the addition of a stat_graph element for a specific axis or not.

Parameters:

for_axis (TargetAxisType) – Axis (x, y or z)

Return type:

bool

Returns:

True or False.

can_merge_with(plot)

Test whether this class can be merged with the provided container.

Parameters:

plot (PlotContainer) – PlotContainer to merge.

Return type:

bool

Returns:

True if mergeable, False otherwise.

compute_plot_params(x=None, y=None, z=None)

Compute the plot parameters (required for discretized color maps).

Parameters:
Returns:

Computed plot parameters.

computed_color_bar(data)

Compute the color bar (required for discretized color maps).

Parameters:

data (ndarray) – Data to be drawn.

Return type:

AxeParams

Returns:

Computed color map.

data: xr.Dataset
data_used: xr.Dataset = None
draw(*, fig_handler=None, ax_type=MAIN)

Draw the provided container’s data.

Parameters:
  • fig_handler (FigureHandler) – Figure handler on which to draw.

  • ax_type (AxeType) – Axe’s type on which to draw.

editing: ong_edit_t.EditingResults = None
property field: Field

Field of the main variable represented by this data.

field_x: Field
field_y: Field
field_z: Field = None
property fig_handler: FigureHandler
classmethod get_class(dtype)
Parameters:

dtype (DataType)

Return type:

type[PlotContainer]

index: str | None = None
init_figure(interactive=False)

Initialize a figure.

Parameters:

interactive (bool) – Whether to use an interactive (pyplot figure or not)

initialize(reset=True)

Initialize this container.

Parameters:

reset (bool) – Whether to reset the plot to its initial parameters or not (default to true).

is_drawn: bool = False
name: str
orf: ong_indexer.PassIndexer | None = None
classmethod register()

Register a virtual subclass of an ABC.

Returns the subclass, to allow usage as a class decorator.

remove_events()

Remove all events from this plot.

set_data_params(params)

Change the plot’s data parameters.

Parameters:

params (DataParams) – Plot’s data parameters.

set_data_transform(*, transform)

Update the data center value.

Parameters:

transform (Union[str, int, float, Callable, None]) – Value, clip like str or function to use on the plot data.

set_element_params(element, params)

Change the element parameters.

Parameters:
set_legend(label)
Parameters:

label (str)

set_new_data(data)

Change the data used for the plot.

Parameters:

data (Dataset) – New data to use.

set_plot_params(params)

Change the plot’s visualization parameters.

Parameters:

params (PlotParams) – Plot’s visualization parameters.

set_size(*, width, height)

Set the figure size.

Parameters:
  • width (float) – Width of the figure.

  • height (float) – Height of the figure.

set_text_params(params)

Change the text parameters and refresh it.

Parameters:

params (TextParams) – Text parameters.

set_text_size(size, elements)
Parameters:
set_ticks(*, axt, fmt, params=None)

Change ticks labels on specified axis.

Parameters:
  • axt (AxisType) – Axis on which to change the ticks.

  • fmt (CyclePassFmt | None) – Cycle / pass format to display (‘C’, ‘P’ or ‘CP’) if not None.

  • params (AxeParams) – axe parameters.

set_title(title)
Parameters:

title (str)

set_xlabel(label)
Parameters:

label (str)

set_ylabel(label)
Parameters:

label (str)

stat: StatType
property stype: DataType

PlotContainer type.

template: PlotTemplate
time: str | None = None
vador_plots()

Generate a list of vador plots for this container.

Return type:

list[Operation]

Returns:

List of vador plots.

property variable: str

Name of the main variable represented by this data.

class casys.visualization.diagnostics.EditingTimePlot(name, field_x, field_y, data, stat, orf=None, template=<factory>, res_x=None, freq=RAW, editing=None)

Bases: TimePlot

Plot class representing an editing data.

Parameters:
  • field_z – Field used for z axes

  • name (str)

  • field_x (Field)

  • field_y (Field)

  • data (xr.Dataset)

  • stat (StatType)

  • orf (ong_indexer.PassIndexer | None)

  • template (PlotTemplate)

  • res_x (DataResolution)

  • freq (FreqType)

  • editing (ong_edit_t.EditingResults)

add_color_bar(*, params)
Parameters:

params (AxeParams)

add_event(*, event)
Parameters:

event (CasysEvent) – Event to add.

add_hist_bar(params)
Parameters:

params (AxeParams)

add_plot(container, shared_ax)
Parameters:
add_stat_bar(*, params)
Parameters:

params (AxeParams)

add_stat_graph(*, params)
Parameters:

params (AxeParams)

add_ticks_space(*, space, position)

Add ticks space at the given position.

Parameters:
  • space (float) – Space to add.

  • position (Position) – Position where to add space.

add_watermark(params)
Parameters:

params (WatermarkParams)

adjust_coordinates(longitude, latitude)

Adjust plots longitudes and latitudes coordinates.

Parameters:
  • longitude (float) – Value to add.

  • latitude (float) – Value to add.

ax: mpl_axes_t.Axes | carto_geo_ax_t.GeoAxes = None
property axis_fields: dict[str, str]

Dictionary of axis fields (x, y, and z) with their field name.

classmethod can_add_hist_bar()

Whether this class allow the addition of a hist_graph element or not.

Return type:

bool

Returns:

True or False.

classmethod can_add_stat_graph(for_axis)

Whether this class allow the addition of a stat_graph element for a specific axis or not.

Parameters:

for_axis (TargetAxisType) – Axis (x, y or z)

Return type:

bool

Returns:

True or False.

can_merge_with(plot)

Test whether this class can be merged with the provided container.

Parameters:

plot (PlotContainer) – PlotContainer to merge.

Return type:

bool

Returns:

True if mergeable, False otherwise.

compute_plot_params(x=None, y=None, z=None)

Compute the plot parameters (required for discretized color maps).

Parameters:
Returns:

Computed plot parameters.

computed_color_bar(data)

Compute the color bar (required for discretized color maps).

Parameters:

data (ndarray) – Data to be drawn.

Return type:

AxeParams

Returns:

Computed color map.

data: xr.Dataset
data_used: xr.Dataset = None
draw(*, fig_handler=None, ax_type=MAIN)

Draw the provided container’s data.

Parameters:
  • fig_handler (FigureHandler) – Figure handler on which to draw.

  • ax_type (AxeType) – Axe’s type on which to draw.

editing: ong_edit_t.EditingResults = None
property field: Field

Field of the main variable represented by this data.

field_x: Field
field_y: Field
property fig_handler: FigureHandler
freq: FreqType = 4
classmethod get_class(dtype)
Parameters:

dtype (DataType)

Return type:

type[PlotContainer]

init_figure(interactive=False)

Initialize a figure.

Parameters:

interactive (bool) – Whether to use an interactive (pyplot figure or not)

initialize(reset=True)

Initialize this container.

Parameters:

reset (bool) – Whether to reset the plot to its initial parameters or not (default to true).

is_drawn: bool = False
name: str
orf: ong_indexer.PassIndexer | None = None
classmethod register()

Register a virtual subclass of an ABC.

Returns the subclass, to allow usage as a class decorator.

remove_events()

Remove all events from this plot.

res_x: DataResolution = None
set_data_params(params)

Change the plot’s data parameters.

Parameters:

params (DataParams) – Plot’s data parameters.

set_data_transform(*, transform)

Update the data center value.

Parameters:

transform (Union[str, int, float, Callable, None]) – Value, clip like str or function to use on the plot data.

set_element_params(element, params)

Change the element parameters.

Parameters:
set_legend(label)
Parameters:

label (str)

set_new_data(data)

Change the data used for the plot.

Parameters:

data (Dataset) – New data to use.

set_plot_params(params)

Change the plot’s visualization parameters.

Parameters:

params (PlotParams) – Plot’s visualization parameters.

set_size(*, width, height)

Set the figure size.

Parameters:
  • width (float) – Width of the figure.

  • height (float) – Height of the figure.

set_text_params(params)

Change the text parameters and refresh it.

Parameters:

params (TextParams) – Text parameters.

set_text_size(size, elements)
Parameters:
set_ticks(*, axt, fmt, params=None)

Change ticks labels on specified axis.

Parameters:
  • axt (AxisType) – Axis on which to change the ticks.

  • fmt (CyclePassFmt | None) – Cycle / pass format to display (‘C’, ‘P’ or ‘CP’) if not None.

  • params (AxeParams) – axe parameters.

set_title(title)
Parameters:

title (str)

set_xlabel(label)
Parameters:

label (str)

set_ylabel(label)
Parameters:

label (str)

stat: StatType
property stype: DataType

PlotContainer type.

template: PlotTemplate
vador_plots()

Generate a list of vador plots for this container.

Return type:

list[Operation]

Returns:

List of vador plots.

property variable: str

Name of the main variable represented by this data.

class casys.visualization.diagnostics.GeoBoxPlot(name, field_x, field_y, data, stat, orf=None, template=<factory>, field_z=None)

Bases: Binned2dPlot

Plot class representing a geographical box statistic.

Parameters:
  • name (str) – Name of the data.

  • field_x (Field) – Field used for x axes.

  • field_y (Field) – Field used for y axes.

  • data (xr.Dataset) – Data as a dataset.

  • stat (StatType) – Statistic included in this data.

  • orf (ong_indexer.PassIndexer | None) – Orf used to read data

  • template (PlotTemplate) – Parameters template to use.

  • field_z (Field) – Field used for z axes.

add_color_bar(*, params)
Parameters:

params (AxeParams)

add_event(*, event)
Parameters:

event (CasysEvent) – Event to add.

add_hist_bar(params)
Parameters:

params (AxeParams)

add_plot(container, shared_ax)
Parameters:
add_stat_bar(*, params)
Parameters:

params (AxeParams)

add_stat_graph(*, params)
Parameters:

params (AxeParams)

add_ticks_space(*, space, position)

Add ticks space at the given position.

Parameters:
  • space (float) – Space to add.

  • position (Position) – Position where to add space.

add_watermark(params)
Parameters:

params (WatermarkParams)

adjust_coordinates(longitude, latitude)

Adjust plots longitudes and latitudes coordinates.

Parameters:
  • longitude (float) – Value to add.

  • latitude (float) – Value to add.

ax: mpl_axes_t.Axes | carto_geo_ax_t.GeoAxes = None
property axis_fields: dict[str, str]

Dictionary of axis fields (x, y, and z) with their field name.

classmethod can_add_hist_bar()

Whether this class allow the addition of a hist_graph element or not.

Return type:

bool

Returns:

True or False.

classmethod can_add_stat_graph(for_axis)

Whether this class allow the addition of a stat_graph element for a specific axis or not.

Parameters:

for_axis (TargetAxisType) – Axis (x, y or z)

Return type:

bool

Returns:

True or False.

can_merge_with(plot)

Test whether this class can be merged with the provided container.

Parameters:

plot (PlotContainer) – PlotContainer to merge.

Return type:

bool

Returns:

True if mergeable, False otherwise.

compute_plot_params(x=None, y=None, z=None)

Compute the plot parameters (required for discretized color maps).

Parameters:
Returns:

Computed plot parameters.

computed_color_bar(data)

Compute the color bar (required for discretized color maps).

Parameters:

data (ndarray) – Data to be drawn.

Return type:

AxeParams

Returns:

Computed color map.

data: xr.Dataset
data_used: xr.Dataset = None
draw(*, fig_handler=None, ax_type=MAIN)

Draw the provided container’s data.

Parameters:
  • fig_handler (FigureHandler) – Figure handler on which to draw.

  • ax_type (AxeType) – Axe’s type on which to draw.

property field: Field

Field of the main variable represented by this data.

field_x: Field
field_y: Field
field_z: Field = None
property fig_handler: FigureHandler
classmethod get_class(dtype)
Parameters:

dtype (DataType)

Return type:

type[PlotContainer]

init_figure(interactive=False)

Initialize a figure.

Parameters:

interactive (bool) – Whether to use an interactive (pyplot figure or not)

initialize(reset=True)

Initialize this container.

Parameters:

reset (bool) – Whether to reset the plot to its initial parameters or not (default to true).

is_drawn: bool = False
name: str
orf: ong_indexer.PassIndexer | None = None
classmethod register()

Register a virtual subclass of an ABC.

Returns the subclass, to allow usage as a class decorator.

remove_events()

Remove all events from this plot.

set_data_params(params)

Change the plot’s data parameters.

Parameters:

params (DataParams) – Plot’s data parameters.

set_data_transform(*, transform)

Update the data center value.

Parameters:

transform (Union[str, int, float, Callable, None]) – Value, clip like str or function to use on the plot data.

set_element_params(element, params)

Change the element parameters.

Parameters:
set_legend(label)
Parameters:

label (str)

set_new_data(data)

Change the data used for the plot.

Parameters:

data (Dataset) – New data to use.

set_plot_params(params)

Change the plot’s visualization parameters.

Parameters:

params (PlotParams) – Plot’s visualization parameters.

set_size(*, width, height)

Set the figure size.

Parameters:
  • width (float) – Width of the figure.

  • height (float) – Height of the figure.

set_text_params(params)

Change the text parameters and refresh it.

Parameters:

params (TextParams) – Text parameters.

set_text_size(size, elements)
Parameters:
set_ticks(*, axt, params=None, **kwargs)

Change ticks labels on specified axis.

Parameters:
  • axt (AxisType) – Axis on which to change the ticks.

  • fmt – Cycle / pass format to display (‘C’, ‘P’ or ‘CP’) if not None.

  • params (AxeParams) – axe parameters.

set_title(title)
Parameters:

title (str)

set_xlabel(label)
Parameters:

label (str)

set_ylabel(label)
Parameters:

label (str)

stat: StatType
property stype: DataType

PlotContainer type.

template: PlotTemplate
vador_plots()

Generate a list of vador plots for this container.

Return type:

list[Operation]

Returns:

List of vador plots.

property variable: str

Name of the main variable represented by this data.

class casys.visualization.diagnostics.HistoPlot(name, field_x, field_y, data, stat, orf=None, template=<factory>, res_x=None)

Bases: BinnedPlot

Plot class representing a histogram statistic.

Parameters:
  • name (str) – Name of the data.

  • field_x (Field) – Field used for x axes.

  • field_y (Field) – Field used for y axes.

  • data (xr.Dataset) – Data as a dataset.

  • stat (StatType) – Statistic included in this data.

  • orf (ong_indexer.PassIndexer | None) – Orf used to read data

  • template (PlotTemplate) – Parameters template to use.

  • res_x (DataResolution) – Min, max and width for the x-axis.

add_color_bar(*, params)
Parameters:

params (AxeParams)

add_event(*, event)
Parameters:

event (CasysEvent) – Event to add.

add_hist_bar(params)
Parameters:

params (AxeParams)

add_plot(container, shared_ax)
Parameters:
add_stat_bar(*, params)
Parameters:

params (AxeParams)

add_stat_graph(*, params)
Parameters:

params (AxeParams)

add_ticks_space(*, space, position)

Add ticks space at the given position.

Parameters:
  • space (float) – Space to add.

  • position (Position) – Position where to add space.

add_watermark(params)
Parameters:

params (WatermarkParams)

adjust_coordinates(longitude, latitude)

Adjust plots longitudes and latitudes coordinates.

Parameters:
  • longitude (float) – Value to add.

  • latitude (float) – Value to add.

ax: mpl_axes_t.Axes | carto_geo_ax_t.GeoAxes = None
property axis_fields: dict[str, str]

Dictionary of axis fields (x, y, and z) with their field name.

classmethod can_add_hist_bar()

Whether this class allow the addition of a hist_graph element or not.

Return type:

bool

Returns:

True or False.

classmethod can_add_stat_graph(for_axis)

Whether this class allow the addition of a stat_graph element for a specific axis or not.

Parameters:

for_axis (TargetAxisType) – Axis (x, y or z)

Return type:

bool

Returns:

True or False.

can_merge_with(plot)

Test whether this class can be merged with the provided container.

Parameters:

plot (PlotContainer) – PlotContainer to merge.

Return type:

bool

Returns:

True if mergeable, False otherwise.

compute_plot_params(x=None, y=None, z=None)

Compute the plot parameters (required for discretized color maps).

Parameters:
Returns:

Computed plot parameters.

computed_color_bar(data)

Compute the color bar (required for discretized color maps).

Parameters:

data (ndarray) – Data to be drawn.

Return type:

AxeParams

Returns:

Computed color map.

data: xr.Dataset
data_used: xr.Dataset = None
draw(*, fig_handler=None, ax_type=MAIN)

Draw the provided container’s data.

Parameters:
  • fig_handler (FigureHandler) – Figure handler on which to draw.

  • ax_type (AxeType) – Axe’s type on which to draw.

property field: Field

Field of the main variable represented by this data.

field_x: Field
field_y: Field
property fig_handler: FigureHandler
classmethod get_class(dtype)
Parameters:

dtype (DataType)

Return type:

type[PlotContainer]

init_figure(interactive=False)

Initialize a figure.

Parameters:

interactive (bool) – Whether to use an interactive (pyplot figure or not)

initialize(reset=True)

Initialize this container.

Parameters:

reset (bool) – Whether to reset the plot to its initial parameters or not (default to true).

is_drawn: bool = False
name: str
orf: ong_indexer.PassIndexer | None = None
classmethod register()

Register a virtual subclass of an ABC.

Returns the subclass, to allow usage as a class decorator.

remove_events()

Remove all events from this plot.

res_x: DataResolution = None
set_data_params(params)

Change the plot’s data parameters.

Parameters:

params (DataParams) – Plot’s data parameters.

set_data_transform(*, transform)

Update the data center value.

Parameters:

transform (Union[str, int, float, Callable, None]) – Value, clip like str or function to use on the plot data.

set_element_params(element, params)

Change the element parameters.

Parameters:
set_legend(label)
Parameters:

label (str)

set_new_data(data)

Change the data used for the plot.

Parameters:

data (Dataset) – New data to use.

set_plot_params(params)

Change the plot’s visualization parameters.

Parameters:

params (PlotParams) – Plot’s visualization parameters.

set_size(*, width, height)

Set the figure size.

Parameters:
  • width (float) – Width of the figure.

  • height (float) – Height of the figure.

set_text_params(params)

Change the text parameters and refresh it.

Parameters:

params (TextParams) – Text parameters.

set_text_size(size, elements)
Parameters:
set_ticks(*, axt, fmt, params=None)

Change ticks labels on specified axis.

Parameters:
  • axt (AxisType) – Axis on which to change the ticks.

  • fmt (CyclePassFmt | None) – Cycle / pass format to display (‘C’, ‘P’ or ‘CP’) if not None.

  • params (AxeParams) – axe parameters.

set_title(title)
Parameters:

title (str)

set_xlabel(label)
Parameters:

label (str)

set_ylabel(label)
Parameters:

label (str)

stat: StatType
property stype: DataType

PlotContainer type.

template: PlotTemplate
vador_plots()

Generate a list of vador plots for this container.

Return type:

list[Operation]

Returns:

List of vador plots.

property variable: str

Name of the main variable represented by this data.

class casys.visualization.diagnostics.MissingPointsRawPlot(name, field_x, field_y, data, stat, orf=None, template=<factory>, field_z=None, index=None, time=None, data_legend=None)

Bases: RawPlot

Plot class representing missing points data.

Parameters:
  • name (str) – Name of the data.

  • field_x (Field) – Field used for x axes.

  • field_y (Field) – Field used for y axes.

  • data (xr.Dataset) – Data as a dataset.

  • stat (StatType) – Statistic included in this data.

  • orf (ong_indexer.PassIndexer | None) – Orf used to read data

  • template (PlotTemplate) – Parameters template to use.

  • field_z (Field) – Field used for z axes.

  • index (str | None) – Name of the data index.

  • time (str | None) – Name of the time variable. Optional.

  • data_legend (dict[str, int] | None)

add_color_bar(*, params)
Parameters:

params (AxeParams)

add_event(*, event)
Parameters:

event (CasysEvent) – Event to add.

add_hist_bar(params)
Parameters:

params (AxeParams)

add_plot(container, shared_ax)
Parameters:
add_stat_bar(*, params)
Parameters:

params (AxeParams)

add_stat_graph(*, params)
Parameters:

params (AxeParams)

add_ticks_space(*, space, position)

Add ticks space at the given position.

Parameters:
  • space (float) – Space to add.

  • position (Position) – Position where to add space.

add_watermark(params)
Parameters:

params (WatermarkParams)

adjust_coordinates(longitude, latitude)

Adjust plots longitudes and latitudes coordinates.

Parameters:
  • longitude (float) – Value to add.

  • latitude (float) – Value to add.

ax: mpl_axes_t.Axes | carto_geo_ax_t.GeoAxes = None
property axis_fields: dict[str, str]

Dictionary of axis fields (x, y, and z) with their field name.

classmethod can_add_hist_bar()

Whether this class allow the addition of a hist_graph element or not.

Return type:

bool

Returns:

True or False.

classmethod can_add_stat_graph(for_axis)

Whether this class allow the addition of a stat_graph element for a specific axis or not.

Parameters:

for_axis (TargetAxisType) – Axis (x, y or z)

Return type:

bool

Returns:

True or False.

can_merge_with(plot)

Test whether this class can be merged with the provided container.

Parameters:

plot (PlotContainer) – PlotContainer to merge.

Return type:

bool

Returns:

True if mergeable, False otherwise.

compute_plot_params(x=None, y=None, z=None)

Compute the plot parameters (required for discretized color maps).

Parameters:
Returns:

Computed plot parameters.

computed_color_bar(data)

Compute the color bar (required for discretized color maps).

Parameters:

data (ndarray) – Data to be drawn.

Return type:

AxeParams

Returns:

Computed color map.

data: xr.Dataset
data_legend: dict[str, int] | None = None
data_used: xr.Dataset = None
draw(*, fig_handler=None, ax_type=MAIN)

Draw the provided container’s data.

Parameters:
  • fig_handler (FigureHandler) – Figure handler on which to draw.

  • ax_type (AxeType) – Axe’s type on which to draw.

property field: Field

Field of the main variable represented by this data.

field_x: Field
field_y: Field
field_z: Field = None
property fig_handler: FigureHandler
classmethod get_class(dtype)
Parameters:

dtype (DataType)

Return type:

type[PlotContainer]

index: str | None = None
init_figure(interactive=False)

Initialize a figure.

Parameters:

interactive (bool) – Whether to use an interactive (pyplot figure or not)

initialize(reset=True)

Initialize this container.

Parameters:

reset (bool) – Whether to reset the plot to its initial parameters or not (default to true).

is_drawn: bool = False
name: str
orf: ong_indexer.PassIndexer | None = None
classmethod register()

Register a virtual subclass of an ABC.

Returns the subclass, to allow usage as a class decorator.

remove_events()

Remove all events from this plot.

set_data_params(params)

Change the plot’s data parameters.

Parameters:

params (DataParams) – Plot’s data parameters.

set_data_transform(*, transform)

Update the data center value.

Parameters:

transform (Union[str, int, float, Callable, None]) – Value, clip like str or function to use on the plot data.

set_element_params(element, params)

Change the element parameters.

Parameters:
set_legend(label)
Parameters:

label (str)

set_new_data(data)

Change the data used for the plot.

Parameters:

data (Dataset) – New data to use.

set_plot_params(params)

Change the plot’s visualization parameters.

Parameters:

params (PlotParams) – Plot’s visualization parameters.

set_size(*, width, height)

Set the figure size.

Parameters:
  • width (float) – Width of the figure.

  • height (float) – Height of the figure.

set_text_params(params)

Change the text parameters and refresh it.

Parameters:

params (TextParams) – Text parameters.

set_text_size(size, elements)
Parameters:
set_ticks(*, axt, fmt, params=None)

Change ticks labels on specified axis.

Parameters:
  • axt (AxisType) – Axis on which to change the ticks.

  • fmt (CyclePassFmt | None) – Cycle / pass format to display (‘C’, ‘P’ or ‘CP’) if not None.

  • params (AxeParams) – axe parameters.

set_title(title)
Parameters:

title (str)

set_xlabel(label)
Parameters:

label (str)

set_ylabel(label)
Parameters:

label (str)

stat: StatType
property stype: DataType

PlotContainer type.

template: PlotTemplate
time: str | None = None
vador_plots()

Generate a list of vador plots for this container.

Return type:

list[Operation]

Returns:

List of vador plots.

property variable: str

Name of the main variable represented by this data.

class casys.visualization.diagnostics.MissingPointsTimePlot(name, field_x, field_y, data, stat, orf=None, template=<factory>, res_x=None, freq=RAW)

Bases: TimePlot

Plot class representing a time statistic.

Parameters:
  • name (str) – Name of the data.

  • field_x (Field) – Field used for x axes.

  • field_y (Field) – Field used for y axes.

  • data (xr.Dataset) – Data as a dataset.

  • stat (StatType) – Statistic included in this data.

  • orf (ong_indexer.PassIndexer | None) – Orf used to read data

  • template (PlotTemplate) – Parameters template to use.

  • res_x (DataResolution) – Min, max and width for the x-axis.

  • freq (FreqType) – Frequency (day, pass, cycle)

add_color_bar(*, params)
Parameters:

params (AxeParams)

add_event(*, event)
Parameters:

event (CasysEvent) – Event to add.

add_hist_bar(params)
Parameters:

params (AxeParams)

add_plot(container, shared_ax)
Parameters:
add_stat_bar(*, params)
Parameters:

params (AxeParams)

add_stat_graph(*, params)
Parameters:

params (AxeParams)

add_ticks_space(*, space, position)

Add ticks space at the given position.

Parameters:
  • space (float) – Space to add.

  • position (Position) – Position where to add space.

add_watermark(params)
Parameters:

params (WatermarkParams)

adjust_coordinates(longitude, latitude)

Adjust plots longitudes and latitudes coordinates.

Parameters:
  • longitude (float) – Value to add.

  • latitude (float) – Value to add.

ax: mpl_axes_t.Axes | carto_geo_ax_t.GeoAxes = None
property axis_fields: dict[str, str]

Dictionary of axis fields (x, y, and z) with their field name.

classmethod can_add_hist_bar()

Whether this class allow the addition of a hist_graph element or not.

Return type:

bool

Returns:

True or False.

classmethod can_add_stat_graph(for_axis)

Whether this class allow the addition of a stat_graph element for a specific axis or not.

Parameters:

for_axis (TargetAxisType) – Axis (x, y or z)

Return type:

bool

Returns:

True or False.

can_merge_with(plot)

Test whether this class can be merged with the provided container.

Parameters:

plot (PlotContainer) – PlotContainer to merge.

Return type:

bool

Returns:

True if mergeable, False otherwise.

compute_plot_params(x=None, y=None, z=None)

Compute the plot parameters (required for discretized color maps).

Parameters:
Returns:

Computed plot parameters.

computed_color_bar(data)

Compute the color bar (required for discretized color maps).

Parameters:

data (ndarray) – Data to be drawn.

Return type:

AxeParams

Returns:

Computed color map.

data: xr.Dataset
data_used: xr.Dataset = None
draw(*, fig_handler=None, ax_type=MAIN)

Draw the provided container’s data.

Parameters:
  • fig_handler (FigureHandler) – Figure handler on which to draw.

  • ax_type (AxeType) – Axe’s type on which to draw.

property field: Field

Field of the main variable represented by this data.

field_x: Field
field_y: Field
property fig_handler: FigureHandler
freq: FreqType = 4
classmethod get_class(dtype)
Parameters:

dtype (DataType)

Return type:

type[PlotContainer]

init_figure(interactive=False)

Initialize a figure.

Parameters:

interactive (bool) – Whether to use an interactive (pyplot figure or not)

initialize(reset=True)

Initialize this container.

Parameters:

reset (bool) – Whether to reset the plot to its initial parameters or not (default to true).

is_drawn: bool = False
name: str
orf: ong_indexer.PassIndexer | None = None
classmethod register()

Register a virtual subclass of an ABC.

Returns the subclass, to allow usage as a class decorator.

remove_events()

Remove all events from this plot.

res_x: DataResolution = None
set_data_params(params)

Change the plot’s data parameters.

Parameters:

params (DataParams) – Plot’s data parameters.

set_data_transform(*, transform)

Update the data center value.

Parameters:

transform (Union[str, int, float, Callable, None]) – Value, clip like str or function to use on the plot data.

set_element_params(element, params)

Change the element parameters.

Parameters:
set_legend(label)
Parameters:

label (str)

set_new_data(data)

Change the data used for the plot.

Parameters:

data (Dataset) – New data to use.

set_plot_params(params)

Change the plot’s visualization parameters.

Parameters:

params (PlotParams) – Plot’s visualization parameters.

set_size(*, width, height)

Set the figure size.

Parameters:
  • width (float) – Width of the figure.

  • height (float) – Height of the figure.

set_text_params(params)

Change the text parameters and refresh it.

Parameters:

params (TextParams) – Text parameters.

set_text_size(size, elements)
Parameters:
set_ticks(*, axt, fmt, params=None)

Change ticks labels on specified axis.

Parameters:
  • axt (AxisType) – Axis on which to change the ticks.

  • fmt (CyclePassFmt | None) – Cycle / pass format to display (‘C’, ‘P’ or ‘CP’) if not None.

  • params (AxeParams) – axe parameters.

set_title(title)
Parameters:

title (str)

set_xlabel(label)
Parameters:

label (str)

set_ylabel(label)
Parameters:

label (str)

stat: StatType
property stype: DataType

PlotContainer type.

template: PlotTemplate
vador_plots()

Generate a list of vador plots for this container.

Return type:

list[Operation]

Returns:

List of vador plots.

property variable: str

Name of the main variable represented by this data.

class casys.visualization.diagnostics.PlotContainer(name, field_x, field_y, data, stat, orf=None, template=<factory>)

Bases: ABC

Abstract class representing plot associated to statistics and raw data.

Parameters:
  • name (str) – Name of the data.

  • field_x (Field) – Field used for x axes.

  • field_y (Field) – Field used for y axes.

  • data (Dataset) – Data as a dataset.

  • stat (StatType) – Statistic included in this data.

  • orf (PassIndexer | None) – Orf used to read data

  • template (PlotTemplate) – Parameters template to use.

add_color_bar(*, params)
Parameters:

params (AxeParams)

add_event(*, event)
Parameters:

event (CasysEvent) – Event to add.

add_hist_bar(params)
Parameters:

params (AxeParams)

add_plot(container, shared_ax)
Parameters:
add_stat_bar(*, params)
Parameters:

params (AxeParams)

add_stat_graph(*, params)
Parameters:

params (AxeParams)

add_ticks_space(*, space, position)

Add ticks space at the given position.

Parameters:
  • space (float) – Space to add.

  • position (Position) – Position where to add space.

add_watermark(params)
Parameters:

params (WatermarkParams)

adjust_coordinates(longitude, latitude)

Adjust plots longitudes and latitudes coordinates.

Parameters:
  • longitude (float) – Value to add.

  • latitude (float) – Value to add.

ax: Axes | GeoAxes = None
abstract property axis_fields: dict[str, str]

Dictionary of axis fields (x, y, and z) with their field name.

classmethod can_add_hist_bar()

Whether this class allow the addition of a hist_graph element or not.

Return type:

bool

Returns:

True or False.

classmethod can_add_stat_graph(for_axis)

Whether this class allow the addition of a stat_graph element for a specific axis or not.

Parameters:

for_axis (TargetAxisType) – Axis (x, y or z)

Return type:

bool

Returns:

True or False.

can_merge_with(plot)

Test whether this class can be merged with the provided container.

Parameters:

plot (PlotContainer) – PlotContainer to merge.

Return type:

bool

Returns:

True if mergeable, False otherwise.

compute_plot_params(x=None, y=None, z=None)

Compute the plot parameters (required for discretized color maps).

Parameters:
Returns:

Computed plot parameters.

computed_color_bar(data)

Compute the color bar (required for discretized color maps).

Parameters:

data (ndarray) – Data to be drawn.

Return type:

AxeParams

Returns:

Computed color map.

data: Dataset
data_used: Dataset = None
draw(*, fig_handler=None, ax_type=MAIN)

Draw the provided container’s data.

Parameters:
  • fig_handler (FigureHandler) – Figure handler on which to draw.

  • ax_type (AxeType) – Axe’s type on which to draw.

abstract property field: Field

Field of the main variable represented by this data.

field_x: Field
field_y: Field
property fig_handler: FigureHandler
classmethod get_class(dtype)
Parameters:

dtype (DataType)

Return type:

type[PlotContainer]

init_figure(interactive=False)

Initialize a figure.

Parameters:

interactive (bool) – Whether to use an interactive (pyplot figure or not)

initialize(reset=True)

Initialize this container.

Parameters:

reset (bool) – Whether to reset the plot to its initial parameters or not (default to true).

is_drawn: bool = False
name: str
orf: PassIndexer | None = None
classmethod register()

Register a virtual subclass of an ABC.

Returns the subclass, to allow usage as a class decorator.

remove_events()

Remove all events from this plot.

set_data_params(params)

Change the plot’s data parameters.

Parameters:

params (DataParams) – Plot’s data parameters.

set_data_transform(*, transform)

Update the data center value.

Parameters:

transform (Union[str, int, float, Callable, None]) – Value, clip like str or function to use on the plot data.

set_element_params(element, params)

Change the element parameters.

Parameters:
set_legend(label)
Parameters:

label (str)

set_new_data(data)

Change the data used for the plot.

Parameters:

data (Dataset) – New data to use.

set_plot_params(params)

Change the plot’s visualization parameters.

Parameters:

params (PlotParams) – Plot’s visualization parameters.

set_size(*, width, height)

Set the figure size.

Parameters:
  • width (float) – Width of the figure.

  • height (float) – Height of the figure.

set_text_params(params)

Change the text parameters and refresh it.

Parameters:

params (TextParams) – Text parameters.

set_text_size(size, elements)
Parameters:
set_ticks(*, axt, fmt, params=None)

Change ticks labels on specified axis.

Parameters:
  • axt (AxisType) – Axis on which to change the ticks.

  • fmt (CyclePassFmt | None) – Cycle / pass format to display (‘C’, ‘P’ or ‘CP’) if not None.

  • params (AxeParams) – axe parameters.

set_title(title)
Parameters:

title (str)

set_xlabel(label)
Parameters:

label (str)

set_ylabel(label)
Parameters:

label (str)

stat: StatType
property stype: DataType

PlotContainer type.

template: PlotTemplate
vador_plots()

Generate a list of vador plots for this container.

Return type:

list[Operation]

Returns:

List of vador plots.

property variable: str

Name of the main variable represented by this data.

class casys.visualization.diagnostics.RawComparisonPlot(name, field_x, field_y, data, stat, orf=None, template=<factory>, field_z=None, index=None)

Bases: BaseRawPlot

Plot class representing a raw comparison data.

Parameters:
  • name (str) – Name of the data.

  • field_x (Field) – Field used for x axes.

  • field_y (Field) – Field used for y axes.

  • data (xr.Dataset) – Data as a dataset.

  • stat (StatType) – Statistic included in this data.

  • orf (ong_indexer.PassIndexer | None) – Orf used to read data

  • template (PlotTemplate) – Parameters template to use.

  • field_z (Field) – Field used for z axes.

  • index (str | None) – Name of the data index.

add_color_bar(*, params)
Parameters:

params (AxeParams)

add_event(*, event)
Parameters:

event (CasysEvent) – Event to add.

add_hist_bar(params)
Parameters:

params (AxeParams)

add_plot(container, shared_ax)
Parameters:
add_stat_bar(*, params)
Parameters:

params (AxeParams)

add_stat_graph(*, params)
Parameters:

params (AxeParams)

add_ticks_space(*, space, position)

Add ticks space at the given position.

Parameters:
  • space (float) – Space to add.

  • position (Position) – Position where to add space.

add_watermark(params)
Parameters:

params (WatermarkParams)

adjust_coordinates(longitude, latitude)

Adjust plots longitudes and latitudes coordinates.

Parameters:
  • longitude (float) – Value to add.

  • latitude (float) – Value to add.

ax: mpl_axes_t.Axes | carto_geo_ax_t.GeoAxes = None
property axis_fields: dict[str, str]

Dictionary of axis fields (x, y, and z) with their field name.

classmethod can_add_hist_bar()

Whether this class allow the addition of a hist_graph element or not.

Return type:

bool

Returns:

True or False.

classmethod can_add_stat_graph(for_axis)

Whether this class allow the addition of a stat_graph element for a specific axis or not.

Parameters:

for_axis (TargetAxisType) – Axis (x, y or z)

Return type:

bool

Returns:

True or False.

can_merge_with(plot)

Test whether this class can be merged with the provided container.

Parameters:

plot (PlotContainer) – PlotContainer to merge.

Return type:

bool

Returns:

True if mergeable, False otherwise.

compute_plot_params(x=None, y=None, z=None)

Compute the plot parameters (required for discretized color maps).

Parameters:
Returns:

Computed plot parameters.

computed_color_bar(data)

Compute the color bar (required for discretized color maps).

Parameters:

data (ndarray) – Data to be drawn.

Return type:

AxeParams

Returns:

Computed color map.

data: xr.Dataset
data_used: xr.Dataset = None
draw(*, fig_handler=None, ax_type=MAIN)

Draw the provided container’s data.

Parameters:
  • fig_handler (FigureHandler) – Figure handler on which to draw.

  • ax_type (AxeType) – Axe’s type on which to draw.

property field: Field

Field of the main variable represented by this data.

field_x: Field
field_y: Field
field_z: Field = None
property fig_handler: FigureHandler
classmethod get_class(dtype)
Parameters:

dtype (DataType)

Return type:

type[PlotContainer]

index: str | None = None
init_figure(interactive=False)

Initialize a figure.

Parameters:

interactive (bool) – Whether to use an interactive (pyplot figure or not)

initialize(reset=True)

Initialize this container.

Parameters:

reset (bool) – Whether to reset the plot to its initial parameters or not (default to true).

is_drawn: bool = False
name: str
orf: ong_indexer.PassIndexer | None = None
classmethod register()

Register a virtual subclass of an ABC.

Returns the subclass, to allow usage as a class decorator.

remove_events()

Remove all events from this plot.

set_data_params(params)

Change the plot’s data parameters.

Parameters:

params (DataParams) – Plot’s data parameters.

set_data_transform(*, transform)

Update the data center value.

Parameters:

transform (Union[str, int, float, Callable, None]) – Value, clip like str or function to use on the plot data.

set_element_params(element, params)

Change the element parameters.

Parameters:
set_legend(label)
Parameters:

label (str)

set_new_data(data)

Change the data used for the plot.

Parameters:

data (Dataset) – New data to use.

set_plot_params(params)

Change the plot’s visualization parameters.

Parameters:

params (PlotParams) – Plot’s visualization parameters.

set_size(*, width, height)

Set the figure size.

Parameters:
  • width (float) – Width of the figure.

  • height (float) – Height of the figure.

set_text_params(params)

Change the text parameters and refresh it.

Parameters:

params (TextParams) – Text parameters.

set_text_size(size, elements)
Parameters:
set_ticks(*, axt, fmt, params=None)

Change ticks labels on specified axis.

Parameters:
  • axt (AxisType) – Axis on which to change the ticks.

  • fmt (CyclePassFmt | None) – Cycle / pass format to display (‘C’, ‘P’ or ‘CP’) if not None.

  • params (AxeParams) – axe parameters.

set_title(title)
Parameters:

title (str)

set_xlabel(label)
Parameters:

label (str)

set_ylabel(label)
Parameters:

label (str)

stat: StatType
property stype: DataType

PlotContainer type.

template: PlotTemplate
vador_plots()

Generate a list of vador plots for this container.

Return type:

list[Operation]

Returns:

List of vador plots.

property variable: str

Name of the main variable represented by this data.

class casys.visualization.diagnostics.RawComparisonPlot3DScatter(name, field_x, field_y, data, stat, orf=None, template=<factory>, field_z=None, index=None, time=None)

Bases: RawPlot3DScatter

Plot class representing a raw comparison data.

Parameters:
  • name (str) – Name of the data.

  • field_x (Field) – Field used for x axes.

  • field_y (Field) – Field used for y axes.

  • data (xr.Dataset) – Data as a dataset.

  • stat (StatType) – Statistic included in this data.

  • orf (ong_indexer.PassIndexer | None) – Orf used to read data

  • template (PlotTemplate) – Parameters template to use.

  • field_z (Field) – Field used for z axes.

  • index (str | None) – Name of the data index.

  • time (str | None)

add_color_bar(*, params)
Parameters:

params (AxeParams)

add_event(*, event)
Parameters:

event (CasysEvent) – Event to add.

add_hist_bar(params)
Parameters:

params (AxeParams)

add_plot(container, shared_ax)
Parameters:
add_stat_bar(*, params)
Parameters:

params (AxeParams)

add_stat_graph(*, params)
Parameters:

params (AxeParams)

add_ticks_space(*, space, position)

Add ticks space at the given position.

Parameters:
  • space (float) – Space to add.

  • position (Position) – Position where to add space.

add_watermark(params)
Parameters:

params (WatermarkParams)

adjust_coordinates(longitude, latitude)

Adjust plots longitudes and latitudes coordinates.

Parameters:
  • longitude (float) – Value to add.

  • latitude (float) – Value to add.

ax: mpl_axes_t.Axes | carto_geo_ax_t.GeoAxes = None
property axis_fields: dict[str, str]

Dictionary of axis fields (x, y, and z) with their field name.

classmethod can_add_hist_bar()

Whether this class allow the addition of a hist_graph element or not.

Return type:

bool

Returns:

True or False.

classmethod can_add_stat_graph(for_axis)

Whether this class allow the addition of a stat_graph element for a specific axis or not.

Parameters:

for_axis (TargetAxisType) – Axis (x, y or z)

Return type:

bool

Returns:

True or False.

can_merge_with(plot)

Test whether this class can be merged with the provided container.

Parameters:

plot (PlotContainer) – PlotContainer to merge.

Return type:

bool

Returns:

True if mergeable, False otherwise.

compute_plot_params(x=None, y=None, z=None)

Compute the plot parameters (required for discretized color maps).

Parameters:
Returns:

Computed plot parameters.

computed_color_bar(data)

Compute the color bar (required for discretized color maps).

Parameters:

data (ndarray) – Data to be drawn.

Return type:

AxeParams

Returns:

Computed color map.

data: xr.Dataset
data_used: xr.Dataset = None
draw(*, fig_handler=None, ax_type=MAIN)

Draw the provided container’s data.

Parameters:
  • fig_handler (FigureHandler) – Figure handler on which to draw.

  • ax_type (AxeType) – Axe’s type on which to draw.

property field: Field

Field of the main variable represented by this data.

field_x: Field
field_y: Field
field_z: Field = None
property fig_handler: FigureHandler
classmethod get_class(dtype)
Parameters:

dtype (DataType)

Return type:

type[PlotContainer]

index: str | None = None
init_figure(interactive=False)

Initialize a figure.

Parameters:

interactive (bool) – Whether to use an interactive (pyplot figure or not)

initialize(reset=True)

Initialize this container.

Parameters:

reset (bool) – Whether to reset the plot to its initial parameters or not (default to true).

is_drawn: bool = False
name: str
orf: ong_indexer.PassIndexer | None = None
classmethod register()

Register a virtual subclass of an ABC.

Returns the subclass, to allow usage as a class decorator.

remove_events()

Remove all events from this plot.

set_data_params(params)

Change the plot’s data parameters.

Parameters:

params (DataParams) – Plot’s data parameters.

set_data_transform(*, transform)

Update the data center value.

Parameters:

transform (Union[str, int, float, Callable, None]) – Value, clip like str or function to use on the plot data.

set_element_params(element, params)

Change the element parameters.

Parameters:
set_legend(label)
Parameters:

label (str)

set_new_data(data)

Change the data used for the plot.

Parameters:

data (Dataset) – New data to use.

set_plot_params(params)

Change the plot’s visualization parameters.

Parameters:

params (PlotParams) – Plot’s visualization parameters.

set_size(*, width, height)

Set the figure size.

Parameters:
  • width (float) – Width of the figure.

  • height (float) – Height of the figure.

set_text_params(params)

Change the text parameters and refresh it.

Parameters:

params (TextParams) – Text parameters.

set_text_size(size, elements)
Parameters:
set_ticks(*, axt, fmt, params=None)

Change ticks labels on specified axis.

Parameters:
  • axt (AxisType) – Axis on which to change the ticks.

  • fmt (CyclePassFmt | None) – Cycle / pass format to display (‘C’, ‘P’ or ‘CP’) if not None.

  • params (AxeParams) – axe parameters.

set_title(title)
Parameters:

title (str)

set_xlabel(label)
Parameters:

label (str)

set_ylabel(label)
Parameters:

label (str)

stat: StatType
property stype: DataType

PlotContainer type.

template: PlotTemplate
time: str | None = None
vador_plots()

Generate a list of vador plots for this container.

Return type:

list[Operation]

Returns:

List of vador plots.

property variable: str

Name of the main variable represented by this data.

class casys.visualization.diagnostics.RawComparisonPlot3DSurface(name, field_x, field_y, data, stat, orf=None, template=<factory>, field_z=None, index=None, time=None)

Bases: RawPlot3DSurface

Plot class representing a raw comparison data.

Parameters:
  • name (str) – Name of the data.

  • field_x (Field) – Field used for x axes.

  • field_y (Field) – Field used for y axes.

  • data (xr.Dataset) – Data as a dataset.

  • stat (StatType) – Statistic included in this data.

  • orf (ong_indexer.PassIndexer | None) – Orf used to read data

  • template (PlotTemplate) – Parameters template to use.

  • field_z (Field) – Field used for z axes.

  • index (str | None) – Name of the data index.

  • time (str | None)

add_color_bar(*, params)
Parameters:

params (AxeParams)

add_event(*, event)
Parameters:

event (CasysEvent) – Event to add.

add_hist_bar(params)
Parameters:

params (AxeParams)

add_plot(container, shared_ax)
Parameters:
add_stat_bar(*, params)
Parameters:

params (AxeParams)

add_stat_graph(*, params)
Parameters:

params (AxeParams)

add_ticks_space(*, space, position)

Add ticks space at the given position.

Parameters:
  • space (float) – Space to add.

  • position (Position) – Position where to add space.

add_watermark(params)
Parameters:

params (WatermarkParams)

adjust_coordinates(longitude, latitude)

Adjust plots longitudes and latitudes coordinates.

Parameters:
  • longitude (float) – Value to add.

  • latitude (float) – Value to add.

ax: mpl_axes_t.Axes | carto_geo_ax_t.GeoAxes = None
property axis_fields: dict[str, str]

Dictionary of axis fields (x, y, and z) with their field name.

classmethod can_add_hist_bar()

Whether this class allow the addition of a hist_graph element or not.

Return type:

bool

Returns:

True or False.

classmethod can_add_stat_graph(for_axis)

Whether this class allow the addition of a stat_graph element for a specific axis or not.

Parameters:

for_axis (TargetAxisType) – Axis (x, y or z)

Return type:

bool

Returns:

True or False.

can_merge_with(plot)

Test whether this class can be merged with the provided container.

Parameters:

plot (PlotContainer) – PlotContainer to merge.

Return type:

bool

Returns:

True if mergeable, False otherwise.

compute_plot_params(x=None, y=None, z=None)

Compute the plot parameters (required for discretized color maps).

Parameters:
Returns:

Computed plot parameters.

computed_color_bar(data)

Compute the color bar (required for discretized color maps).

Parameters:

data (ndarray) – Data to be drawn.

Return type:

AxeParams

Returns:

Computed color map.

data: xr.Dataset
data_used: xr.Dataset = None
draw(*, fig_handler=None, ax_type=MAIN)

Draw the provided container’s data.

Parameters:
  • fig_handler (FigureHandler) – Figure handler on which to draw.

  • ax_type (AxeType) – Axe’s type on which to draw.

property field: Field

Field of the main variable represented by this data.

field_x: Field
field_y: Field
field_z: Field = None
property fig_handler: FigureHandler
classmethod get_class(dtype)
Parameters:

dtype (DataType)

Return type:

type[PlotContainer]

index: str | None = None
init_figure(interactive=False)

Initialize a figure.

Parameters:

interactive (bool) – Whether to use an interactive (pyplot figure or not)

initialize(reset=True)

Initialize this container.

Parameters:

reset (bool) – Whether to reset the plot to its initial parameters or not (default to true).

is_drawn: bool = False
name: str
orf: ong_indexer.PassIndexer | None = None
classmethod register()

Register a virtual subclass of an ABC.

Returns the subclass, to allow usage as a class decorator.

remove_events()

Remove all events from this plot.

set_data_params(params)

Change the plot’s data parameters.

Parameters:

params (DataParams) – Plot’s data parameters.

set_data_transform(*, transform)

Update the data center value.

Parameters:

transform (Union[str, int, float, Callable, None]) – Value, clip like str or function to use on the plot data.

set_element_params(element, params)

Change the element parameters.

Parameters:
set_legend(label)
Parameters:

label (str)

set_new_data(data)

Change the data used for the plot.

Parameters:

data (Dataset) – New data to use.

set_plot_params(params)

Change the plot’s visualization parameters.

Parameters:

params (PlotParams) – Plot’s visualization parameters.

set_size(*, width, height)

Set the figure size.

Parameters:
  • width (float) – Width of the figure.

  • height (float) – Height of the figure.

set_text_params(params)

Change the text parameters and refresh it.

Parameters:

params (TextParams) – Text parameters.

set_text_size(size, elements)
Parameters:
set_ticks(*, axt, fmt, params=None)

Change ticks labels on specified axis.

Parameters:
  • axt (AxisType) – Axis on which to change the ticks.

  • fmt (CyclePassFmt | None) – Cycle / pass format to display (‘C’, ‘P’ or ‘CP’) if not None.

  • params (AxeParams) – axe parameters.

set_title(title)
Parameters:

title (str)

set_xlabel(label)
Parameters:

label (str)

set_ylabel(label)
Parameters:

label (str)

stat: StatType
property stype: DataType

PlotContainer type.

template: PlotTemplate
time: str | None = None
vador_plots()

Generate a list of vador plots for this container.

Return type:

list[Operation]

Returns:

List of vador plots.

property variable: str

Name of the main variable represented by this data.

class casys.visualization.diagnostics.RawPlot(name, field_x, field_y, data, stat, orf=None, template=<factory>, field_z=None, index=None, time=None)

Bases: BaseRawPlot

Plot class representing a raw data.

Parameters:
  • name (str) – Name of the data.

  • field_x (Field) – Field used for x axes.

  • field_y (Field) – Field used for y axes.

  • data (xr.Dataset) – Data as a dataset.

  • stat (StatType) – Statistic included in this data.

  • orf (ong_indexer.PassIndexer | None) – Orf used to read data

  • template (PlotTemplate) – Parameters template to use.

  • field_z (Field) – Field used for z axes.

  • index (str | None) – Name of the data index.

  • time (str | None) – Name of the time variable. Optional.

add_color_bar(*, params)
Parameters:

params (AxeParams)

add_event(*, event)
Parameters:

event (CasysEvent) – Event to add.

add_hist_bar(params)
Parameters:

params (AxeParams)

add_plot(container, shared_ax)
Parameters:
add_stat_bar(*, params)
Parameters:

params (AxeParams)

add_stat_graph(*, params)
Parameters:

params (AxeParams)

add_ticks_space(*, space, position)

Add ticks space at the given position.

Parameters:
  • space (float) – Space to add.

  • position (Position) – Position where to add space.

add_watermark(params)
Parameters:

params (WatermarkParams)

adjust_coordinates(longitude, latitude)

Adjust plots longitudes and latitudes coordinates.

Parameters:
  • longitude (float) – Value to add.

  • latitude (float) – Value to add.

ax: mpl_axes_t.Axes | carto_geo_ax_t.GeoAxes = None
property axis_fields: dict[str, str]

Dictionary of axis fields (x, y, and z) with their field name.

classmethod can_add_hist_bar()

Whether this class allow the addition of a hist_graph element or not.

Return type:

bool

Returns:

True or False.

classmethod can_add_stat_graph(for_axis)

Whether this class allow the addition of a stat_graph element for a specific axis or not.

Parameters:

for_axis (TargetAxisType) – Axis (x, y or z)

Return type:

bool

Returns:

True or False.

can_merge_with(plot)

Test whether this class can be merged with the provided container.

Parameters:

plot (PlotContainer) – PlotContainer to merge.

Return type:

bool

Returns:

True if mergeable, False otherwise.

compute_plot_params(x=None, y=None, z=None)

Compute the plot parameters (required for discretized color maps).

Parameters:
Returns:

Computed plot parameters.

computed_color_bar(data)

Compute the color bar (required for discretized color maps).

Parameters:

data (ndarray) – Data to be drawn.

Return type:

AxeParams

Returns:

Computed color map.

data: xr.Dataset
data_used: xr.Dataset = None
draw(*, fig_handler=None, ax_type=MAIN)

Draw the provided container’s data.

Parameters:
  • fig_handler (FigureHandler) – Figure handler on which to draw.

  • ax_type (AxeType) – Axe’s type on which to draw.

property field: Field

Field of the main variable represented by this data.

field_x: Field
field_y: Field
field_z: Field = None
property fig_handler: FigureHandler
classmethod get_class(dtype)
Parameters:

dtype (DataType)

Return type:

type[PlotContainer]

index: str | None = None
init_figure(interactive=False)

Initialize a figure.

Parameters:

interactive (bool) – Whether to use an interactive (pyplot figure or not)

initialize(reset=True)

Initialize this container.

Parameters:

reset (bool) – Whether to reset the plot to its initial parameters or not (default to true).

is_drawn: bool = False
name: str
orf: ong_indexer.PassIndexer | None = None
classmethod register()

Register a virtual subclass of an ABC.

Returns the subclass, to allow usage as a class decorator.

remove_events()

Remove all events from this plot.

set_data_params(params)

Change the plot’s data parameters.

Parameters:

params (DataParams) – Plot’s data parameters.

set_data_transform(*, transform)

Update the data center value.

Parameters:

transform (Union[str, int, float, Callable, None]) – Value, clip like str or function to use on the plot data.

set_element_params(element, params)

Change the element parameters.

Parameters:
set_legend(label)
Parameters:

label (str)

set_new_data(data)

Change the data used for the plot.

Parameters:

data (Dataset) – New data to use.

set_plot_params(params)

Change the plot’s visualization parameters.

Parameters:

params (PlotParams) – Plot’s visualization parameters.

set_size(*, width, height)

Set the figure size.

Parameters:
  • width (float) – Width of the figure.

  • height (float) – Height of the figure.

set_text_params(params)

Change the text parameters and refresh it.

Parameters:

params (TextParams) – Text parameters.

set_text_size(size, elements)
Parameters:
set_ticks(*, axt, fmt, params=None)

Change ticks labels on specified axis.

Parameters:
  • axt (AxisType) – Axis on which to change the ticks.

  • fmt (CyclePassFmt | None) – Cycle / pass format to display (‘C’, ‘P’ or ‘CP’) if not None.

  • params (AxeParams) – axe parameters.

set_title(title)
Parameters:

title (str)

set_xlabel(label)
Parameters:

label (str)

set_ylabel(label)
Parameters:

label (str)

stat: StatType
property stype: DataType

PlotContainer type.

template: PlotTemplate
time: str | None = None
vador_plots()

Generate a list of vador plots for this container.

Return type:

list[Operation]

Returns:

List of vador plots.

property variable: str

Name of the main variable represented by this data.

class casys.visualization.diagnostics.RawPlot3DScatter(name, field_x, field_y, data, stat, orf=None, template=<factory>, field_z=None, index=None, time=None)

Bases: RawPlot

Plot class representing a raw data as scatter in 3D.

Parameters:
  • name (str) – Name of the data.

  • field_x (Field) – Field used for x axes.

  • field_y (Field) – Field used for y axes.

  • data (xr.Dataset) – Data as a dataset.

  • stat (StatType) – Statistic included in this data.

  • orf (ong_indexer.PassIndexer | None) – Orf used to read data

  • template (PlotTemplate) – Parameters template to use.

  • field_z (Field) – Field used for z axes.

  • index (str | None) – Name of the data index.

  • time (str | None) – Name of the time variable. Optional.

add_color_bar(*, params)
Parameters:

params (AxeParams)

add_event(*, event)
Parameters:

event (CasysEvent) – Event to add.

add_hist_bar(params)
Parameters:

params (AxeParams)

add_plot(container, shared_ax)
Parameters:
add_stat_bar(*, params)
Parameters:

params (AxeParams)

add_stat_graph(*, params)
Parameters:

params (AxeParams)

add_ticks_space(*, space, position)

Add ticks space at the given position.

Parameters:
  • space (float) – Space to add.

  • position (Position) – Position where to add space.

add_watermark(params)
Parameters:

params (WatermarkParams)

adjust_coordinates(longitude, latitude)

Adjust plots longitudes and latitudes coordinates.

Parameters:
  • longitude (float) – Value to add.

  • latitude (float) – Value to add.

ax: mpl_axes_t.Axes | carto_geo_ax_t.GeoAxes = None
property axis_fields: dict[str, str]

Dictionary of axis fields (x, y, and z) with their field name.

classmethod can_add_hist_bar()

Whether this class allow the addition of a hist_graph element or not.

Return type:

bool

Returns:

True or False.

classmethod can_add_stat_graph(for_axis)

Whether this class allow the addition of a stat_graph element for a specific axis or not.

Parameters:

for_axis (TargetAxisType) – Axis (x, y or z)

Return type:

bool

Returns:

True or False.

can_merge_with(plot)

Test whether this class can be merged with the provided container.

Parameters:

plot (PlotContainer) – PlotContainer to merge.

Return type:

bool

Returns:

True if mergeable, False otherwise.

compute_plot_params(x=None, y=None, z=None)

Compute the plot parameters (required for discretized color maps).

Parameters:
Returns:

Computed plot parameters.

computed_color_bar(data)

Compute the color bar (required for discretized color maps).

Parameters:

data (ndarray) – Data to be drawn.

Return type:

AxeParams

Returns:

Computed color map.

data: xr.Dataset
data_used: xr.Dataset = None
draw(*, fig_handler=None, ax_type=MAIN)

Draw the provided container’s data.

Parameters:
  • fig_handler (FigureHandler) – Figure handler on which to draw.

  • ax_type (AxeType) – Axe’s type on which to draw.

property field: Field

Field of the main variable represented by this data.

field_x: Field
field_y: Field
field_z: Field = None
property fig_handler: FigureHandler
classmethod get_class(dtype)
Parameters:

dtype (DataType)

Return type:

type[PlotContainer]

index: str | None = None
init_figure(interactive=False)

Initialize a figure.

Parameters:

interactive (bool) – Whether to use an interactive (pyplot figure or not)

initialize(reset=True)

Initialize this container.

Parameters:

reset (bool) – Whether to reset the plot to its initial parameters or not (default to true).

is_drawn: bool = False
name: str
orf: ong_indexer.PassIndexer | None = None
classmethod register()

Register a virtual subclass of an ABC.

Returns the subclass, to allow usage as a class decorator.

remove_events()

Remove all events from this plot.

set_data_params(params)

Change the plot’s data parameters.

Parameters:

params (DataParams) – Plot’s data parameters.

set_data_transform(*, transform)

Update the data center value.

Parameters:

transform (Union[str, int, float, Callable, None]) – Value, clip like str or function to use on the plot data.

set_element_params(element, params)

Change the element parameters.

Parameters:
set_legend(label)
Parameters:

label (str)

set_new_data(data)

Change the data used for the plot.

Parameters:

data (Dataset) – New data to use.

set_plot_params(params)

Change the plot’s visualization parameters.

Parameters:

params (PlotParams) – Plot’s visualization parameters.

set_size(*, width, height)

Set the figure size.

Parameters:
  • width (float) – Width of the figure.

  • height (float) – Height of the figure.

set_text_params(params)

Change the text parameters and refresh it.

Parameters:

params (TextParams) – Text parameters.

set_text_size(size, elements)
Parameters:
set_ticks(*, axt, fmt, params=None)

Change ticks labels on specified axis.

Parameters:
  • axt (AxisType) – Axis on which to change the ticks.

  • fmt (CyclePassFmt | None) – Cycle / pass format to display (‘C’, ‘P’ or ‘CP’) if not None.

  • params (AxeParams) – axe parameters.

set_title(title)
Parameters:

title (str)

set_xlabel(label)
Parameters:

label (str)

set_ylabel(label)
Parameters:

label (str)

stat: StatType
property stype: DataType

PlotContainer type.

template: PlotTemplate
time: str | None = None
vador_plots()

Generate a list of vador plots for this container.

Return type:

list[Operation]

Returns:

List of vador plots.

property variable: str

Name of the main variable represented by this data.

class casys.visualization.diagnostics.RawPlot3DSurface(name, field_x, field_y, data, stat, orf=None, template=<factory>, field_z=None, index=None, time=None)

Bases: RawPlot

Plot class representing a raw data as a surface in 3D.

Parameters:
  • name (str) – Name of the data.

  • field_x (Field) – Field used for x axes.

  • field_y (Field) – Field used for y axes.

  • data (xr.Dataset) – Data as a dataset.

  • stat (StatType) – Statistic included in this data.

  • orf (ong_indexer.PassIndexer | None) – Orf used to read data

  • template (PlotTemplate) – Parameters template to use.

  • field_z (Field) – Field used for z axes.

  • index (str | None) – Name of the data index.

  • time (str | None) – Name of the time variable. Optional.

add_color_bar(*, params)
Parameters:

params (AxeParams)

add_event(*, event)
Parameters:

event (CasysEvent) – Event to add.

add_hist_bar(params)
Parameters:

params (AxeParams)

add_plot(container, shared_ax)
Parameters:
add_stat_bar(*, params)
Parameters:

params (AxeParams)

add_stat_graph(*, params)
Parameters:

params (AxeParams)

add_ticks_space(*, space, position)

Add ticks space at the given position.

Parameters:
  • space (float) – Space to add.

  • position (Position) – Position where to add space.

add_watermark(params)
Parameters:

params (WatermarkParams)

adjust_coordinates(longitude, latitude)

Adjust plots longitudes and latitudes coordinates.

Parameters:
  • longitude (float) – Value to add.

  • latitude (float) – Value to add.

ax: mpl_axes_t.Axes | carto_geo_ax_t.GeoAxes = None
property axis_fields: dict[str, str]

Dictionary of axis fields (x, y, and z) with their field name.

classmethod can_add_hist_bar()

Whether this class allow the addition of a hist_graph element or not.

Return type:

bool

Returns:

True or False.

classmethod can_add_stat_graph(for_axis)

Whether this class allow the addition of a stat_graph element for a specific axis or not.

Parameters:

for_axis (TargetAxisType) – Axis (x, y or z)

Return type:

bool

Returns:

True or False.

can_merge_with(plot)

Test whether this class can be merged with the provided container.

Parameters:

plot (PlotContainer) – PlotContainer to merge.

Return type:

bool

Returns:

True if mergeable, False otherwise.

compute_plot_params(x=None, y=None, z=None)

Compute the plot parameters (required for discretized color maps).

Parameters:
Returns:

Computed plot parameters.

computed_color_bar(data)

Compute the color bar (required for discretized color maps).

Parameters:

data (ndarray) – Data to be drawn.

Return type:

AxeParams

Returns:

Computed color map.

data: xr.Dataset
data_used: xr.Dataset = None
draw(*, fig_handler=None, ax_type=MAIN)

Draw the provided container’s data.

Parameters:
  • fig_handler (FigureHandler) – Figure handler on which to draw.

  • ax_type (AxeType) – Axe’s type on which to draw.

property field: Field

Field of the main variable represented by this data.

field_x: Field
field_y: Field
field_z: Field = None
property fig_handler: FigureHandler
classmethod get_class(dtype)
Parameters:

dtype (DataType)

Return type:

type[PlotContainer]

index: str | None = None
init_figure(interactive=False)

Initialize a figure.

Parameters:

interactive (bool) – Whether to use an interactive (pyplot figure or not)

initialize(reset=True)

Initialize this container.

Parameters:

reset (bool) – Whether to reset the plot to its initial parameters or not (default to true).

is_drawn: bool = False
name: str
orf: ong_indexer.PassIndexer | None = None
classmethod register()

Register a virtual subclass of an ABC.

Returns the subclass, to allow usage as a class decorator.

remove_events()

Remove all events from this plot.

set_data_params(params)

Change the plot’s data parameters.

Parameters:

params (DataParams) – Plot’s data parameters.

set_data_transform(*, transform)

Update the data center value.

Parameters:

transform (Union[str, int, float, Callable, None]) – Value, clip like str or function to use on the plot data.

set_element_params(element, params)

Change the element parameters.

Parameters:
set_legend(label)
Parameters:

label (str)

set_new_data(data)

Change the data used for the plot.

Parameters:

data (Dataset) – New data to use.

set_plot_params(params)

Change the plot’s visualization parameters.

Parameters:

params (PlotParams) – Plot’s visualization parameters.

set_size(*, width, height)

Set the figure size.

Parameters:
  • width (float) – Width of the figure.

  • height (float) – Height of the figure.

set_text_params(params)

Change the text parameters and refresh it.

Parameters:

params (TextParams) – Text parameters.

set_text_size(size, elements)
Parameters:
set_ticks(*, axt, fmt, params=None)

Change ticks labels on specified axis.

Parameters:
  • axt (AxisType) – Axis on which to change the ticks.

  • fmt (CyclePassFmt | None) – Cycle / pass format to display (‘C’, ‘P’ or ‘CP’) if not None.

  • params (AxeParams) – axe parameters.

set_title(title)
Parameters:

title (str)

set_xlabel(label)
Parameters:

label (str)

set_ylabel(label)
Parameters:

label (str)

stat: StatType
property stype: DataType

PlotContainer type.

template: PlotTemplate
time: str | None = None
vador_plots()

Generate a list of vador plots for this container.

Return type:

list[Operation]

Returns:

List of vador plots.

property variable: str

Name of the main variable represented by this data.

class casys.visualization.diagnostics.ScatterPlot(name, field_x, field_y, data, stat, orf=None, template=<factory>, field_z=None)

Bases: CommonBinned2dPlot

Plot class representing a scatter statistic.

Parameters:
  • name (str) – Name of the data.

  • field_x (Field) – Field used for x axes.

  • field_y (Field) – Field used for y axes.

  • data (xr.Dataset) – Data as a dataset.

  • stat (StatType) – Statistic included in this data.

  • orf (ong_indexer.PassIndexer | None) – Orf used to read data

  • template (PlotTemplate) – Parameters template to use.

  • field_z (Field) – Field used for z axes.

add_color_bar(*, params)
Parameters:

params (AxeParams)

add_event(*, event)
Parameters:

event (CasysEvent) – Event to add.

add_hist_bar(params)
Parameters:

params (AxeParams)

add_plot(container, shared_ax)
Parameters:
add_stat_bar(*, params)
Parameters:

params (AxeParams)

add_stat_graph(*, params)
Parameters:

params (AxeParams)

add_ticks_space(*, space, position)

Add ticks space at the given position.

Parameters:
  • space (float) – Space to add.

  • position (Position) – Position where to add space.

add_watermark(params)
Parameters:

params (WatermarkParams)

adjust_coordinates(longitude, latitude)

Adjust plots longitudes and latitudes coordinates.

Parameters:
  • longitude (float) – Value to add.

  • latitude (float) – Value to add.

ax: mpl_axes_t.Axes | carto_geo_ax_t.GeoAxes = None
property axis_fields: dict[str, str]

Dictionary of axis fields (x, y, and z) with their field name.

classmethod can_add_hist_bar()

Whether this class allow the addition of a hist_graph element or not.

Return type:

bool

Returns:

True or False.

classmethod can_add_stat_graph(for_axis)

Whether this class allow the addition of a stat_graph element for a specific axis or not.

Parameters:

for_axis (TargetAxisType) – Axis (x, y or z)

Return type:

bool

Returns:

True or False.

can_merge_with(plot)

Test whether this class can be merged with the provided container.

Parameters:

plot (PlotContainer) – PlotContainer to merge.

Return type:

bool

Returns:

True if mergeable, False otherwise.

compute_plot_params(x=None, y=None, z=None)

Compute the plot parameters (required for discretized color maps).

Parameters:
Returns:

Computed plot parameters.

computed_color_bar(data)

Compute the color bar (required for discretized color maps).

Parameters:

data (ndarray) – Data to be drawn.

Return type:

AxeParams

Returns:

Computed color map.

data: xr.Dataset
data_used: xr.Dataset = None
draw(*, fig_handler=None, ax_type=MAIN)

Draw the provided container’s data.

Parameters:
  • fig_handler (FigureHandler) – Figure handler on which to draw.

  • ax_type (AxeType) – Axe’s type on which to draw.

property field: Field

Field of the main variable represented by this data.

field_x: Field
field_y: Field
field_z: Field = None
property fig_handler: FigureHandler
classmethod get_class(dtype)
Parameters:

dtype (DataType)

Return type:

type[PlotContainer]

init_figure(interactive=False)

Initialize a figure.

Parameters:

interactive (bool) – Whether to use an interactive (pyplot figure or not)

initialize(reset=True)

Initialize this container.

Parameters:

reset (bool) – Whether to reset the plot to its initial parameters or not (default to true).

is_drawn: bool = False
name: str
orf: ong_indexer.PassIndexer | None = None
classmethod register()

Register a virtual subclass of an ABC.

Returns the subclass, to allow usage as a class decorator.

remove_events()

Remove all events from this plot.

set_data_params(params)

Change the plot’s data parameters.

Parameters:

params (DataParams) – Plot’s data parameters.

set_data_transform(*, transform)

Update the data center value.

Parameters:

transform (Union[str, int, float, Callable, None]) – Value, clip like str or function to use on the plot data.

set_element_params(element, params)

Change the element parameters.

Parameters:
set_legend(label)
Parameters:

label (str)

set_new_data(data)

Change the data used for the plot.

Parameters:

data (Dataset) – New data to use.

set_plot_params(params)

Change the plot’s visualization parameters.

Parameters:

params (PlotParams) – Plot’s visualization parameters.

set_size(*, width, height)

Set the figure size.

Parameters:
  • width (float) – Width of the figure.

  • height (float) – Height of the figure.

set_text_params(params)

Change the text parameters and refresh it.

Parameters:

params (TextParams) – Text parameters.

set_text_size(size, elements)
Parameters:
set_ticks(*, axt, fmt, params=None)

Change ticks labels on specified axis.

Parameters:
  • axt (AxisType) – Axis on which to change the ticks.

  • fmt (CyclePassFmt | None) – Cycle / pass format to display (‘C’, ‘P’ or ‘CP’) if not None.

  • params (AxeParams) – axe parameters.

set_title(title)
Parameters:

title (str)

set_xlabel(label)
Parameters:

label (str)

set_ylabel(label)
Parameters:

label (str)

stat: StatType
property stype: DataType

PlotContainer type.

template: PlotTemplate
vador_plots()

Generate a list of vador plots for this container.

Return type:

list[Operation]

Returns:

List of vador plots.

property variable: str

Name of the main variable represented by this data.

class casys.visualization.diagnostics.SectionPlot(name, field_x, field_y, data, stat, orf=None, template=<factory>, field_z=None, index=None, time=None, analysis=None, sections=None)

Bases: RawPlot

Plot class representing section analyses data.

Parameters:
  • name (str) – Name of the data.

  • field_x (Field) – Field used for x axes.

  • field_y (Field) – Field used for y axes.

  • data (xr.Dataset) – Data as a dataset.

  • stat (StatType) – Statistic included in this data.

  • orf (ong_indexer.PassIndexer | None) – Orf used to read data

  • template (PlotTemplate) – Parameters template to use.

  • field_z (Field) – Field used for z axes.

  • index (str | None) – Name of the data index.

  • time (str | None) – Name of the time variable. Optional.

  • analysis (ong_gts_t.Analysis) – Computed analysis.

  • sections (list[int] | None) – Sections’ numbers.

add_color_bar(*, params)
Parameters:

params (AxeParams)

add_event(*, event)
Parameters:

event (CasysEvent) – Event to add.

add_hist_bar(params)
Parameters:

params (AxeParams)

add_plot(container, shared_ax)
Parameters:
add_stat_bar(*, params)
Parameters:

params (AxeParams)

add_stat_graph(*, params)
Parameters:

params (AxeParams)

add_ticks_space(*, space, position)

Add ticks space at the given position.

Parameters:
  • space (float) – Space to add.

  • position (Position) – Position where to add space.

add_watermark(params)
Parameters:

params (WatermarkParams)

adjust_coordinates(longitude, latitude)

Adjust plots longitudes and latitudes coordinates.

Parameters:
  • longitude (float) – Value to add.

  • latitude (float) – Value to add.

analysis: ong_gts_t.Analysis = None
ax: mpl_axes_t.Axes | carto_geo_ax_t.GeoAxes = None
property axis_fields: dict[str, str]

Dictionary of axis fields (x, y, and z) with their field name.

classmethod can_add_hist_bar()

Whether this class allow the addition of a hist_graph element or not.

Return type:

bool

Returns:

True or False.

classmethod can_add_stat_graph(for_axis)

Whether this class allow the addition of a stat_graph element for a specific axis or not.

Parameters:

for_axis (TargetAxisType) – Axis (x, y or z)

Return type:

bool

Returns:

True or False.

can_merge_with(plot)

Test whether this class can be merged with the provided container.

Parameters:

plot (PlotContainer) – PlotContainer to merge.

Return type:

bool

Returns:

True if mergeable, False otherwise.

compute_plot_params(x=None, y=None, z=None)

Compute the plot parameters (required for discretized color maps).

Parameters:
Returns:

Computed plot parameters.

computed_color_bar(data)

Compute the color bar (required for discretized color maps).

Parameters:

data (ndarray) – Data to be drawn.

Return type:

AxeParams

Returns:

Computed color map.

data: xr.Dataset
data_used: xr.Dataset = None
draw(*, fig_handler=None, ax_type=MAIN)

Draw the provided container’s data.

Parameters:
  • fig_handler (FigureHandler) – Figure handler on which to draw.

  • ax_type (AxeType) – Axe’s type on which to draw.

property field: Field

Field of the main variable represented by this data.

field_x: Field
field_y: Field
field_z: Field = None
property fig_handler: FigureHandler
classmethod get_class(dtype)
Parameters:

dtype (DataType)

Return type:

type[PlotContainer]

index: str | None = None
init_figure(interactive=False)

Initialize a figure.

Parameters:

interactive (bool) – Whether to use an interactive (pyplot figure or not)

initialize(reset=True)

Initialize this container.

Parameters:

reset (bool) – Whether to reset the plot to its initial parameters or not (default to true).

is_drawn: bool = False
name: str
orf: ong_indexer.PassIndexer | None = None
classmethod register()

Register a virtual subclass of an ABC.

Returns the subclass, to allow usage as a class decorator.

remove_events()

Remove all events from this plot.

sections: list[int] | None = None
set_data_params(params)

Change the plot’s data parameters.

Parameters:

params (DataParams) – Plot’s data parameters.

set_data_transform(*, transform)

Update the data center value.

Parameters:

transform (Union[str, int, float, Callable, None]) – Value, clip like str or function to use on the plot data.

set_element_params(element, params)

Change the element parameters.

Parameters:
set_legend(label)
Parameters:

label (str)

set_new_data(data)

Change the data used for the plot.

Parameters:

data (Dataset) – New data to use.

set_plot_params(params)

Change the plot’s visualization parameters.

Parameters:

params (PlotParams) – Plot’s visualization parameters.

set_size(*, width, height)

Set the figure size.

Parameters:
  • width (float) – Width of the figure.

  • height (float) – Height of the figure.

set_text_params(params)

Change the text parameters and refresh it.

Parameters:

params (TextParams) – Text parameters.

set_text_size(size, elements)
Parameters:
set_ticks(*, axt, fmt, params=None)

Change ticks labels on specified axis.

Parameters:
  • axt (AxisType) – Axis on which to change the ticks.

  • fmt (CyclePassFmt | None) – Cycle / pass format to display (‘C’, ‘P’ or ‘CP’) if not None.

  • params (AxeParams) – axe parameters.

set_title(title)
Parameters:

title (str)

set_xlabel(label)
Parameters:

label (str)

set_ylabel(label)
Parameters:

label (str)

stat: StatType
property stype: DataType

PlotContainer type.

template: PlotTemplate
time: str | None = None
vador_plots()

Generate a list of vador plots for this container.

Return type:

list[Operation]

Returns:

List of vador plots.

property variable: str

Name of the main variable represented by this data.

class casys.visualization.diagnostics.SpectralAnalysisIndividualPsdPlot(name, field_x, field_y, data, stat, orf=None, template=<factory>, res_x=None, spectral_name=None, spectral_kwargs=None, pixel=None, second_axis=None, n_bins_psd=None)

Bases: BinnedPlot

Plot class representing a multiple PSD Plot for SpectralAnalysisDiag.

Parameters:
  • spectral_name (str | None) – Spectral curve name to display.

  • spectral_kwargs (dict[str, Any] | None) – Associated spectral kwargs of the curve.

  • pixel (int | tuple | None) – Pixel value in the SwathData case.

  • second_axis (bool | None) – Flag indicating whether to draw or not a second axis.

  • n_bins_psd (int | None) – Integer determining the number of bins along the psd values axis.

  • name (str)

  • field_x (Field)

  • field_y (Field)

  • data (xr.Dataset)

  • stat (StatType)

  • orf (ong_indexer.PassIndexer | None)

  • template (PlotTemplate)

  • res_x (DataResolution)

add_color_bar(*, params)
Parameters:

params (AxeParams)

add_event(*, event)
Parameters:

event (CasysEvent) – Event to add.

add_hist_bar(params)
Parameters:

params (AxeParams)

add_plot(container, shared_ax)
Parameters:
add_stat_bar(*, params)
Parameters:

params (AxeParams)

add_stat_graph(*, params)
Parameters:

params (AxeParams)

add_ticks_space(*, space, position)

Add ticks space at the given position.

Parameters:
  • space (float) – Space to add.

  • position (Position) – Position where to add space.

add_watermark(params)
Parameters:

params (WatermarkParams)

adjust_coordinates(longitude, latitude)

Adjust plots longitudes and latitudes coordinates.

Parameters:
  • longitude (float) – Value to add.

  • latitude (float) – Value to add.

ax: mpl_axes_t.Axes | carto_geo_ax_t.GeoAxes = None
axis_fields()

Dictionary of axis fields (x, y, and z) with their field name.

Return type:

dict[str, str]

classmethod can_add_hist_bar()

Whether this class allow the addition of a hist_graph element or not.

Return type:

bool

Returns:

True or False.

classmethod can_add_stat_graph(for_axis)

Whether this class allow the addition of a stat_graph element for a specific axis or not.

Parameters:

for_axis (TargetAxisType) – Axis (x, y or z)

Return type:

bool

Returns:

True or False.

can_merge_with(plot)

Test whether this class can be merged with the provided container.

Parameters:

plot (PlotContainer) – PlotContainer to merge.

Return type:

bool

Returns:

True if mergeable, False otherwise.

compute_plot_params(x=None, y=None, z=None)

Compute the plot parameters (required for discretized color maps).

Parameters:
Returns:

Computed plot parameters.

computed_color_bar(data)

Compute the color bar (required for discretized color maps).

Parameters:

data (ndarray) – Data to be drawn.

Return type:

AxeParams

Returns:

Computed color map.

data: xr.Dataset
data_used: xr.Dataset = None
draw(*, fig_handler=None, ax_type=MAIN)

Draw the provided container’s data.

Parameters:
  • fig_handler (FigureHandler) – Figure handler on which to draw.

  • ax_type (AxeType) – Axe’s type on which to draw.

property field: Field

Field of the main variable represented by this data.

field_x: Field
field_y: Field
property fig_handler: FigureHandler
classmethod get_class(dtype)
Parameters:

dtype (DataType)

Return type:

type[PlotContainer]

init_figure(interactive=False)

Initialize a figure.

Parameters:

interactive (bool) – Whether to use an interactive (pyplot figure or not)

initialize(reset=True)

Initialize this container.

Parameters:

reset (bool) – Whether to reset the plot to its initial parameters or not (default to true).

is_drawn: bool = False
n_bins_psd: int | None = None
name: str
orf: ong_indexer.PassIndexer | None = None
pixel: int | tuple | None = None
classmethod register()

Register a virtual subclass of an ABC.

Returns the subclass, to allow usage as a class decorator.

remove_events()

Remove all events from this plot.

res_x: DataResolution = None
second_axis: bool | None = None
set_data_params(params)

Change the plot’s data parameters.

Parameters:

params (DataParams) – Plot’s data parameters.

set_data_transform(*, transform)

Update the data center value.

Parameters:

transform (Union[str, int, float, Callable, None]) – Value, clip like str or function to use on the plot data.

set_element_params(element, params)

Change the element parameters.

Parameters:
set_legend(label)
Parameters:

label (str)

set_new_data(data)

Change the data used for the plot.

Parameters:

data (Dataset) – New data to use.

set_plot_params(params)

Change the plot’s visualization parameters.

Parameters:

params (PlotParams) – Plot’s visualization parameters.

set_size(*, width, height)

Set the figure size.

Parameters:
  • width (float) – Width of the figure.

  • height (float) – Height of the figure.

set_text_params(params)

Change the text parameters and refresh it.

Parameters:

params (TextParams) – Text parameters.

set_text_size(size, elements)
Parameters:
set_ticks(*, axt, fmt, params=None)

Change ticks labels on specified axis.

Parameters:
  • axt (AxisType) – Axis on which to change the ticks.

  • fmt (CyclePassFmt | None) – Cycle / pass format to display (‘C’, ‘P’ or ‘CP’) if not None.

  • params (AxeParams) – axe parameters.

set_title(title)
Parameters:

title (str)

set_xlabel(label)
Parameters:

label (str)

set_ylabel(label)
Parameters:

label (str)

spectral_kwargs: dict[str, Any] | None = None
spectral_name: str | None = None
stat: StatType
property stype: DataType

PlotContainer type.

template: PlotTemplate
vador_plots()

Generate a list of vador plots for this container.

Return type:

list[Operation]

Returns:

List of vador plots.

property variable: str

Name of the main variable represented by this data.

class casys.visualization.diagnostics.SpectralAnalysisPsdPlot(name, field_x, field_y, data, stat, orf=None, template=<factory>, res_x=None, spectral_name=None, spectral_kwargs=None, pixel=None, second_axis=None)

Bases: BinnedPlot

Plot class representing a merged PSD Plot for SpectralAnalysisDiag.

Parameters:
  • spectral_name (str | None) – Spectral curve name to display.

  • spectral_kwargs (dict[str, Any] | None) – Associated spectral kwargs of the curve.

  • pixel (int | tuple | None) – Pixel value in the SwathData case.

  • second_axis (bool | None) – Flag indicating whether to draw or not a second axis.

  • name (str)

  • field_x (Field)

  • field_y (Field)

  • data (xr.Dataset)

  • stat (StatType)

  • orf (ong_indexer.PassIndexer | None)

  • template (PlotTemplate)

  • res_x (DataResolution)

add_color_bar(*, params)
Parameters:

params (AxeParams)

add_event(*, event)
Parameters:

event (CasysEvent) – Event to add.

add_hist_bar(params)
Parameters:

params (AxeParams)

add_plot(container, shared_ax)
Parameters:
add_stat_bar(*, params)
Parameters:

params (AxeParams)

add_stat_graph(*, params)
Parameters:

params (AxeParams)

add_ticks_space(*, space, position)

Add ticks space at the given position.

Parameters:
  • space (float) – Space to add.

  • position (Position) – Position where to add space.

add_watermark(params)
Parameters:

params (WatermarkParams)

adjust_coordinates(longitude, latitude)

Adjust plots longitudes and latitudes coordinates.

Parameters:
  • longitude (float) – Value to add.

  • latitude (float) – Value to add.

ax: mpl_axes_t.Axes | carto_geo_ax_t.GeoAxes = None
axis_fields()

Dictionary of axis fields (x, y, and z) with their field name.

Return type:

dict[str, str]

classmethod can_add_hist_bar()

Whether this class allow the addition of a hist_graph element or not.

Return type:

bool

Returns:

True or False.

classmethod can_add_stat_graph(for_axis)

Whether this class allow the addition of a stat_graph element for a specific axis or not.

Parameters:

for_axis (TargetAxisType) – Axis (x, y or z)

Return type:

bool

Returns:

True or False.

can_merge_with(plot)

Test whether this class can be merged with the provided container.

Parameters:

plot (PlotContainer) – PlotContainer to merge.

Return type:

bool

Returns:

True if mergeable, False otherwise.

compute_plot_params(x=None, y=None, z=None)

Compute the plot parameters (required for discretized color maps).

Parameters:
Returns:

Computed plot parameters.

computed_color_bar(data)

Compute the color bar (required for discretized color maps).

Parameters:

data (ndarray) – Data to be drawn.

Return type:

AxeParams

Returns:

Computed color map.

data: xr.Dataset
data_used: xr.Dataset = None
draw(*, fig_handler=None, ax_type=MAIN)

Draw the provided container’s data.

Parameters:
  • fig_handler (FigureHandler) – Figure handler on which to draw.

  • ax_type (AxeType) – Axe’s type on which to draw.

property field: Field

Field of the main variable represented by this data.

field_x: Field
field_y: Field
property fig_handler: FigureHandler
classmethod get_class(dtype)
Parameters:

dtype (DataType)

Return type:

type[PlotContainer]

init_figure(interactive=False)

Initialize a figure.

Parameters:

interactive (bool) – Whether to use an interactive (pyplot figure or not)

initialize(reset=True)

Initialize this container.

Parameters:

reset (bool) – Whether to reset the plot to its initial parameters or not (default to true).

is_drawn: bool = False
name: str
orf: ong_indexer.PassIndexer | None = None
pixel: int | tuple | None = None
classmethod register()

Register a virtual subclass of an ABC.

Returns the subclass, to allow usage as a class decorator.

remove_events()

Remove all events from this plot.

res_x: DataResolution = None
second_axis: bool | None = None
set_data_params(params)

Change the plot’s data parameters.

Parameters:

params (DataParams) – Plot’s data parameters.

set_data_transform(*, transform)

Update the data center value.

Parameters:

transform (Union[str, int, float, Callable, None]) – Value, clip like str or function to use on the plot data.

set_element_params(element, params)

Change the element parameters.

Parameters:
set_legend(label)
Parameters:

label (str)

set_new_data(data)

Change the data used for the plot.

Parameters:

data (Dataset) – New data to use.

set_plot_params(params)

Change the plot’s visualization parameters.

Parameters:

params (PlotParams) – Plot’s visualization parameters.

set_size(*, width, height)

Set the figure size.

Parameters:
  • width (float) – Width of the figure.

  • height (float) – Height of the figure.

set_text_params(params)

Change the text parameters and refresh it.

Parameters:

params (TextParams) – Text parameters.

set_text_size(size, elements)
Parameters:
set_ticks(*, axt, fmt, params=None)

Change ticks labels on specified axis.

Parameters:
  • axt (AxisType) – Axis on which to change the ticks.

  • fmt (CyclePassFmt | None) – Cycle / pass format to display (‘C’, ‘P’ or ‘CP’) if not None.

  • params (AxeParams) – axe parameters.

set_title(title)
Parameters:

title (str)

set_xlabel(label)
Parameters:

label (str)

set_ylabel(label)
Parameters:

label (str)

spectral_kwargs: dict[str, Any] | None = None
spectral_name: str | None = None
stat: StatType
property stype: DataType

PlotContainer type.

template: PlotTemplate
vador_plots()

Generate a list of vador plots for this container.

Return type:

list[Operation]

Returns:

List of vador plots.

property variable: str

Name of the main variable represented by this data.

class casys.visualization.diagnostics.SpectralAnalysisSegmentPlot(name, field_x, field_y, data, stat, orf=None, template=<factory>, field_z=None, index=None, time=None, pixel=None)

Bases: RawPlot

Plot class representing segments of a spectral analysis.

Parameters:
  • name (str) – Name of the data.

  • field_x (Field) – Field used for x axes.

  • field_y (Field) – Field used for y axes.

  • data (xr.Dataset) – Data as a dataset.

  • stat (StatType) – Statistic included in this data.

  • orf (ong_indexer.PassIndexer | None) – Orf used to read data

  • template (PlotTemplate) – Parameters template to use.

  • field_z (Field) – Field used for z axes.

  • index (str | None) – Name of the data index.

  • time (str | None) – Name of the time variable. Optional.

  • pixel (int | tuple | None) – Number of the pixel used to compute this analysis.

add_color_bar(*, params)
Parameters:

params (AxeParams)

add_event(*, event)
Parameters:

event (CasysEvent) – Event to add.

add_hist_bar(params)
Parameters:

params (AxeParams)

add_plot(container, shared_ax)
Parameters:
add_stat_bar(*, params)
Parameters:

params (AxeParams)

add_stat_graph(*, params)
Parameters:

params (AxeParams)

add_ticks_space(*, space, position)

Add ticks space at the given position.

Parameters:
  • space (float) – Space to add.

  • position (Position) – Position where to add space.

add_watermark(params)
Parameters:

params (WatermarkParams)

adjust_coordinates(longitude, latitude)

Adjust plots longitudes and latitudes coordinates.

Parameters:
  • longitude (float) – Value to add.

  • latitude (float) – Value to add.

ax: mpl_axes_t.Axes | carto_geo_ax_t.GeoAxes = None
property axis_fields: dict[str, str]

Dictionary of axis fields (x, y, and z) with their field name.

classmethod can_add_hist_bar()

Whether this class allow the addition of a hist_graph element or not.

Return type:

bool

Returns:

True or False.

classmethod can_add_stat_graph(for_axis)

Whether this class allow the addition of a stat_graph element for a specific axis or not.

Parameters:

for_axis (TargetAxisType) – Axis (x, y or z)

Return type:

bool

Returns:

True or False.

can_merge_with(plot)

Test whether this class can be merged with the provided container.

Parameters:

plot (PlotContainer) – PlotContainer to merge.

Return type:

bool

Returns:

True if mergeable, False otherwise.

compute_plot_params(x=None, y=None, z=None)

Compute the plot parameters (required for discretized color maps).

Parameters:
Returns:

Computed plot parameters.

computed_color_bar(data)

Compute the color bar (required for discretized color maps).

Parameters:

data (ndarray) – Data to be drawn.

Return type:

AxeParams

Returns:

Computed color map.

data: xr.Dataset
data_used: xr.Dataset = None
draw(*, fig_handler=None, ax_type=MAIN)

Draw the provided container’s data.

Parameters:
  • fig_handler (FigureHandler) – Figure handler on which to draw.

  • ax_type (AxeType) – Axe’s type on which to draw.

property field: Field

Field of the main variable represented by this data.

field_x: Field
field_y: Field
field_z: Field = None
property fig_handler: FigureHandler
classmethod get_class(dtype)
Parameters:

dtype (DataType)

Return type:

type[PlotContainer]

index: str | None = None
init_figure(interactive=False)

Initialize a figure.

Parameters:

interactive (bool) – Whether to use an interactive (pyplot figure or not)

initialize(reset=True)

Initialize this container.

Parameters:

reset (bool) – Whether to reset the plot to its initial parameters or not (default to true).

is_drawn: bool = False
name: str
orf: ong_indexer.PassIndexer | None = None
pixel: int | tuple | None = None
classmethod register()

Register a virtual subclass of an ABC.

Returns the subclass, to allow usage as a class decorator.

remove_events()

Remove all events from this plot.

set_data_params(params)

Change the plot’s data parameters.

Parameters:

params (DataParams) – Plot’s data parameters.

set_data_transform(*, transform)

Update the data center value.

Parameters:

transform (Union[str, int, float, Callable, None]) – Value, clip like str or function to use on the plot data.

set_element_params(element, params)

Change the element parameters.

Parameters:
set_legend(label)
Parameters:

label (str)

set_new_data(data)

Change the data used for the plot.

Parameters:

data (Dataset) – New data to use.

set_plot_params(params)

Change the plot’s visualization parameters.

Parameters:

params (PlotParams) – Plot’s visualization parameters.

set_size(*, width, height)

Set the figure size.

Parameters:
  • width (float) – Width of the figure.

  • height (float) – Height of the figure.

set_text_params(params)

Change the text parameters and refresh it.

Parameters:

params (TextParams) – Text parameters.

set_text_size(size, elements)
Parameters:
set_ticks(*, axt, fmt, params=None)

Change ticks labels on specified axis.

Parameters:
  • axt (AxisType) – Axis on which to change the ticks.

  • fmt (CyclePassFmt | None) – Cycle / pass format to display (‘C’, ‘P’ or ‘CP’) if not None.

  • params (AxeParams) – axe parameters.

set_title(title)
Parameters:

title (str)

set_xlabel(label)
Parameters:

label (str)

set_ylabel(label)
Parameters:

label (str)

stat: StatType
property stype: DataType

PlotContainer type.

template: PlotTemplate
time: str | None = None
property title
vador_plots()

Generate a list of vador plots for this container.

Return type:

list[Operation]

Returns:

List of vador plots.

property variable: str

Name of the main variable represented by this data.

class casys.visualization.diagnostics.TimePlot(name, field_x, field_y, data, stat, orf=None, template=<factory>, res_x=None, freq=RAW)

Bases: BinnedPlot

Plot class representing a time statistic.

Parameters:
  • name (str) – Name of the data.

  • field_x (Field) – Field used for x axes.

  • field_y (Field) – Field used for y axes.

  • data (xr.Dataset) – Data as a dataset.

  • stat (StatType) – Statistic included in this data.

  • orf (ong_indexer.PassIndexer | None) – Orf used to read data

  • template (PlotTemplate) – Parameters template to use.

  • res_x (DataResolution) – Min, max and width for the x-axis.

  • freq (FreqType) – Frequency (day, pass, cycle)

add_color_bar(*, params)
Parameters:

params (AxeParams)

add_event(*, event)
Parameters:

event (CasysEvent) – Event to add.

add_hist_bar(params)
Parameters:

params (AxeParams)

add_plot(container, shared_ax)
Parameters:
add_stat_bar(*, params)
Parameters:

params (AxeParams)

add_stat_graph(*, params)
Parameters:

params (AxeParams)

add_ticks_space(*, space, position)

Add ticks space at the given position.

Parameters:
  • space (float) – Space to add.

  • position (Position) – Position where to add space.

add_watermark(params)
Parameters:

params (WatermarkParams)

adjust_coordinates(longitude, latitude)

Adjust plots longitudes and latitudes coordinates.

Parameters:
  • longitude (float) – Value to add.

  • latitude (float) – Value to add.

ax: mpl_axes_t.Axes | carto_geo_ax_t.GeoAxes = None
property axis_fields: dict[str, str]

Dictionary of axis fields (x, y, and z) with their field name.

classmethod can_add_hist_bar()

Whether this class allow the addition of a hist_graph element or not.

Return type:

bool

Returns:

True or False.

classmethod can_add_stat_graph(for_axis)

Whether this class allow the addition of a stat_graph element for a specific axis or not.

Parameters:

for_axis (TargetAxisType) – Axis (x, y or z)

Return type:

bool

Returns:

True or False.

can_merge_with(plot)

Test whether this class can be merged with the provided container.

Parameters:

plot (PlotContainer) – PlotContainer to merge.

Return type:

bool

Returns:

True if mergeable, False otherwise.

compute_plot_params(x=None, y=None, z=None)

Compute the plot parameters (required for discretized color maps).

Parameters:
Returns:

Computed plot parameters.

computed_color_bar(data)

Compute the color bar (required for discretized color maps).

Parameters:

data (ndarray) – Data to be drawn.

Return type:

AxeParams

Returns:

Computed color map.

data: xr.Dataset
data_used: xr.Dataset = None
draw(*, fig_handler=None, ax_type=MAIN)

Draw the provided container’s data.

Parameters:
  • fig_handler (FigureHandler) – Figure handler on which to draw.

  • ax_type (AxeType) – Axe’s type on which to draw.

property field: Field

Field of the main variable represented by this data.

field_x: Field
field_y: Field
property fig_handler: FigureHandler
freq: FreqType = 4
classmethod get_class(dtype)
Parameters:

dtype (DataType)

Return type:

type[PlotContainer]

init_figure(interactive=False)

Initialize a figure.

Parameters:

interactive (bool) – Whether to use an interactive (pyplot figure or not)

initialize(reset=True)

Initialize this container.

Parameters:

reset (bool) – Whether to reset the plot to its initial parameters or not (default to true).

is_drawn: bool = False
name: str
orf: ong_indexer.PassIndexer | None = None
classmethod register()

Register a virtual subclass of an ABC.

Returns the subclass, to allow usage as a class decorator.

remove_events()

Remove all events from this plot.

res_x: DataResolution = None
set_data_params(params)

Change the plot’s data parameters.

Parameters:

params (DataParams) – Plot’s data parameters.

set_data_transform(*, transform)

Update the data center value.

Parameters:

transform (Union[str, int, float, Callable, None]) – Value, clip like str or function to use on the plot data.

set_element_params(element, params)

Change the element parameters.

Parameters:
set_legend(label)
Parameters:

label (str)

set_new_data(data)

Change the data used for the plot.

Parameters:

data (Dataset) – New data to use.

set_plot_params(params)

Change the plot’s visualization parameters.

Parameters:

params (PlotParams) – Plot’s visualization parameters.

set_size(*, width, height)

Set the figure size.

Parameters:
  • width (float) – Width of the figure.

  • height (float) – Height of the figure.

set_text_params(params)

Change the text parameters and refresh it.

Parameters:

params (TextParams) – Text parameters.

set_text_size(size, elements)
Parameters:
set_ticks(*, axt, fmt, params=None)

Change ticks labels on specified axis.

Parameters:
  • axt (AxisType) – Axis on which to change the ticks.

  • fmt (CyclePassFmt | None) – Cycle / pass format to display (‘C’, ‘P’ or ‘CP’) if not None.

  • params (AxeParams) – axe parameters.

set_title(title)
Parameters:

title (str)

set_xlabel(label)
Parameters:

label (str)

set_ylabel(label)
Parameters:

label (str)

stat: StatType
property stype: DataType

PlotContainer type.

template: PlotTemplate
vador_plots()

Generate a list of vador plots for this container.

Return type:

list[Operation]

Returns:

List of vador plots.

property variable: str

Name of the main variable represented by this data.