-
Notifications
You must be signed in to change notification settings - Fork 40
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
time_series subsetting functions need to take multiples of "unit" arguments. #24
Comments
@Jwely, has there been any resolution to this? I am hoping to make 10 day averages from a modis time series, with each data point represented once. Thank you for your work on this! |
I think we worked around it. You can already get what you want out of this function by running a 10 day moving average and throwing out the points that you don't want. It's not a clean solution, so If you need additional syntax help post here again. |
@Jwely Yes I would like some syntax help. If I would like to average a 10 year modis time series to 10 day averages, so that for each pixel I would potentially be averaging 10*10 or 100 values, how would I do this? |
I think what you want is to create a rs = tsa.rast_series(args)
rs.group_bins("%j", cyclical=True)
rs.make_subsets("%j", overlap_width = 5) Then take raster statistics on |
@Jwely as far as I can tell, the "overlap_width" parameter only allows for the creation of a moving window, not a static one to average if I want to get one value for every ten day period that only contains those days that fall within the period, if that makes sense. Have you also seen that even with the specification of a low threshold, make_subsets does not return negative results? |
Regarding the rolling window: yes you are correct, it produces a rolling average. You can still obtain the results you are after by simply deleting the extra results. For example, with a 5 day overlap width, you would end up with 366 separate results, one centered on each day of the year. By keeping the results from julian days 6, 27, 38, 49, 60, etc (according to 6 + 11n) you will have a time series with 11 day averages where each value is represented only a single time. Regarding negative results, you'll have to be more specific. |
Aha! I will try that, although as I understand it the rolling average would Thanks Jeff, On Thu, Oct 29, 2015 at 1:49 PM, Jeff Ely [email protected] wrote:
Ryan Murphy |
presently, there isn't any way to group by some custom interval without multiple representation of each subset.
for example, if i want 3 day summaries, i can use time_series.make_subsets("%d",overlap_width = 1), but this produces a subset centered around every day, while i may want only a subset every 3 days with each data point only represented a single time.
The text was updated successfully, but these errors were encountered: