Skip to content
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

What is the reason for the stripes in both the generated fit image and pheno image? #15

Closed
weichow12318 opened this issue Sep 21, 2023 · 3 comments

Comments

@weichow12318
Copy link

Hello, Professor!

I am trying to generate the phenology image of the Yangtze River Delta region, using the same parameter of HeNan Example, but the generated phenology image always has stripes, and sometimes can't generate the full image. I also tried to generate the vegetation index after fine fitting, but also stripes.

I think there should be a problem in fitting the interpolated values, but I don't know which parameters are the most critical factors affecting such problems and how to change the parameters to solve it. May you help me about this?

The following figure is a phenology map and fitted map according to the following code (similar to the HeNan example) of a small county in Anhui Province.
fit
pheno
code

@kongdd
Copy link
Member

kongdd commented Sep 21, 2023

  • 看图的样子,应该是空间数据的排序出现了问题,而非phenofit的错误。你对空间数据操作是否熟练?可以尝试做个简单的计算,如多年平均VI,看空间图是否正确。

  • 河南省的样例数据能跑通吗?

@weichow12318
Copy link
Author

老师您好!
谢谢老师的指导!我之前的fit影像忘记与坐标数据匹配Id了,所以出现了排列错误的问题。重新运行的如下所示。发现fit和pheno影像一样均存在条纹和无法绘全的问题。
我在原来代码的基础上计算了VI的平均值影像,得到的是对的,和GEE运行出来的VI均值影像结果相同,所以我想应该不是读取数据和转换栅格的问题了。跑了河南省的样例数据也存在条带现象。但其实之前用相同代码跑过整个安徽省,发现如果运行整个省,条带非常严重,但如果将一个省其划分成十几块,就不会出现条带现象。但现在我用原来的已经划分的小块重新跑时,条带又出现了。

虽然基本依据的是样例代码,但真正运行时会有报错,因此根据报错内容修改了一小部分代码。
包括select_fist_nGS中(下面注释部分是原来代码)
if (length(inds_bad) == 0) {
# return(df %>% select(-I, -TRS5.los))
return(df %>% select(-I))
}
并行运算时(增加了.packages)
t = system.time({
res = foreach(i = inds %>% set_names(., .), icount(),
# )
.packages = c("Ipaper", "phenofit","ggplot2","grid","dplyr")) %dopar% {
Fit
Pheno
henanEOS

@kongdd
Copy link
Member

kongdd commented Sep 22, 2023

issue请转移到https://github.com/eco-hydro/phenofit-scripts,这不是phenofit的bug。

另外,若想帮你解决问题,请提供一个可以重现错误的完整脚本。

@kongdd kongdd closed this as completed Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants