diff --git a/include/otbSARDerampImageFilter.txx b/include/otbSARDerampImageFilter.txx index 73973a9b8ef17a66e9b8d167962647f7af134ee2..f8ce04b18b3d1df15541c7a7782e5aeb335009b7 100644 --- a/include/otbSARDerampImageFilter.txx +++ b/include/otbSARDerampImageFilter.txx @@ -542,6 +542,7 @@ namespace otb double radarFrequency = std::stod(inputKWL.GetMetadataByKey("support_data.radar_frequency")); int nbLineBurst = std::stod(inputKWL.GetMetadataByKey("support_data.geom.bursts.number_lines_per_burst")); + int nbSampleBurst = std::stod(inputKWL.GetMetadataByKey("support_data.geom.bursts.number_samples_per_burst")); // Estimation m_Ks m_LineAtMidBurst = nbLineBurst/2.; @@ -635,17 +636,16 @@ namespace otb } // Zero Doppler azimuth Time - TimeType aziDur = m_FirstAziTime + seconds(m_AziTimeInt*indL); + double aziTime = m_AziTimeInt*(indL - m_LineAtMidBurst); // zero-Doppler azimuth time centered in the middle of the burst // Reference Time - TimeType refDur = m_MidAziTime + (seconds( - (this->applyDCFCoefs(indC) / this->applyFMRateCoefs(indC)) - m_RefTimeMid)); + double refDur = - (this->applyDCFCoefs(indC) / this->applyFMRateCoefs(indC)) - m_RefTime0; // Kt double Kt = (this->applyFMRateCoefs(indC) * m_Ks) / (this->applyFMRateCoefs(indC) - m_Ks); - double diffTime = DurationType(aziDur - refDur).total_seconds(); + double diffTime = aziTime - refDur; // Phi - //double Phi = - M_PI * Kt * (aziTime -refTime)*(aziTime -refTime); double Phi = - M_PI * Kt * (diffTime)*(diffTime); // Deramping or Reramping diff --git a/python_src/diapOTB_S1IW.py b/python_src/diapOTB_S1IW.py index a588fe183d39ab153ae35e0fc280992dbff59e9a..7afad3eb26888c8021f26bf9b1bcc44cac5f2637 100644 --- a/python_src/diapOTB_S1IW.py +++ b/python_src/diapOTB_S1IW.py @@ -236,7 +236,7 @@ if __name__ == "__main__": appBurstExtractionMaster.SetParameterString("in", master_Image) appBurstExtractionMaster.SetParameterString("out", os.path.join(burst_dir, burstM)) appBurstExtractionMaster.SetParameterInt("burstindex", burstId) - #appBurstExtractionMaster.SetParameterString("allpixels", "true") + appBurstExtractionMaster.SetParameterString("allpixels", "true") appBurstExtractionMaster.SetParameterString("ram", "4000") appBurstExtractionMaster.ExecuteAndWriteOutput() @@ -292,7 +292,7 @@ if __name__ == "__main__": appBurstExtractionSlave.SetParameterString("in", slave_Image) appBurstExtractionSlave.SetParameterString("out", os.path.join(burst_dir, burstS)) appBurstExtractionSlave.SetParameterInt("burstindex", burstId) - #appBurstExtractionSlave.SetParameterString("allpixels", "true") + appBurstExtractionSlave.SetParameterString("allpixels", "true") appBurstExtractionSlave.SetParameterString("ram", "4000") appBurstExtractionSlave.ExecuteAndWriteOutput()