-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ccdc fit method failed #8
Comments
Thanks @kenoz; the following code works from nrt.monitor.ccdc import CCDC
from nrt import data
mask = (data.romania_forest_cover_percentage() > 30).astype('int')
s2_cube = data.romania_20m()
s2_cube['ndvi'] = (s2_cube.B8A - s2_cube.B4) / (s2_cube.B8A + s2_cube.B4)
s2_cube = s2_cube.where(s2_cube.SCL.isin([4,5,7]))
cube_history = s2_cube.sel(time=slice('2015-01-01', '2018-12-31'))
cube_monitoring = s2_cube.sel(time=slice('2019-01-01', '2021-12-31'))
ccdcMonitor = CCDC(trend=True, mask=mask)
ccdcMonitor.fit(dataarray=cube_history.ndvi,
green=cube_history.B3,
swir=cube_history.B11,
scaling_factor=10000) I agree the |
Thanks @loicdtx! |
@kenoz , no I do not confirm. You could for instance do: ccdcMonitor = CCDC(trend=False, mask=mask)
ccdcMonitor.fit(dataarray=cube_history.ndvi,
method='OLS', screen_outliers=None) |
Running CCDC method with default parameters results in the following error:
ValueError: green and swir xarray.Dataarray(s) need to be provided using green and swir arguments respectively
The code that failed:
The text was updated successfully, but these errors were encountered: