Scatter diagnostics
Scatter diagnostics are added using the
add_scatter()
method.The distribution of the field
x
will be computed against the y
according to
their respective res_x
and res_y
resolutions.Add a scatter diagnostic computing the distribution of on field
against the other according to their respective resolutions.
Parameters
----------
name
Name of the diagnostic.
x
Field used for the x-axis.
y
Field used for the y-axis.
res_x
Min, max and width for the x-axis.
res_y
Min, max and width for the y-axis.
This kind of diagnostic is plotted as pseudo-color plots with a non-regular
rectangular grid.
Diagnostic setting
In the following example we are setting a scatter diagnostic computing the dispersion
of a user defined
range_std_ku
field against an other user defined range_std_c
field using a using a step of 0.001 for range_std_ku
values between 0 and 0.2 and
a step of 0.01 for range_std_c
values between 0 and 2.from casys import Field
range_std_ku = Field(
name="range_std_ku",
source="IIF(FLAG_VAL.ALTI==0, RANGE_STD.ALTI, DV)",
unit="m",
)
range_std_c = Field(
name="range_std_c",
source="IIF(FLAG_VAL.ALTI==0, RANGE_STD.ALTI.B2, DV)",
unit="m",
)
ad.add_scatter(
name="Scatter Ku-band Range std / C-band Range std",
x=range_std_ku,
y=range_std_c,
res_x=(0, 0.2, 0.001),
res_y=(0, 2, 0.01),
)
ad.compute()
Diagnostic plotting
Scatter diagnostics are plotted as pseudo-color plots with a non-regular rectangular
grid.
The regression curve can be displayed (default) or hidden by providing a
PlotParams
with its show_reg
set to False.from casys import CasysPlot, PlotParams
plot = CasysPlot(
data=ad,
data_name="Scatter Ku-band Range std / C-band Range std",
plot_params=PlotParams(show_reg=True),
)
plot.show()

Regression curve parameters are available in the data_used
attributes of the plot:
reg_slope
reg_intercept
reg_correlation
plot.data_used.attrs
{'reg_slope': np.float64(1.0542935634469273),
'reg_intercept': np.float64(0.0909196441533355),
'reg_correlation': np.float64(0.4068337781571026)}