-
Notifications
You must be signed in to change notification settings - Fork 30
Error when phenology fitting is enabled #49
Comments
Whoops. If you look at line 190 of This speaks to a larger issue when parameterizing the algorithms with a config file -- we probably need to separate the # Section for phenology fitting
phenology:
enable: False
init:
# Specification for dataset indices required for EVI based phenology monitoring
red_index: 2
nir_index: 3
blue_index: 0
# Scale factor for reflectance bands
scale: 0.0001
# You can also specify index of EVI if contained in dataset to override calculation
evi_index:
evi_scale:
# Number of years to group together when normalizing EVI to upper and lower percentiles
year_interval: 3
# Upper and lower percentiles of EVI used for max/min scaling
q_min: 10
q_max: 90 This way it's clear what are hyperparameters and what are parameters used in the fitting. Related to #50. This proposed change would affect all other algorithm configurations (e.g., |
Okay, I think I'm following, but just to be clear, to run the phenology code, I should have I guess my bigger question is what (if anything) can I do to start running the phenology code? Is there a change I can make to the .yaml config to prevent that error from happening (e.g. what you proposed above)? Or does something need to change in the code. Sorry if this is a dumb question. |
For the short term, the phenology calculation should run without error and without you changing your configuration file (commit 8c4313e). In the next week though I'd like to adjust the config file format to subsection it into Any thoughts? This config file change seems like an omission from the |
Thanks for the fix! Looking like YATSM with phenology `enable: True`` is running without issue now... I think it does make sense to subsection the config file into In terms of making changes, I would say better to tweak things now while we are all in testing mode after the new release. It will only get harder as more users start working with the code, so if something makes sense and improves clarity and functionality, it's worth making the change sooner than later. |
Uh-oh. New problem:
Not sure if this info helps, but 871 YATSM results (lines) were produced before the above error occurred.. |
Is that for line 872 then? Looks like there is a bug for situations I haven't encountered before. My best guess is that the percentile scaling creates an array that is 100% |
I'm not sure how to tell which line(s) actually generated the error... The log files are in I ran the code using the following script:
Let me know if there's any other info that might help. |
If you turn on verbose messages, using As for the error you're encountering, the bad news is that I'm having a remarkably hard time reproducing it given that all of your jobs seem to fail. I've placed a "now running this column" log style log statement and submitted two |
Thanks for looking into it. I didn't realize there was a verbose option for yatsm line (though I have noticed my log files are relatively sparse before an error occurs. I've added the If there are any runs you want me to do or other ways I could help diagnose, just let me know. |
Reproduced the bug for column 5238 in line 900. The pixel timeseries that throws the error looks to be from a very dark and non-vegetated land cover. The DOY profile for EVI for this timeseries is so poor that the estimated middle of the season (peak_doy) is so late into the year that there are no observations for the autumn, hence the "zero-size array" in the exception message. There are likely other scenarios in which the estimated date is so early that there are no observations in the spring period. I've pushed what I think fixes the problem to It fixed the issue for me for that one pixel, but I'm waiting on the results for 1/100th (jobid 1 out of 100) to run through before I'll confirm. You can pull and checkout the |
Remove data-related vars from __init__ and move to fit. Remove hyperparams from fit and move to __init__. Also split pheno configuration into init and fit
Pulled updated repository yesterday (currently up to date). Tried running YATSM with phenology enabled. A good number of lines process with no issue, but eventually the following error occurs:
|
Moving to new ticket... |
Error occurs when attempting to run phenology fitting:
Config location: /projectnb/landsat/projects/Massachusetts/p012r031/p012r031_config.yaml
The text was updated successfully, but these errors were encountered: