@@ -79,14 +79,14 @@ public class IdepixOlciClassificationOp extends Operator {
7979 description = " If applied, write Schiller NN value to the target product " )
8080 private boolean outputSchillerNNValue ;
8181
82- @ Parameter (description = "Alternative NN file. " +
82+ @ Parameter (description = "Alternative pixel classification NN file. " +
8383 "If set, it MUST follow format and input/output used in default " +
8484 "'class-sequential-i21x42x8x4x2o1-5489.net'. " +
8585 "('11x10x4x3x2_207.9.net' has been default until June 2023.)" ,
8686 label = " Alternative NN file" )
8787 private File alternativeNNFile ;
8888
89- @ Parameter (description = "Alternative NN thresholds file. " +
89+ @ Parameter (description = "Alternative pixel classification NN thresholds file. " +
9090 "If set, it MUST follow format used in default " +
9191 "'class-sequential-i21x42x8x4x2o1-5489-thresholds.json'. " +
9292 "('11x10x4x3x2_207.9-thresholds.json' has been default until June 2023.)" ,
@@ -192,7 +192,8 @@ private void readSchillerNeuralNets() {
192192 }
193193
194194 void readNNThresholds () {
195- try (Reader r = alternativeNNThresholdsFile == null
195+ try (Reader r = alternativeNNThresholdsFile == null ||
196+ OLCI_202306_NN_THRESHOLDS_FILE .equals (alternativeNNThresholdsFile .getName ())
196197 ? new InputStreamReader (getClass ().getResourceAsStream (OLCI_202306_NN_THRESHOLDS_FILE ))
197198 : OLCI_2018_NN_THRESHOLDS_FILE .equals (alternativeNNThresholdsFile .getName ())
198199 ? new InputStreamReader (getClass ().getResourceAsStream (OLCI_2018_NN_THRESHOLDS_FILE ))
@@ -216,7 +217,7 @@ void readNNThresholds() {
216217 }
217218
218219 private InputStream getNNInputStream () throws IOException {
219- if (alternativeNNFile == null ) {
220+ if (alternativeNNFile == null || OLCI_202306_NET_NAME . equals ( alternativeNNFile . getName ()) ) {
220221 return getClass ().getResourceAsStream (OLCI_202306_NET_NAME );
221222 } else if (OLCI_2018_NET_NAME .equals (alternativeNNFile .getName ())) {
222223 return getClass ().getResourceAsStream (OLCI_2018_NET_NAME );
0 commit comments