Comments (3)
You could try something like this:
const min = 0.001;
const max = 5;
return [(Math.log(B04) - Math.log(min))/(Math.log(max) - Math.log(min))];
from custom-scripts.
Thanks for your answer.
for example i calculate this value
var R_443_560=B01/B03
var R_490_560=B02/B03
var MBR=Math.log10(Math.max(R_443_560,R_490_560))
var NDWI=(B03-B08)/(B03+B08)
var Med=Math.pow(10,(0.283-2.753MBR+1.457MBR2+0.659*MBR3-1.403*MBR**4))
And i want to show the values of Med with a logarithmic scale (however not changing the original values as caclulated from the script). Any ideas?
I was thinking using this function ColorGradientVisualizer.createWhiteGreen() but i would like to use logarithmic scale and not linear.
from custom-scripts.
You could just use the expression from argument of Math.pow
in the visualizer (since log
is inverse of pow
).
const R_443_560 = B01/B03;
const R_490_560 = B02/B03;
const MBR = Math.log10(Math.max(R_443_560,R_490_560));
const NDWI = (B03-B08)/(B03+B08);
const logMed = 0.283
- 2.753 * MBR
+ 1.457 * Math.pow(MBR,2)
+ 0.659 * Math.pow(MBR,3)
- 1.403 * Math.pow(MBR,4);
const minLog = Math.log10(0.01);
const maxLog = Math.log10(5);
return colorBlend(logMed,
[minLog, maxLog],
[[0, 0.5, 0], // dark green - minimum
[1,1,1]]); // white - maximum
from custom-scripts.
Related Issues (20)
- ARVI formula says NIR, so shouldn't use B08? HOT 3
- NDVI MAX, does it work? HOT 4
- How to run these scripts HOT 1
- custom-scripts/sentinel-1/sar_false_color_visualization HOT 6
- How to calculate NDVI from Sentinel-2 to any AOI with coordinates based on python API HOT 1
- Why is the LAI output divided by 3 HOT 2
- help implementing an Idea: custom code for NDVI Change Ratio to Previous Month HOT 4
- B12 of Observation outlier detector HOT 2
- V variable ? HOT 1
- Question about data fusion HOT 3
- Question about directly using LAI calculation codes in GEE
- Can anyone help me to isolate any of the indicators one by one? Se2WaQ HOT 1
- Broken link
- Custom script not working in Playground
- Text in geology composite wrong
- Broken datafusion script HOT 2
- Add breadcrumbs to script pages HOT 3
- Chlorophyll Red-Edge on Sentinel Hub - correct equation HOT 3
- Multi-temporal Data isuue HOT 2
- Sentinel-2 indices might be invalid HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from custom-scripts.