You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tidy up code and move code for later analyses into separate files (#98)
* Remove duplicated tau_recurrence function from analysis
* Add tests for getdate and countvalid
* Move forest data handling related code into separate file.
* Move netcdfify to forestdata
* Remove agcube function
This function should be superseeded by the LazyAggDiskArray approach, because it can't deal with the aggregation of the data.
Compute the RQA trend metric for shuffled time series of the data cube `cube` with the epsilon threshold `thresh` for `numshuffle` tries and save it into `path`.
# Auxillary functions for masking with the forest data
274
-
275
-
functiongetsubtiles(tile)
276
-
east =eastint(tile)
277
-
north =northint(tile)
278
-
tiles = ["E$(lpad(e,3,"0"))N$(lpad(n, 3, "0"))T1"for e in east:(east+2), n in north:(north+2)]
279
-
return tiles
280
-
end
281
-
282
-
eastint(tile) =parse(Int, tile[2:4])
283
-
northint(tile) =parse(Int, tile[6:8])
284
-
285
-
286
-
287
-
functionaggregate_forestry(tile)
288
-
subtiles =getsubtiles(tile)
289
-
foresttiles = [(parse.(Int, match(r"E(\d\d\d)N(\d\d\d)T1", t).captures)...,) =>"/eodc/private/pangeojulia/ForestType/2017_FOREST-CLASSES_EU010M_$(t).tif"for t in subtiles]
# Auxillary functions for masking with the forest data
3
+
#=
4
+
function getsubtiles(tile)
5
+
east = eastint(tile)
6
+
north = northint(tile)
7
+
tiles = ["E$(lpad(e,3,"0"))N$(lpad(n, 3, "0"))T1" for e in east:(east+2), n in north:(north+2)]
8
+
return tiles
9
+
end
10
+
11
+
eastint(tile) = parse(Int, tile[2:4])
12
+
northint(tile) = parse(Int, tile[6:8])
13
+
14
+
15
+
16
+
function aggregate_forestry(tile)
17
+
subtiles = getsubtiles(tile)
18
+
foresttiles = [(parse.(Int, match(r"E(\d\d\d)N(\d\d\d)T1", t).captures)...,) => "/eodc/private/pangeojulia/ForestType/2017_FOREST-CLASSES_EU010M_$(t).tif" for t in subtiles]
0 commit comments