pysiral.cryosat2.functions
Created on Tue Jul 14 14:48:01 2015
@author: Stefan
Classes
A post-processing class for CryoSat-2 l1p data that resamples the SIN waveform group |
|
A post-processing class for CryoSat-2 l1p data that resamples the SIN waveform group |
|
Class to compute radar backscatter coefficient (sigma0) directly |
Functions
|
Converts the Cryosat-2 waveform counts into a physical unit (Watts) |
|
Calculates the range value of each range bin in the waveform |
|
|
|
Converts the TAI MDSR timestamp into a datetime object |
|
Returns the information in the CryoSat-2 l1b filename |
|
Reads the XML header file of a CryoSat-2 L1b Data set |
|
Compute the CryoSat-2 LRM footprint for variable range to the surface. |
|
Compute the CryoSat-2 SAR footprint for variable range to the surface. |
|
Compute LRM backscatter with optional mispointing and bias correction. |
Module Contents
- class pysiral.cryosat2.functions.L1PWaveformResampleSIN(**cfg)
Bases:
pysiral.l1preproc.procitems.L1PProcItemA post-processing class for CryoSat-2 l1p data that resamples the SIN waveform group to the same size as SAR waveform group
- apply(l1: pysiral.l1data.Level1bData) None
API class for the Level-1 pre-processor. Functionality is reduce the size of the waveform power and range arrays for SIN data to the one for SAR data. :param l1: A Level-1 data instance :return: None, Level-1 object is change in place
- class pysiral.cryosat2.functions.L1PWaveformPadLRM(**cfg)
Bases:
pysiral.l1preproc.procitems.L1PProcItemA post-processing class for CryoSat-2 l1p data that resamples the SIN waveform group to the same size as SAR waveform group
- apply(l1: pysiral.l1data.Level1bData) None
API class for the Level-1 pre-processor. Functionality is to reduce the size of the waveform power and range arrays for SIN data to the one for SAR data.
- Parameters:
l1 – A Level-1 data instance
- Returns:
None, Level-1 object is change in place
- class pysiral.cryosat2.functions.L1PCryoSat2Sigma0(**cfg)
Bases:
pysiral.l1preproc.procitems.L1PProcItemClass to compute radar backscatter coefficient (sigma0) directly from waveform data.
- apply(l1: pysiral.l1data.Level1bData)
Compute the radar backscatter coefficient across all CryoSat-2 radar modes. This method first gets the variables needed for sigma0 computation of all radar modes and the leave the specifics to the respective sub_methods.
Finally, two variables (sigma0 and peak_power) are added to the classifier container of the Level-1 data container.
- Parameters:
l1 – The Level-1 data container
- Returns:
None, Level-1 data container is changed in place
- _get_sigma0_sar_sin(l1: pysiral.l1data.Level1bData, sar_sin_idxs: numpy.typing.NDArray, rx_power: numpy.typing.NDArray, tx_power: numpy.typing.NDArray, rng: numpy.typing.NDArray) numpy.typing.NDArray
Compute sigma0 for SAR/SARin
- Parameters:
l1 – The Level-1 data container
rx_power
tx_power
- Returns:
- static _get_sigma0_lrm(l1: pysiral.l1data.Level1bData, lrm_idxs: numpy.typing.NDArray, rx_power: numpy.typing.NDArray, tx_power: numpy.typing.NDArray, rng: numpy.typing.NDArray) numpy.typing.NDArray
Compute sigma0 for LRM
- Parameters:
l1 – The Level-1 data container
rx_power
tx_power
- Returns:
- static _get_orbit_velocity_from_l1(l1: pysiral.l1data.Level1bData) numpy.typing.NDArray
Computes total orbital velocity
- Parameters:
l1
- Returns:
velocity
- pysiral.cryosat2.functions.get_cryosat2_wfm_power(counts, linear_scale, power_scale)
Converts the Cryosat-2 waveform counts into a physical unit (Watts)
Applicable Documents
CryoSat-2 User Handbook, L1B Parameters
Arguments
- counts (int list)
unscaled echo waveform (typically:
l1b.waveform.wfm)- linear_scale (int)
linear scale factor (typically:
l1b.waveform.linear_scale)- power_scale (int)
power scale factor (typically:
l1b.waveform.power_scale)
Returns
float list with echo power in Watts
- pysiral.cryosat2.functions.get_cryosat2_wfm_range(window_delay, n_range_bins)
Calculates the range value of each range bin in the waveform
Applicable Documents
CryoSat-2 User Handbook, Range Window and Window Delay
Arguments
- window_delay (float)
two-way delay time in seconds from the CryoSat-2 data L1b file
- n_range_bins (int)
Number of range bins (the length of the waveform list)
Returns
- wfm_range
range value in meterfrom the satellite to each range bin in the waveform
Notes
It is assumed that the two way delay time (window delay) already contains instrument related range corrections
No other range corrections are applied here
The bandwidth of CryoSat-2 (320Mhz) is hard-coded here
- pysiral.cryosat2.functions.get_cryosat2_wfm_range_userhandbook(window_delay, n_range_bins)
- pysiral.cryosat2.functions.get_tai_datetime_from_timestamp(mdsr_timestamp)
Converts the TAI MDSR timestamp into a datetime object
Background
The timestamp in the CryoSat-2 data files is given as days since January 1, 2000, seconds of the day and microseconds of the day.
Arguments
- mdsr_timestamp (object or object list)
any class object with attributes day, sec, msec (attributes must be of type int)
Return
datetime object with date and time in TAI
- pysiral.cryosat2.functions.parse_cryosat_l1b_filename(filename)
Returns the information in the CryoSat-2 l1b filename
- pysiral.cryosat2.functions.parse_cryosat_l1b_xml_header(filename)
Reads the XML header file of a CryoSat-2 L1b Data set and returns the contents as an OrderedDict
- pysiral.cryosat2.functions.get_footprint_lrm(r: float, band_width: float = 320000000.0) float
Compute the CryoSat-2 LRM footprint for variable range to the surface.
Applicable Documents:
Michele Scagliola, CryoSat Footprints ESA/Aresys, v1.2 ESA document ref: XCRY-GSEG-EOPG-TN-13-0013
- Parameters:
r – range from satellite center of mass to surface reflection point
(to be appoximated by satellite altitude if no retracker range available) :param band_width: CryoSat-2 pulse bandwidth in Hz
- Return sigma_0:
Radar backscatter coefficient
- pysiral.cryosat2.functions.get_footprint_sar(r: float, v_s: float, ptr_width: float = 2.819e-09, tau_b: float = 0.00352, lambda_0: float = 0.022084, wf: float = 1.0, r_mean: float = 6371000.0) float
Compute the CryoSat-2 SAR footprint for variable range to the surface.
Applicable Documents:
Michele Scagliola, CryoSat Footprints ESA/Aresys, v1.2 ESA document ref: XCRY-GSEG-EOPG-TN-13-0013
- Parameters:
r – range from satellite center of mass to surface reflection point
(to be appoximated by satellite altitude if no retracker range available) :param r: range from satellite center of mass to surface reflection point
(to be appoximated by satellite altitude if no retracker range available)
- Parameters:
v_s – satellite along track velocity in meter/sec
ptr_width – 3dB range point target response temporal width in seconds (default: 2.819e-09 sec for CryoSat-2 SAR)
tau_b – burst length in seconds (default: 0.00352 sec for CryoSat-2 SAR)
lambda_0 – radar wavelength in meter (default: 0.022084 m for CryoSat-2 Ku Band altimeter)
wf – footprint widening factor (1.486 * rv in case of Hamming window application on burst data; rv: unspecified empirical factor) (default: 1 no weighting window application)
r_mean – mean earth radius in meter
- Return area_sar:
The SAR footprint in square meters
- pysiral.cryosat2.functions.cryosat2_sigma0_lrm(rng: float, p_rx: float, roll_deg: float, pitch_deg: float, p_tx: float = 22.4, sigma_bias: float = 0.0) float
Compute LRM backscatter with optional mispointing and bias correction. The code was supplied by David Brockley <d.brockley@ucl.ac.uk>.
- Parameters:
rng – range to the surface
p_rx – rx power
roll_deg
pitch_deg
p_tx – tx power
sigma_bias – sigma0 bias (default: 0.0)
- Raises:
None –
- Returns: