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.ALTI | Atténuation atmosphérique du coefficient de rétrodiffusion en bande principale | dB |
ATMOSPHERIC_ATTENUATION_SIGMA0.ALTI.B2 | Atténuation atmosphérique du coefficient de rétrodiffusion en bande secondaire | dB |
FLAG_QUAL.ALTI.NET_INSTR_CORR_SIGMA0 | 0: good, 1: bad. | 1 |
FLAG_QUAL.ALTI.NET_INSTR_CORR_SIGMA0_B2 | 0: good, 1: bad. | 1 |
SIGMA0.ALTI | All instrumental corrections included, excepted the system bias, i.e. AGC instrumental errors correction, internal calibration | dB |
SIGMA0.ALTI.B2 | All instrumental corrections included, excepted the system bias, i.e. AGC instrumental errors correction, internal calibration | dB |
SIGMA0.ALTI.RTK_MLE3 | Coefficient de rétrodiffusion en bande principale (rtk MLE3) | dB |
SIGMA0_BIAS.ALTI | Biais du SIGMA0 par rapport à une valeur moyenne de référence | dB |
SIGMA0_NET_INSTRUMENTAL_CORRECTION.ALTI | Sum of AGC instrumental errors correction, internal calibration correction and modeled instrumental errors correction - system | dB |
SIGMA0_NET_INSTRUMENTAL_CORRECTION.ALTI.B2 | Sum of AGC instrumental errors correction, internal calibration correction and modeled instrumental errors correction - system | dB |
SIGMA0_NET_INSTRUMENTAL_CORRECTION.ALTI.RTK_MLE3 | Somme des corrections instrumentales sur le sigma0 en bande principale (rtk MLE3) | dB |
SIGMA0_NUMBER.ALTI | Nombre de mesures elementaires de sigma0 en bande principale | count |
SIGMA0_NUMBER.ALTI.B2 | Nombre de mesures elementaires de sigma0 en bande secondaire | count |
SIGMA0_NUMBER.ALTI.RTK_MLE3 | Nombre de mesures elementaires de sigma0 en bande principale (rtk MLE3) | count |
SIGMA0_STD.ALTI | Compression 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.B2 | Compression 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_MLE3 | Ecart-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.
from casys import CasysPlot
sigpass_mean_plot = CasysPlot(
data=ad,
data_name="SIG0 pass",
stat="mean"
)
sigpass_mean_plot.show()
