-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
44 changed files
with
539 additions
and
314 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import GeeProcess from '../processgraph/process.js'; | ||
import Commons from '../processgraph/commons.js'; | ||
import GeeUtils from '../processgraph/utils.js'; | ||
|
||
export default class absolute extends GeeProcess { | ||
|
||
executeSync(node) { | ||
return Commons.applyInCallback(node, image => image.abs()); | ||
return GeeUtils.applyNumFunction(node, data => data.abs()); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,10 @@ | ||
import GeeProcess from '../processgraph/process.js'; | ||
import Commons from '../processgraph/commons.js'; | ||
import GeeUtils from '../processgraph/utils.js'; | ||
|
||
export default class add extends GeeProcess { | ||
|
||
executeSync(node) { | ||
return Commons.reduceBinaryInCallback( | ||
node, | ||
(a, b) => a.add(b) | ||
); | ||
return GeeUtils.applyBinaryNumFunction(node, (x, y) => x.add(y)); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import GeeProcess from '../processgraph/process.js'; | ||
import Commons from '../processgraph/commons.js'; | ||
import GeeUtils from '../processgraph/utils.js'; | ||
|
||
export default class arccos extends GeeProcess { | ||
|
||
executeSync(node) { | ||
return Commons.applyInCallback(node, image => image.acos()); | ||
return GeeUtils.applyNumFunction(node, data => data.acos()); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,11 @@ | ||
import GeeProcess from '../processgraph/process.js'; | ||
import Commons from '../processgraph/commons.js'; | ||
import GeeUtils from '../processgraph/utils.js'; | ||
|
||
export default class arcosh extends GeeProcess { | ||
|
||
executeSync(node) { | ||
return Commons.applyInCallback( | ||
node, | ||
image => { | ||
// Using arcosh formula for calculation (see wikipedia) | ||
let img_p2 = image.pow(2); | ||
img_p2 = img_p2.subtract(1); | ||
img_p2 = img_p2.sqrt(); | ||
const result = image.add(img_p2); | ||
return result.log(); | ||
} | ||
); | ||
// Using arcosh formula for calculation (see wikipedia) | ||
return GeeUtils.applyNumFunction(node, data => data.add(data.pow(2).subtract(1).sqrt()).log()); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import GeeProcess from '../processgraph/process.js'; | ||
import Commons from '../processgraph/commons.js'; | ||
import GeeUtils from '../processgraph/utils.js'; | ||
|
||
export default class arcsin extends GeeProcess { | ||
|
||
executeSync(node) { | ||
return Commons.applyInCallback(node, image => image.asin()); | ||
return GeeUtils.applyNumFunction(node, data => data.asin()); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import GeeProcess from '../processgraph/process.js'; | ||
import Commons from '../processgraph/commons.js'; | ||
import GeeUtils from '../processgraph/utils.js'; | ||
|
||
export default class arctan extends GeeProcess { | ||
|
||
executeSync(node) { | ||
return Commons.applyInCallback(node, image => image.atan()); | ||
return GeeUtils.applyNumFunction(node, data => data.atan()); | ||
} | ||
|
||
} |
Oops, something went wrong.