Skip to content

Commit 2145b12

Browse files
update parameter explanation for alternative NN
1 parent 8f9201c commit 2145b12

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

idepix-olci/src/main/java/org/esa/snap/idepix/olci/IdepixOlciClassificationOp.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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);

idepix-olci/src/main/java/org/esa/snap/idepix/olci/IdepixOlciOp.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,14 @@ public class IdepixOlciOp extends BasisOp {
8080
description = " If applied, write NN value to the target product ")
8181
private boolean outputSchillerNNValue;
8282

83-
@Parameter(description = "Alternative NN file. " +
83+
@Parameter(description = "Alternative pixel classification NN file. " +
8484
"If set, it MUST follow format and input/output used in default " +
8585
"'class-sequential-i21x42x8x4x2o1-5489.net'. " +
8686
"('11x10x4x3x2_207.9.net' has been default until June 2023.)",
8787
label = " Alternative NN file")
8888
private File alternativeNNFile;
8989

90-
@Parameter(description = "Alternative NN thresholds file. " +
90+
@Parameter(description = "Alternative pixel classification NN thresholds file. " +
9191
"If set, it MUST follow format used in default " +
9292
"'class-sequential-i21x42x8x4x2o1-5489-thresholds.json'. " +
9393
"('11x10x4x3x2_207.9-thresholds.json' has been default until June 2023.)",

0 commit comments

Comments
 (0)