Applied-GeoSolutions / multitemporal

Efficient, chainable time series processing of raster stacks.
GNU General Public License v2.0
4 stars 3 forks source link

improve_fusion #28

Closed ircwaves closed 5 years ago

ircwaves commented 6 years ago

add module based on fusion model that outputs the parameters of a linear model fit between two rasters

will output intercept, intercept se, slope, slope se, R2, RMSE

(this will be tested for a forest disturbance application comparing LSWI and S1 HH and HV for 2017 over Northern New England)

ircwaves commented 6 years ago

Author: Bobby Braswell

Timestamp: 2018-01-29T16:57:21.312Z


changed the description

By Beth L Ziniti on 2018-01-29T16:57:21 (imported from GitLab project)

ircwaves commented 6 years ago

Author: Bobby Braswell

Timestamp: 2018-01-29T16:58:16.969Z


changed title from improve{- linear model output between rasters in fusion module-} to improve{+_fusion+}

By Beth L Ziniti on 2018-01-29T16:58:16 (imported from GitLab project)

ircwaves commented 6 years ago

Author: Bobby Braswell

Timestamp: 2018-02-02T22:05:18.085Z


created branch 28-improve_fusion

By Beth L Ziniti on 2018-02-02T22:05:18 (imported from GitLab project)

ircwaves commented 6 years ago

Author: Bobby Braswell

Timestamp: 2018-02-02T22:47:02.632Z


created module simplelinearregression.pyx

currently it output a 10-band raster slope, slope_se, t_stat, intercept, intercept_se, rmse, R2, nsse, nssy, n

these nsse, nssy are only output for debugging purposes.

moduled tested using:

/home/bziniti/config_files_mt/RBA_fusion_modis_landsat_test_slr.json
/home/bziniti/config_files_mt/RBA_fusion_modis_landsat.sh

example results are: Screen_Shot_2018-02-02_at_5.39.07_PM

which are a little different from an R_coded case on the same data: Screen_Shot_2018-02-02_at_5.44.11_PM

could be related to missing values. Result show that there are 6 landsat and modis dates in common, but one of those dates is all clouds. It seems it is still being using (maybe it wasn't cloud masked) not sure.

Screen_Shot_2018-02-02_at_5.45.52_PM

By Beth L Ziniti on 2018-02-02T22:47:02 (imported from GitLab project)

ircwaves commented 6 years ago

Author: Bobby Braswell

Timestamp: 2018-02-02T23:42:05.462Z


@rbraswell

this is created if you want to check out

I've only implemented the simple updates, but am thinking about trying a matrix version.

By Beth L Ziniti on 2018-02-02T23:42:05 (imported from GitLab project)

ircwaves commented 6 years ago

Author: Bobby Braswell

Timestamp: 2018-02-26T23:36:52.796Z


Issue for multi-year exports. all output is zero. There's an issue in how the result is calculated.

Also I want to add switch for by year or all data slopes.

working on this Feb 26 and Feb 27. Part of forest disturbance fusion testing over tornado area.

By Beth L Ziniti on 2018-02-26T23:36:52 (imported from GitLab project)

ircwaves commented 6 years ago

Author: Bobby Braswell

Timestamp: 2018-02-28T23:33:28.149Z


The multi-year exports issue appears fixed for test case of 2007-2009 over NH. There are now two modules (simplelinearregression_allyear.pyx, simplelinearregression_byyear.pyx). These have been committed to this branch, but not pushed.

bziniti@schedprd:~/repos/multitemporal/bin$ git commit -m "fixed mult-year export bug and split module into two where one does by year regressions and the other does all years in export regressions"
[28-improve-fusion 78b239d] fixed mult-year export bug and split module into two where one does by year regressions and the other does all years in export regressions
 2 files changed, 143 insertions(+), 30 deletions(-)
 rename bin/{simplelinearregression.pyx => simplelinearregression_allyear.pyx} (74%)
 create mode 100755 bin/simplelinearregression_byyear.pyx

Interesting to note, there is an visual effect of the landsat tiles in both cases (all year and by year) for the test case. Compare the right and left parts of each image. The right has higher slopes, with the except of pixels over ocean.

by year: modis_landsat_trend0709NH_alt

all year: Screen_Shot_2018-02-28_at_6.13.48_PM

By Beth L Ziniti on 2018-02-28T23:33:28 (imported from GitLab project)

ircwaves commented 5 years ago

also merged as of v0.5.0