diff --git a/python_src/diapotb/diapOTB.py b/python_src/diapotb/diapOTB.py index 17c3c4a31d6b7746418ca872e8b0ac2052347c0d..af04e727a37a620e52837f2710a9d4b79ad04480 100644 --- a/python_src/diapotb/diapOTB.py +++ b/python_src/diapotb/diapOTB.py @@ -122,7 +122,12 @@ if __name__ == "__main__": utils.print_on_std("\n Beginning of DiapOTB processing (S1 SM or Cosmo mode) \n") # Create our factory to build all processing following the current mode - chain_factory = DiapOTBProcessingFactory(mode=ChainModes.OTHERS) + mode = ChainModes.OTHERS + # Mode TSX if TSX or PAZ sensor + if satellite in [str(Satellite.TSX), str(Satellite.PAZ)]: + mode = ChainModes.TSX + + chain_factory = DiapOTBProcessingFactory(mode=mode) utils.print_on_std("\n Pre_Processing on reference image \n") diff --git a/python_src/diapotb/lib/DInSAR.py b/python_src/diapotb/lib/DInSAR.py index f701e477b63864190b906cbba7c03925741764f9..a60c527ec30ea6ac4220c7c873d3bc560d0fe9f5 100644 --- a/python_src/diapotb/lib/DInSAR.py +++ b/python_src/diapotb/lib/DInSAR.py @@ -155,6 +155,7 @@ class DInSAR(DiapOTBProcessingDualImages): "SARCoRegistration", "SARDeramp", "SARRobustInterferogram"] + # Default mode : Others self._mode = str(ChainModes.OTHERS) if "mode" in kwargs and str(kwargs["mode"]) in ChainModes.list(): self._mode = str(kwargs["mode"]) @@ -202,20 +203,25 @@ class DInSAR(DiapOTBProcessingDualImages): """ DInSAR chain """ - if str(self._mode) == str(ChainModes.OTHERS): + # Add for each mode, a dedicated executor + # Here : TSX have the same executor than Others (S1SM/CSK) + if str(self._mode) in [str(ChainModes.OTHERS), str(ChainModes.TSX)]: self._input_enum = DInSarInputKeysOthers else: self._input_enum = DInSarInputKeysS1IW + self._executor_builder.add_mode(ChainModes.OTHERS, ExecutorDInSAROthers) + self._executor_builder.add_mode(ChainModes.TSX, + ExecutorDInSAROthers) + self._executor_builder.add_mode(ChainModes.S1_IW, ExecutorDInSARS1IW) super().execute(**kwargs) - print("Pouet !!!") # Executors, one per mode diff --git a/python_src/diapotb/lib/Ground.py b/python_src/diapotb/lib/Ground.py index 40769dbfef1477bde2ea9fad20d5990220ce8544..67c05189751ea66525769d74ed62f1a169cd551c 100644 --- a/python_src/diapotb/lib/Ground.py +++ b/python_src/diapotb/lib/Ground.py @@ -93,6 +93,7 @@ class Ground(DiapOTBProcessingSingleImage): self._name = "Ground" self._applications = ["SARDEMProjection", "SARCartesianMeanEstimation"] + # Default mode : OTHERS self._mode = str(ChainModes.OTHERS) if "mode" in kwargs and str(kwargs["mode"]) in ChainModes.list(): self._mode = str(kwargs["mode"]) @@ -133,7 +134,9 @@ class Ground(DiapOTBProcessingSingleImage): def execute(self, **kwargs): """ Ground chain """ - if str(self._mode) == str(ChainModes.OTHERS): + # Add for each mode, a dedicated executor + # Here : TSX have the same executor than Others (S1SM/CSK) + if str(self._mode) in [str(ChainModes.OTHERS), str(ChainModes.TSX)]: self._input_enum = GroundInputKeysOthers else: self._input_enum = GroundInputKeysS1IW @@ -141,6 +144,9 @@ class Ground(DiapOTBProcessingSingleImage): self._executor_builder.add_mode(ChainModes.OTHERS, ExecutorGroundOthers) + self._executor_builder.add_mode(ChainModes.TSX, + ExecutorGroundOthers) + self._executor_builder.add_mode(ChainModes.S1_IW, ExecutorGroundS1IW) diff --git a/python_src/diapotb/lib/PostProcessing.py b/python_src/diapotb/lib/PostProcessing.py index 460fb73202a23953898e403ab7face7102467a01..35e3262f13768d27c3e156fbbfe23355aaa7b002 100644 --- a/python_src/diapotb/lib/PostProcessing.py +++ b/python_src/diapotb/lib/PostProcessing.py @@ -109,6 +109,7 @@ class PostProcessing(DiapOTBProcessingDualImages): self._name = "PostProcessing" self._applications = ["SAR"] + # Default mode : Others self._mode = str(ChainModes.OTHERS) if "mode" in kwargs and str(kwargs["mode"]) in ChainModes.list(): self._mode = str(kwargs["mode"]) @@ -171,8 +172,9 @@ class PostProcessing(DiapOTBProcessingDualImages): def execute(self, **kwargs): """ PsotProcessing chain """ - - if str(self._mode) == str(ChainModes.OTHERS): + # Add for each mode, a dedicated executor + # Here : TSX have the same executor than Others (S1SM/CSK) + if str(self._mode) in [str(ChainModes.OTHERS), str(ChainModes.TSX)]: self._input_enum = PostProcessingInputKeysOthers else: self._input_enum = PostProcessingInputKeysS1IW @@ -180,6 +182,9 @@ class PostProcessing(DiapOTBProcessingDualImages): self._executor_builder.add_mode(ChainModes.OTHERS, ExecutorPostProcessingOthers) + self._executor_builder.add_mode(ChainModes.TSX, + ExecutorPostProcessingOthers) + self._executor_builder.add_mode(ChainModes.S1_IW, ExecutorPostProcessingS1IW) diff --git a/python_src/diapotb/lib/PreProcessing.py b/python_src/diapotb/lib/PreProcessing.py index 74581623b8830703506abc7c7774294572737d83..4fcda80d70ef21926c278774d8de30bde7611098 100644 --- a/python_src/diapotb/lib/PreProcessing.py +++ b/python_src/diapotb/lib/PreProcessing.py @@ -79,6 +79,7 @@ class PreProcessing(DiapOTBProcessingSingleImage): self._applications = ["SARDoppler0", "SARMultiLook", "SARDeramp", "SARBurstExtraction"] + # Default mode : Others self._mode = str(ChainModes.OTHERS) if "mode" in kwargs and str(kwargs["mode"]) in ChainModes.list(): self._mode = str(kwargs["mode"]) @@ -117,7 +118,9 @@ class PreProcessing(DiapOTBProcessingSingleImage): def execute(self, **kwargs): """PreProcessing chain """ - if str(self._mode) == str(ChainModes.OTHERS): + # Add for each mode, a dedicated executor + # Here : TSX have the same executor than Others (S1SM/CSK) + if str(self._mode) in [str(ChainModes.OTHERS), str(ChainModes.TSX)]: self._input_enum = None else: self._input_enum = None @@ -125,6 +128,9 @@ class PreProcessing(DiapOTBProcessingSingleImage): self._executor_builder.add_mode(ChainModes.OTHERS, ExecutorPreProcessingOthers) + self._executor_builder.add_mode(ChainModes.TSX, + ExecutorPreProcessingOthers) + self._executor_builder.add_mode(ChainModes.S1_IW, ExecutorPreProcessingS1IW) diff --git a/python_src/diapotb/lib/core/DiapOTBEnums.py b/python_src/diapotb/lib/core/DiapOTBEnums.py index 3c3ef30a8eb758a71f34900103ec58f05333c10f..5ba98e2f8fcaee7fa160a913fd4d58494c77d958 100644 --- a/python_src/diapotb/lib/core/DiapOTBEnums.py +++ b/python_src/diapotb/lib/core/DiapOTBEnums.py @@ -133,7 +133,7 @@ class ChainModes(ExtendedEnum): """ S1_IW = "S1IW" OTHERS = "Others" - + TSX = "TSX" class ExtPosition(ExtendedEnum): """Define the available postions for extension in filename