Hi @lcaron,
As you requested, I have transformed Vero's vignette from s2dverifiation to CSTools.
In this branch 'develop-WRvignette', there is the new vignette and some fixes I have needed to include in CST_RegimesAssign.R to make it work.
Could you, @vtorralba, confirm if these modifications are fine to you:
- Apply + .Reassign: to work properly if the ref_maps has several dimensions. It also drops dimensions in observations (e.g. member = 1) to work fine with Apply.
- Apply + Composite: when I wanted to plot the WR_exp, I got an error because I had dimensions cluster but also member, so, PlotLayout was trying to display 15*4 maps. I have included a new parameter 'memb' to let the user choose if the composite should keep member dimension or not.
- ref_maps input is a 's2dv_cube' object in CST_RegimesAssign.R
@ncortesi, could you help me to verify the result of the new vignette? Comparing both vignettes, you will see that there are differences between the plots. Are these differences part of the cluster initialization or should the maps be the same?
In order to test if the result of CST_Anomaly with filter_span was the same as the method used in the old vignette, I have included a few lines for checking it. (These lines must be removed before merging the vignette to master.)
Let me know if something is unclear.
Cheers,
Núria