Quick overview

A Cal/Val diagnostic can be set, executed and visualized in a few steps, detailed below.

Select your data source

First we have to define the data source and time interval we want to work on.
Defining time interval is done using DateHandler, a utility class allowing to create dates from many formats including python, numpy and pandas dates as well as altimetric related dates like ORF or julian days.
from casys import DateHandler

start = DateHandler("2019-06-01 05:30:00")
end = DateHandler("2019-06-07 05:30:00")
NadirData and SwathData are the data containers allowing to set and compute statistics and diagnostics by interfacing with different kind of input sources.
In the following example the used source is a CLS table.
from casys import NadirData

ad = NadirData(
    date_start=start,
    date_end=end,
    source="TABLE_C_J3_B_GDRD",
    orf="C_J3_GDRD",
)

Define your diagnostic fields

The Field object is used when specifying diagnostics (raw data, statistics, …) to reference a field (or variable) included in the data source.
Field can be manually created (to dynamically combine multiple fields) or extracted from the source.
The show_fields() method allows to visualize and search among all existing fields.
# Display all fields included in the data source
ad.show_fields()

# Or a set of fields containing the provided string ("SIGMA0" here)
ad.show_fields(containing="SIGMA0")
Name Description Unit
ATMOSPHERIC_ATTENUATION_SIGMA0.ALTIAtténuation atmosphérique du coefficient de rétrodiffusion en bande principaledB
ATMOSPHERIC_ATTENUATION_SIGMA0.ALTI.B2Atténuation atmosphérique du coefficient de rétrodiffusion en bande secondairedB
FLAG_QUAL.ALTI.NET_INSTR_CORR_SIGMA00: good, 1: bad.1
FLAG_QUAL.ALTI.NET_INSTR_CORR_SIGMA0_B20: good, 1: bad.1
SIGMA0.ALTIAll instrumental corrections included, excepted the system bias, i.e. AGC instrumental errors correction, internal calibration dB
SIGMA0.ALTI.B2All instrumental corrections included, excepted the system bias, i.e. AGC instrumental errors correction, internal calibration dB
SIGMA0.ALTI.RTK_MLE3Coefficient de rétrodiffusion en bande principale (rtk MLE3)dB
SIGMA0_BIAS.ALTIBiais du SIGMA0 par rapport à une valeur moyenne de référencedB
SIGMA0_NET_INSTRUMENTAL_CORRECTION.ALTISum of AGC instrumental errors correction, internal calibration correction and modeled instrumental errors correction - system dB
SIGMA0_NET_INSTRUMENTAL_CORRECTION.ALTI.B2Sum of AGC instrumental errors correction, internal calibration correction and modeled instrumental errors correction - system dB
SIGMA0_NET_INSTRUMENTAL_CORRECTION.ALTI.RTK_MLE3Somme des corrections instrumentales sur le sigma0 en bande principale (rtk MLE3)dB
SIGMA0_NUMBER.ALTINombre de mesures elementaires de sigma0 en bande principalecount
SIGMA0_NUMBER.ALTI.B2Nombre de mesures elementaires de sigma0 en bande secondairecount
SIGMA0_NUMBER.ALTI.RTK_MLE3Nombre de mesures elementaires de sigma0 en bande principale (rtk MLE3)count
SIGMA0_STD.ALTICompression of high rate elements is preceded by a detection of outliers. Only valid high-rate values are used to compute this dB
SIGMA0_STD.ALTI.B2Compression of high rate elements is preceded by a detection of outliers. Only valid high-rate values are used to compute this dB
SIGMA0_STD.ALTI.RTK_MLE3Ecart-type des mesures elementaires de sigma0 en bande principale (rtk MLE3)dB
These fields can then be extracted through the fields property.
var_sig0 = ad.fields["SIGMA0.ALTI"]

Set up your diagnostic

Once the source, time interval and fields are defined, we can specify the diagnostics themselves.
In this example we are setting an along time diagnostic computing the SIG0 mean per pass, using the add_time_stat() method.
ad.add_time_stat(
    name="SIG0 pass",
    freq="pass",
    field=var_sig0,
    stats=["mean"]
)

Compute it

The diagnostic can now be computed with the compute() method.
ad.compute()

Visualize it

Once computed a diagnostic can be visualized.
CasysPlot is a plotting tool allowing to visualize diagnostics computed with NadirData or SwathData and easily perform predefined actions as well as exposing the matplotlib figure for more advanced customizations.
from casys import CasysPlot

sigpass_mean_plot = CasysPlot(
    data=ad,
    data_name="SIG0 pass",
    stat="mean"
)
sigpass_mean_plot.show()
_images/overview_6_0.png