Hei, Maybe a two-step approach with t.rast.aggregate and t.rast.mapcalc could work? In t.rast.aggregate you define the granularity as e.g. 48 days if you want to get a running median over three time steps of a 16 days time series.
If you want to do it in one go (which would be understandable for heavy time series), I assume t.rast.algebra is your best bet. Here is an example on how to add a new function: https://github.com/OSGeo/grass/pull/905/files to the module (which admittedly is quit complex) (the d-falg helps with testing under development). You may have to invent a distinct pattern for aggregate functions from r.mapcalc… Cheers Stefan From: grass-user <grass-user-boun...@lists.osgeo.org> On Behalf Of Veronica Andreo Sent: torsdag 28. januar 2021 16:43 To: Nikos Alexandris <n...@nikosalexandris.net> Cc: grass-user @lists.osgeo.org <grass-user@lists.osgeo.org> Subject: Re: [GRASS-user] Median filtering time series in time only El jue, 28 ene 2021 a las 0:05, <n...@nikosalexandris.net<mailto:n...@nikosalexandris.net>> escribió: On 2021-01-27 16:59, Veronica Andreo wrote: Both r.series and t.rast.series will estimate the median per pixel in time (either for the whole series or the time period you want). Would it be possible then with so e sort of special for cycle? Sorry, I didn't pay attention. Reading more carefully. Indeed, r.series (t.rast.series) do the median. But they will just create a single pixel for each pixel time series. Then, as you write, it would take to hack-around a way to iterate over a given time series at the desired (number of) intervals, then compile a new time series. What is the 'e sort' part? Did you mean to type 'with some sort of...'? And what does the 'cycle' refer to? Sorry Nikos! I was writing from my phone and it gets messy sometimes. The intended sentence was: "Would it be possible then with some sort of special `for loop`?" Thanks, Nikos
_______________________________________________ grass-user mailing list grass-user@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/grass-user