def _get_altimeter_freeboard(self, l1b, l2): """ Compute radar freeboard and its uncertainty """ afrbalg = get_frb_algorithm(self.l2def.afrb.pyclass) if self.l2def.afrb.options is not None: afrbalg.set_options(**self.l2def.afrb.options) afrb, afrb_unc = afrbalg.get_radar_freeboard(l1b, l2) # Check and return error status and codes # (unlikely in this case) error_status = afrbalg.error.status error_codes = afrbalg.error.codes if not error_status: # Add to l2data l2.afrb.set_value(afrb) l2.afrb.set_uncertainty(afrb_unc) # on error: display error messages as warning and return status flag # (this will cause the processor to report and skip this orbit segment) else: error_messages = self._snow.error.get_all_messages() for error_message in error_messages: self.log.warning("! " + error_message) return error_status, error_codes
def _get_freeboard_from_radar_freeboard(self, l1b, l2): """ Convert the altimeter freeboard in radar freeboard """ frbgeocorr = get_frb_algorithm(self.l2def.frb.pyclass) frbgeocorr.set_options(**self.l2def.frb.options) frb, frb_unc = frbgeocorr.get_freeboard(l1b, l2) # Check and return error status and codes (e.g. missing file) error_status = frbgeocorr.error.status error_codes = frbgeocorr.error.codes # Add to l2data if not error_status: # Add to l2data l2.frb.set_value(frb) l2.frb.set_uncertainty(frb_unc) # on error: display error messages as warning and return status flag # (this will cause the processor to report and skip this orbit segment) else: error_messages = frbgeocorr.get_all_messages() for error_message in error_messages: self.log.warning("! " + error_message)