SMByC / CCD-Plugin

The CCD-Plugin uses Google Earth Engine to get Landsat or Sentinel2 datasets and run the Continuous Change Detection (CCDC) algorithm to analyze the trends and breakpoints of change over multi-year time series at a given coordinate.
GNU General Public License v3.0
37 stars 4 forks source link

Indices scaling #3

Closed danielm09 closed 1 year ago

danielm09 commented 1 year ago

Check if scaling is correct in Landsat module (gee_data_landsat.py). EVI, EVI2 expressions may need bands scaled from 0 to 1. Check it.

Check also brightness, greeness and wetness

danielm09 commented 1 year ago

I checked EVI and EVI2. It turns out the formula needs band values on a scale from 0 to 1.

Only need to check brightness, greeness and wetness now

danielm09 commented 1 year ago

Not sure what exactly brightness, greenness and wetness refer to. At first I thought they were tasseled cap transformations, but the formulas used in the gee_data_landsat module do not check out.

I'm not an expert in TCT, but a quick search about brightness, greenness and wetness suggests that the formula depends on the sensor. In this case, I think computing TCTs after merging distinct Landsat collections gives incorrect values, as TM, ETM and OLI sensors have different coefficients.

For Sentinel-2, this paper provides TCT coefficients.

danielm09 commented 1 year ago

@XavierCLL I think you adjusted the landsat code so that bands and indices are scaled from 0 to 1 and -1 to 1, respectively, right? That explains why you limited the lambda range. However, have in mind that the Sentinel-2 collection is still in a 10^4 scale. We should harmonize the scales of both collections. It's a matter of taste I guess, but I've seen papers using lambda as 200, which means the data is in a 10^4 scale. I personally prefer working with this scale (10^4) instead of having to deal with the decimals. I'd say it's easier to make experiments with varying lambda values.

In summary, I'm for keeping the data in the 10^4 scale. In that case, we'd have to multiply the landsat data by 10000 and adjust the lambda range allowed by the gui.

XavierCLL commented 1 year ago

Hi @danielm09

I just made the changes to convert Sentinel to the original values (not scaled) in this commit (also I wrote you there because I had not seen this before) commit 876dd7863da759719fb631a2247c22fb8c22c149

In the implementation of the CCDC, in its paper and in general the researchers use the original values instead of scaled values, which could generate confusion because some are scaled and others are not. Here 100% I prefer to plot the original values and not the scaled values. The lambda as decimal values is not an issue, it is working right now very well (do you think that the lambda range needs more decimal precision?)

Regards

danielm09 commented 1 year ago

@XavierCLL I'm pretty sure I've read Zhe Zhu's papers in which he not only adopts lambda as 20 but also uses reflectance data at 10^4 scale on his plots. Anyways, as I said I think it's a matter of taste. Let's move on with the unscaled version.

And I don't think you need more decimals for the lambda value.

Regards

XavierCLL commented 1 year ago

Hi @danielm09

Thanks so much for tested and fixed the Sentinel scaling, I just tested all collections and for me bands and indices look perfect (and prediction curves), I think we can close this issue.

Regards