polytope-python 1.0.7__tar.gz → 1.0.9__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {polytope-python-1.0.7/polytope_python.egg-info → polytope-python-1.0.9}/PKG-INFO +1 -1
- {polytope-python-1.0.7/polytope → polytope-python-1.0.9/polytope_feature}/datacube/backends/datacube.py +1 -0
- {polytope-python-1.0.7/polytope → polytope-python-1.0.9/polytope_feature}/datacube/transformations/datacube_mappers/datacube_mappers.py +14 -2
- {polytope-python-1.0.7/polytope → polytope-python-1.0.9/polytope_feature}/datacube/transformations/datacube_mappers/mapper_types/healpix.py +10 -3
- {polytope-python-1.0.7/polytope → polytope-python-1.0.9/polytope_feature}/datacube/transformations/datacube_mappers/mapper_types/healpix_nested.py +10 -3
- {polytope-python-1.0.7/polytope → polytope-python-1.0.9/polytope_feature}/datacube/transformations/datacube_mappers/mapper_types/local_regular.py +25 -6
- {polytope-python-1.0.7/polytope → polytope-python-1.0.9/polytope_feature}/datacube/transformations/datacube_mappers/mapper_types/octahedral.py +10 -3
- {polytope-python-1.0.7/polytope → polytope-python-1.0.9/polytope_feature}/datacube/transformations/datacube_mappers/mapper_types/reduced_ll.py +10 -3
- {polytope-python-1.0.7/polytope → polytope-python-1.0.9/polytope_feature}/datacube/transformations/datacube_mappers/mapper_types/regular.py +17 -5
- {polytope-python-1.0.7/polytope → polytope-python-1.0.9/polytope_feature}/datacube/transformations/datacube_transformations.py +1 -2
- {polytope-python-1.0.7/polytope → polytope-python-1.0.9/polytope_feature}/datacube/transformations/datacube_type_change/datacube_type_change.py +1 -1
- {polytope-python-1.0.7/polytope → polytope-python-1.0.9/polytope_feature}/engine/hullslicer.py +0 -1
- {polytope-python-1.0.7/polytope → polytope-python-1.0.9/polytope_feature}/options.py +2 -0
- polytope-python-1.0.9/polytope_feature/version.py +1 -0
- {polytope-python-1.0.7 → polytope-python-1.0.9/polytope_python.egg-info}/PKG-INFO +1 -1
- polytope-python-1.0.9/polytope_python.egg-info/SOURCES.txt +54 -0
- polytope-python-1.0.9/polytope_python.egg-info/top_level.txt +1 -0
- {polytope-python-1.0.7 → polytope-python-1.0.9}/setup.py +1 -1
- polytope-python-1.0.7/polytope/version.py +0 -1
- polytope-python-1.0.7/polytope_python.egg-info/SOURCES.txt +0 -54
- polytope-python-1.0.7/polytope_python.egg-info/top_level.txt +0 -1
- {polytope-python-1.0.7 → polytope-python-1.0.9}/LICENSE +0 -0
- {polytope-python-1.0.7 → polytope-python-1.0.9}/MANIFEST.in +0 -0
- {polytope-python-1.0.7/polytope → polytope-python-1.0.9/polytope_feature}/__init__.py +0 -0
- {polytope-python-1.0.7/polytope → polytope-python-1.0.9/polytope_feature}/datacube/__init__.py +0 -0
- {polytope-python-1.0.7/polytope → polytope-python-1.0.9/polytope_feature}/datacube/backends/__init__.py +0 -0
- {polytope-python-1.0.7/polytope → polytope-python-1.0.9/polytope_feature}/datacube/backends/fdb.py +0 -0
- {polytope-python-1.0.7/polytope → polytope-python-1.0.9/polytope_feature}/datacube/backends/mock.py +0 -0
- {polytope-python-1.0.7/polytope → polytope-python-1.0.9/polytope_feature}/datacube/backends/xarray.py +0 -0
- {polytope-python-1.0.7/polytope → polytope-python-1.0.9/polytope_feature}/datacube/datacube_axis.py +0 -0
- {polytope-python-1.0.7/polytope → polytope-python-1.0.9/polytope_feature}/datacube/index_tree_pb2.py +0 -0
- {polytope-python-1.0.7/polytope → polytope-python-1.0.9/polytope_feature}/datacube/tensor_index_tree.py +0 -0
- {polytope-python-1.0.7/polytope → polytope-python-1.0.9/polytope_feature}/datacube/transformations/__init__.py +0 -0
- {polytope-python-1.0.7/polytope → polytope-python-1.0.9/polytope_feature}/datacube/transformations/datacube_cyclic/__init__.py +0 -0
- {polytope-python-1.0.7/polytope → polytope-python-1.0.9/polytope_feature}/datacube/transformations/datacube_cyclic/datacube_cyclic.py +0 -0
- {polytope-python-1.0.7/polytope → polytope-python-1.0.9/polytope_feature}/datacube/transformations/datacube_mappers/__init__.py +0 -0
- {polytope-python-1.0.7/polytope → polytope-python-1.0.9/polytope_feature}/datacube/transformations/datacube_mappers/mapper_types/__init__.py +0 -0
- {polytope-python-1.0.7/polytope → polytope-python-1.0.9/polytope_feature}/datacube/transformations/datacube_merger/__init__.py +0 -0
- {polytope-python-1.0.7/polytope → polytope-python-1.0.9/polytope_feature}/datacube/transformations/datacube_merger/datacube_merger.py +0 -0
- {polytope-python-1.0.7/polytope → polytope-python-1.0.9/polytope_feature}/datacube/transformations/datacube_reverse/__init__.py +0 -0
- {polytope-python-1.0.7/polytope → polytope-python-1.0.9/polytope_feature}/datacube/transformations/datacube_reverse/datacube_reverse.py +0 -0
- {polytope-python-1.0.7/polytope → polytope-python-1.0.9/polytope_feature}/datacube/transformations/datacube_type_change/__init__.py +0 -0
- {polytope-python-1.0.7/polytope → polytope-python-1.0.9/polytope_feature}/datacube/tree_encoding.py +0 -0
- {polytope-python-1.0.7/polytope → polytope-python-1.0.9/polytope_feature}/engine/__init__.py +0 -0
- {polytope-python-1.0.7/polytope → polytope-python-1.0.9/polytope_feature}/engine/engine.py +0 -0
- {polytope-python-1.0.7/polytope → polytope-python-1.0.9/polytope_feature}/polytope.py +0 -0
- {polytope-python-1.0.7/polytope → polytope-python-1.0.9/polytope_feature}/shapes.py +0 -0
- {polytope-python-1.0.7/polytope → polytope-python-1.0.9/polytope_feature}/utility/__init__.py +0 -0
- {polytope-python-1.0.7/polytope → polytope-python-1.0.9/polytope_feature}/utility/combinatorics.py +0 -0
- {polytope-python-1.0.7/polytope → polytope-python-1.0.9/polytope_feature}/utility/exceptions.py +0 -0
- {polytope-python-1.0.7/polytope → polytope-python-1.0.9/polytope_feature}/utility/geometry.py +0 -0
- {polytope-python-1.0.7/polytope → polytope-python-1.0.9/polytope_feature}/utility/list_tools.py +0 -0
- {polytope-python-1.0.7/polytope → polytope-python-1.0.9/polytope_feature}/utility/profiling.py +0 -0
- {polytope-python-1.0.7 → polytope-python-1.0.9}/polytope_python.egg-info/dependency_links.txt +0 -0
- {polytope-python-1.0.7 → polytope-python-1.0.9}/polytope_python.egg-info/not-zip-safe +0 -0
- {polytope-python-1.0.7 → polytope-python-1.0.9}/polytope_python.egg-info/requires.txt +0 -0
- {polytope-python-1.0.7 → polytope-python-1.0.9}/pyproject.toml +0 -0
- {polytope-python-1.0.7 → polytope-python-1.0.9}/requirements.txt +0 -0
- {polytope-python-1.0.7 → polytope-python-1.0.9}/setup.cfg +0 -0
|
@@ -128,6 +128,7 @@ class Datacube(ABC):
|
|
|
128
128
|
"""
|
|
129
129
|
path = self.fit_path(path)
|
|
130
130
|
indexes = axis.find_indexes(path, self)
|
|
131
|
+
|
|
131
132
|
idx_between = axis.find_indices_between(indexes, lower, upper, self, method)
|
|
132
133
|
|
|
133
134
|
logging.debug(f"For axis {axis.name} between {lower} and {upper}, found indices {idx_between}")
|
|
@@ -13,8 +13,14 @@ class DatacubeMapper(DatacubeAxisTransformation):
|
|
|
13
13
|
self.grid_resolution = mapper_options.resolution
|
|
14
14
|
self.grid_axes = mapper_options.axes
|
|
15
15
|
self.local_area = []
|
|
16
|
+
self.md5_hash = None
|
|
17
|
+
if mapper_options.md5_hash is not None:
|
|
18
|
+
self.md5_hash = mapper_options.md5_hash
|
|
16
19
|
if mapper_options.local is not None:
|
|
17
20
|
self.local_area = mapper_options.local
|
|
21
|
+
self._axis_reversed = None
|
|
22
|
+
if mapper_options.axis_reversed is not None:
|
|
23
|
+
self._axis_reversed = mapper_options.axis_reversed
|
|
18
24
|
self.old_axis = name
|
|
19
25
|
self._final_transformation = self.generate_final_transformation()
|
|
20
26
|
self._final_mapped_axes = self._final_transformation._mapped_axes
|
|
@@ -24,9 +30,15 @@ class DatacubeMapper(DatacubeAxisTransformation):
|
|
|
24
30
|
|
|
25
31
|
def generate_final_transformation(self):
|
|
26
32
|
map_type = _type_to_datacube_mapper_lookup[self.grid_type]
|
|
27
|
-
module = import_module(
|
|
33
|
+
module = import_module(
|
|
34
|
+
"polytope_feature.datacube.transformations.datacube_mappers.mapper_types." + self.grid_type
|
|
35
|
+
)
|
|
28
36
|
constructor = getattr(module, map_type)
|
|
29
|
-
transformation = deepcopy(
|
|
37
|
+
transformation = deepcopy(
|
|
38
|
+
constructor(
|
|
39
|
+
self.old_axis, self.grid_axes, self.grid_resolution, self.md5_hash, self.local_area, self._axis_reversed
|
|
40
|
+
)
|
|
41
|
+
)
|
|
30
42
|
return transformation
|
|
31
43
|
|
|
32
44
|
def blocked_axes(self):
|
|
@@ -5,7 +5,7 @@ from ..datacube_mappers import DatacubeMapper
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
class HealpixGridMapper(DatacubeMapper):
|
|
8
|
-
def __init__(self, base_axis, mapped_axes, resolution, local_area=[]):
|
|
8
|
+
def __init__(self, base_axis, mapped_axes, resolution, md5_hash=None, local_area=[], axis_reversed=None):
|
|
9
9
|
# TODO: if local area is not empty list, raise NotImplemented
|
|
10
10
|
self._mapped_axes = mapped_axes
|
|
11
11
|
self._base_axis = base_axis
|
|
@@ -13,7 +13,14 @@ class HealpixGridMapper(DatacubeMapper):
|
|
|
13
13
|
self._axis_reversed = {mapped_axes[0]: True, mapped_axes[1]: False}
|
|
14
14
|
self._first_axis_vals = self.first_axis_vals()
|
|
15
15
|
self.compressed_grid_axes = [self._mapped_axes[1]]
|
|
16
|
-
|
|
16
|
+
if md5_hash is not None:
|
|
17
|
+
self.md5_hash = md5_hash
|
|
18
|
+
else:
|
|
19
|
+
self.md5_hash = _md5_hash.get(resolution, None)
|
|
20
|
+
if self._axis_reversed[mapped_axes[1]]:
|
|
21
|
+
raise NotImplementedError("Healpix grid with second axis in decreasing order is not supported")
|
|
22
|
+
if not self._axis_reversed[mapped_axes[0]]:
|
|
23
|
+
raise NotImplementedError("Healpix grid with first axis in increasing order is not supported")
|
|
17
24
|
|
|
18
25
|
def first_axis_vals(self):
|
|
19
26
|
rad2deg = 180 / math.pi
|
|
@@ -137,4 +144,4 @@ class HealpixGridMapper(DatacubeMapper):
|
|
|
137
144
|
|
|
138
145
|
|
|
139
146
|
# md5 grid hash in form {resolution : hash}
|
|
140
|
-
|
|
147
|
+
_md5_hash = {}
|
|
@@ -5,7 +5,7 @@ from ..datacube_mappers import DatacubeMapper
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
class NestedHealpixGridMapper(DatacubeMapper):
|
|
8
|
-
def __init__(self, base_axis, mapped_axes, resolution, local_area=[]):
|
|
8
|
+
def __init__(self, base_axis, mapped_axes, resolution, md5_hash=None, local_area=[], axis_reversed=None):
|
|
9
9
|
# TODO: if local area is not empty list, raise NotImplemented
|
|
10
10
|
self._mapped_axes = mapped_axes
|
|
11
11
|
self._base_axis = base_axis
|
|
@@ -17,7 +17,14 @@ class NestedHealpixGridMapper(DatacubeMapper):
|
|
|
17
17
|
self.k = int(math.log2(self.Nside))
|
|
18
18
|
self.Npix = 12 * self.Nside * self.Nside
|
|
19
19
|
self.Ncap = (self.Nside * (self.Nside - 1)) << 1
|
|
20
|
-
|
|
20
|
+
if md5_hash is not None:
|
|
21
|
+
self.md5_hash = md5_hash
|
|
22
|
+
else:
|
|
23
|
+
self.md5_hash = _md5_hash.get(resolution, None)
|
|
24
|
+
if self._axis_reversed[mapped_axes[1]]:
|
|
25
|
+
raise NotImplementedError("Healpix grid with second axis in decreasing order is not supported")
|
|
26
|
+
if not self._axis_reversed[mapped_axes[0]]:
|
|
27
|
+
raise NotImplementedError("Healpix grid with first axis in increasing order is not supported")
|
|
21
28
|
|
|
22
29
|
def first_axis_vals(self):
|
|
23
30
|
rad2deg = 180 / math.pi
|
|
@@ -215,4 +222,4 @@ class NestedHealpixGridMapper(DatacubeMapper):
|
|
|
215
222
|
|
|
216
223
|
|
|
217
224
|
# md5 grid hash in form {resolution : hash}
|
|
218
|
-
|
|
225
|
+
_md5_hash = {}
|
|
@@ -4,7 +4,7 @@ from ..datacube_mappers import DatacubeMapper
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
class LocalRegularGridMapper(DatacubeMapper):
|
|
7
|
-
def __init__(self, base_axis, mapped_axes, resolution, local_area=[]):
|
|
7
|
+
def __init__(self, base_axis, mapped_axes, resolution, md5_hash=None, local_area=[], axis_reversed=None):
|
|
8
8
|
# TODO: if local area is not empty list, raise NotImplemented
|
|
9
9
|
self._mapped_axes = mapped_axes
|
|
10
10
|
self._base_axis = base_axis
|
|
@@ -15,19 +15,38 @@ class LocalRegularGridMapper(DatacubeMapper):
|
|
|
15
15
|
if not isinstance(resolution, list):
|
|
16
16
|
self.first_resolution = resolution
|
|
17
17
|
self.second_resolution = resolution
|
|
18
|
-
|
|
18
|
+
if md5_hash is not None:
|
|
19
|
+
self.md5_hash = md5_hash
|
|
20
|
+
else:
|
|
21
|
+
self.md5_hash = _md5_hash.get(resolution, None)
|
|
19
22
|
else:
|
|
20
23
|
self.first_resolution = resolution[0]
|
|
21
24
|
self.second_resolution = resolution[1]
|
|
22
|
-
|
|
25
|
+
if md5_hash is not None:
|
|
26
|
+
self.md5_hash = md5_hash
|
|
27
|
+
else:
|
|
28
|
+
self.md5_hash = _md5_hash.get(tuple(resolution), None)
|
|
23
29
|
self._first_deg_increment = (local_area[1] - local_area[0]) / self.first_resolution
|
|
24
30
|
self._second_deg_increment = (local_area[3] - local_area[2]) / self.second_resolution
|
|
25
|
-
|
|
31
|
+
if axis_reversed is None:
|
|
32
|
+
self._axis_reversed = {mapped_axes[0]: False, mapped_axes[1]: False}
|
|
33
|
+
else:
|
|
34
|
+
assert set(axis_reversed.keys()) == set(mapped_axes)
|
|
35
|
+
self._axis_reversed = axis_reversed
|
|
26
36
|
self._first_axis_vals = self.first_axis_vals()
|
|
27
37
|
self.compressed_grid_axes = [self._mapped_axes[1]]
|
|
38
|
+
if self._axis_reversed[mapped_axes[1]]:
|
|
39
|
+
raise NotImplementedError("Local regular grid with second axis in decreasing order is not supported")
|
|
28
40
|
|
|
29
41
|
def first_axis_vals(self):
|
|
30
|
-
|
|
42
|
+
if self._axis_reversed[self._mapped_axes[0]]:
|
|
43
|
+
first_ax_vals = [
|
|
44
|
+
self._first_axis_max - i * self._first_deg_increment for i in range(self.first_resolution + 1)
|
|
45
|
+
]
|
|
46
|
+
else:
|
|
47
|
+
first_ax_vals = [
|
|
48
|
+
self._first_axis_min + i * self._first_deg_increment for i in range(self.first_resolution + 1)
|
|
49
|
+
]
|
|
31
50
|
return first_ax_vals
|
|
32
51
|
|
|
33
52
|
def map_first_axis(self, lower, upper):
|
|
@@ -73,4 +92,4 @@ class LocalRegularGridMapper(DatacubeMapper):
|
|
|
73
92
|
|
|
74
93
|
|
|
75
94
|
# md5 grid hash in form {resolution : hash}
|
|
76
|
-
|
|
95
|
+
_md5_hash = {}
|
|
@@ -5,7 +5,7 @@ from ..datacube_mappers import DatacubeMapper
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
class OctahedralGridMapper(DatacubeMapper):
|
|
8
|
-
def __init__(self, base_axis, mapped_axes, resolution, local_area=[]):
|
|
8
|
+
def __init__(self, base_axis, mapped_axes, resolution, md5_hash=None, local_area=[], axis_reversed=None):
|
|
9
9
|
# TODO: if local area is not empty list, raise NotImplemented
|
|
10
10
|
self._mapped_axes = mapped_axes
|
|
11
11
|
self._base_axis = base_axis
|
|
@@ -14,8 +14,15 @@ class OctahedralGridMapper(DatacubeMapper):
|
|
|
14
14
|
self._first_idx_map = self.create_first_idx_map()
|
|
15
15
|
self._second_axis_spacing = {}
|
|
16
16
|
self._axis_reversed = {mapped_axes[0]: True, mapped_axes[1]: False}
|
|
17
|
+
if self._axis_reversed[mapped_axes[1]]:
|
|
18
|
+
raise NotImplementedError("Octahedral grid with second axis in decreasing order is not supported")
|
|
19
|
+
if not self._axis_reversed[mapped_axes[0]]:
|
|
20
|
+
raise NotImplementedError("Octahedral grid with first axis in increasing order is not supported")
|
|
17
21
|
self.compressed_grid_axes = [self._mapped_axes[1]]
|
|
18
|
-
|
|
22
|
+
if md5_hash is not None:
|
|
23
|
+
self.md5_hash = md5_hash
|
|
24
|
+
else:
|
|
25
|
+
self.md5_hash = _md5_hash.get(resolution, None)
|
|
19
26
|
|
|
20
27
|
def gauss_first_guess(self):
|
|
21
28
|
i = 0
|
|
@@ -2754,6 +2761,6 @@ class OctahedralGridMapper(DatacubeMapper):
|
|
|
2754
2761
|
|
|
2755
2762
|
|
|
2756
2763
|
# md5 grid hash in form {resolution : hash}
|
|
2757
|
-
|
|
2764
|
+
_md5_hash = {
|
|
2758
2765
|
1280: "158db321ae8e773681eeb40e0a3d350f",
|
|
2759
2766
|
}
|
|
@@ -4,7 +4,7 @@ from ..datacube_mappers import DatacubeMapper
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
class ReducedLatLonMapper(DatacubeMapper):
|
|
7
|
-
def __init__(self, base_axis, mapped_axes, resolution, local_area=[]):
|
|
7
|
+
def __init__(self, base_axis, mapped_axes, resolution, md5_hash=None, local_area=[], axis_reversed=None):
|
|
8
8
|
# TODO: if local area is not empty list, raise NotImplemented
|
|
9
9
|
self._mapped_axes = mapped_axes
|
|
10
10
|
self._base_axis = base_axis
|
|
@@ -12,7 +12,14 @@ class ReducedLatLonMapper(DatacubeMapper):
|
|
|
12
12
|
self._axis_reversed = {mapped_axes[0]: False, mapped_axes[1]: False}
|
|
13
13
|
self._first_axis_vals = self.first_axis_vals()
|
|
14
14
|
self.compressed_grid_axes = [self._mapped_axes[1]]
|
|
15
|
-
|
|
15
|
+
if md5_hash is not None:
|
|
16
|
+
self.md5_hash = md5_hash
|
|
17
|
+
else:
|
|
18
|
+
self.md5_hash = _md5_hash.get(resolution, None)
|
|
19
|
+
if self._axis_reversed[mapped_axes[1]]:
|
|
20
|
+
raise NotImplementedError("Reduced lat-lon grid with second axis in decreasing order is not supported")
|
|
21
|
+
if self._axis_reversed[mapped_axes[0]]:
|
|
22
|
+
raise NotImplementedError("Reduced lat-lon grid with first axis in decreasing order is not supported")
|
|
16
23
|
|
|
17
24
|
def first_axis_vals(self):
|
|
18
25
|
resolution = 180 / (self._resolution - 1)
|
|
@@ -1508,4 +1515,4 @@ class ReducedLatLonMapper(DatacubeMapper):
|
|
|
1508
1515
|
|
|
1509
1516
|
|
|
1510
1517
|
# md5 grid hash in form {resolution : hash}
|
|
1511
|
-
|
|
1518
|
+
_md5_hash = {}
|
|
@@ -4,19 +4,31 @@ from ..datacube_mappers import DatacubeMapper
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
class RegularGridMapper(DatacubeMapper):
|
|
7
|
-
def __init__(self, base_axis, mapped_axes, resolution, local_area=[]):
|
|
7
|
+
def __init__(self, base_axis, mapped_axes, resolution, md5_hash=None, local_area=[], axis_reversed=None):
|
|
8
8
|
# TODO: if local area is not empty list, raise NotImplemented
|
|
9
9
|
self._mapped_axes = mapped_axes
|
|
10
10
|
self._base_axis = base_axis
|
|
11
11
|
self._resolution = resolution
|
|
12
12
|
self.deg_increment = 90 / self._resolution
|
|
13
|
-
|
|
13
|
+
if axis_reversed is None:
|
|
14
|
+
self._axis_reversed = {mapped_axes[0]: True, mapped_axes[1]: False}
|
|
15
|
+
else:
|
|
16
|
+
assert set(axis_reversed.keys()) == set(mapped_axes)
|
|
17
|
+
self._axis_reversed = axis_reversed
|
|
14
18
|
self._first_axis_vals = self.first_axis_vals()
|
|
15
19
|
self.compressed_grid_axes = [self._mapped_axes[1]]
|
|
16
|
-
|
|
20
|
+
if md5_hash is not None:
|
|
21
|
+
self.md5_hash = md5_hash
|
|
22
|
+
else:
|
|
23
|
+
self.md5_hash = _md5_hash.get(resolution, None)
|
|
24
|
+
if self._axis_reversed[mapped_axes[1]]:
|
|
25
|
+
raise NotImplementedError("Regular grid with second axis in decreasing order is not supported")
|
|
17
26
|
|
|
18
27
|
def first_axis_vals(self):
|
|
19
|
-
|
|
28
|
+
if self._axis_reversed[self._mapped_axes[0]]:
|
|
29
|
+
first_ax_vals = [90 - i * self.deg_increment for i in range(2 * self._resolution)]
|
|
30
|
+
else:
|
|
31
|
+
first_ax_vals = [-90 + i * self.deg_increment for i in range(2 * self._resolution)]
|
|
20
32
|
return first_ax_vals
|
|
21
33
|
|
|
22
34
|
def map_first_axis(self, lower, upper):
|
|
@@ -60,4 +72,4 @@ class RegularGridMapper(DatacubeMapper):
|
|
|
60
72
|
|
|
61
73
|
|
|
62
74
|
# md5 grid hash in form {resolution : hash}
|
|
63
|
-
|
|
75
|
+
_md5_hash = {}
|
|
@@ -12,9 +12,8 @@ class DatacubeAxisTransformation(ABC):
|
|
|
12
12
|
transformation_type = _type_to_datacube_transformation_lookup[transformation_type_key]
|
|
13
13
|
transformation_file_name = _type_to_transformation_file_lookup[transformation_type_key]
|
|
14
14
|
file_name = ".datacube_" + transformation_file_name
|
|
15
|
-
module = import_module("
|
|
15
|
+
module = import_module("polytope_feature.datacube.transformations" + file_name + file_name)
|
|
16
16
|
constructor = getattr(module, transformation_type)
|
|
17
|
-
# transformation_type_option = transformation_options[transformation_type_key]
|
|
18
17
|
transformation_type_option = transformation_options
|
|
19
18
|
new_transformation = deepcopy(constructor(name, transformation_type_option))
|
|
20
19
|
|
|
@@ -15,7 +15,7 @@ class DatacubeAxisTypeChange(DatacubeAxisTransformation):
|
|
|
15
15
|
|
|
16
16
|
def generate_final_transformation(self):
|
|
17
17
|
map_type = _type_to_datacube_type_change_lookup[self.new_type]
|
|
18
|
-
module = import_module("
|
|
18
|
+
module = import_module("polytope_feature.datacube.transformations.datacube_type_change.datacube_type_change")
|
|
19
19
|
constructor = getattr(module, map_type)
|
|
20
20
|
transformation = deepcopy(constructor(self.name, self.new_type))
|
|
21
21
|
return transformation
|
|
@@ -21,7 +21,9 @@ class MapperConfig(TransformationConfig):
|
|
|
21
21
|
type: str = ""
|
|
22
22
|
resolution: Union[int, List[int]] = 0
|
|
23
23
|
axes: List[str] = [""]
|
|
24
|
+
md5_hash: Optional[str] = None
|
|
24
25
|
local: Optional[List[float]] = None
|
|
26
|
+
axis_reversed: Optional[Dict[str, bool]] = None
|
|
25
27
|
|
|
26
28
|
|
|
27
29
|
class ReverseConfig(TransformationConfig):
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "1.0.9"
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
MANIFEST.in
|
|
3
|
+
pyproject.toml
|
|
4
|
+
requirements.txt
|
|
5
|
+
setup.py
|
|
6
|
+
polytope_feature/__init__.py
|
|
7
|
+
polytope_feature/options.py
|
|
8
|
+
polytope_feature/polytope.py
|
|
9
|
+
polytope_feature/shapes.py
|
|
10
|
+
polytope_feature/version.py
|
|
11
|
+
polytope_feature/datacube/__init__.py
|
|
12
|
+
polytope_feature/datacube/datacube_axis.py
|
|
13
|
+
polytope_feature/datacube/index_tree_pb2.py
|
|
14
|
+
polytope_feature/datacube/tensor_index_tree.py
|
|
15
|
+
polytope_feature/datacube/tree_encoding.py
|
|
16
|
+
polytope_feature/datacube/backends/__init__.py
|
|
17
|
+
polytope_feature/datacube/backends/datacube.py
|
|
18
|
+
polytope_feature/datacube/backends/fdb.py
|
|
19
|
+
polytope_feature/datacube/backends/mock.py
|
|
20
|
+
polytope_feature/datacube/backends/xarray.py
|
|
21
|
+
polytope_feature/datacube/transformations/__init__.py
|
|
22
|
+
polytope_feature/datacube/transformations/datacube_transformations.py
|
|
23
|
+
polytope_feature/datacube/transformations/datacube_cyclic/__init__.py
|
|
24
|
+
polytope_feature/datacube/transformations/datacube_cyclic/datacube_cyclic.py
|
|
25
|
+
polytope_feature/datacube/transformations/datacube_mappers/__init__.py
|
|
26
|
+
polytope_feature/datacube/transformations/datacube_mappers/datacube_mappers.py
|
|
27
|
+
polytope_feature/datacube/transformations/datacube_mappers/mapper_types/__init__.py
|
|
28
|
+
polytope_feature/datacube/transformations/datacube_mappers/mapper_types/healpix.py
|
|
29
|
+
polytope_feature/datacube/transformations/datacube_mappers/mapper_types/healpix_nested.py
|
|
30
|
+
polytope_feature/datacube/transformations/datacube_mappers/mapper_types/local_regular.py
|
|
31
|
+
polytope_feature/datacube/transformations/datacube_mappers/mapper_types/octahedral.py
|
|
32
|
+
polytope_feature/datacube/transformations/datacube_mappers/mapper_types/reduced_ll.py
|
|
33
|
+
polytope_feature/datacube/transformations/datacube_mappers/mapper_types/regular.py
|
|
34
|
+
polytope_feature/datacube/transformations/datacube_merger/__init__.py
|
|
35
|
+
polytope_feature/datacube/transformations/datacube_merger/datacube_merger.py
|
|
36
|
+
polytope_feature/datacube/transformations/datacube_reverse/__init__.py
|
|
37
|
+
polytope_feature/datacube/transformations/datacube_reverse/datacube_reverse.py
|
|
38
|
+
polytope_feature/datacube/transformations/datacube_type_change/__init__.py
|
|
39
|
+
polytope_feature/datacube/transformations/datacube_type_change/datacube_type_change.py
|
|
40
|
+
polytope_feature/engine/__init__.py
|
|
41
|
+
polytope_feature/engine/engine.py
|
|
42
|
+
polytope_feature/engine/hullslicer.py
|
|
43
|
+
polytope_feature/utility/__init__.py
|
|
44
|
+
polytope_feature/utility/combinatorics.py
|
|
45
|
+
polytope_feature/utility/exceptions.py
|
|
46
|
+
polytope_feature/utility/geometry.py
|
|
47
|
+
polytope_feature/utility/list_tools.py
|
|
48
|
+
polytope_feature/utility/profiling.py
|
|
49
|
+
polytope_python.egg-info/PKG-INFO
|
|
50
|
+
polytope_python.egg-info/SOURCES.txt
|
|
51
|
+
polytope_python.egg-info/dependency_links.txt
|
|
52
|
+
polytope_python.egg-info/not-zip-safe
|
|
53
|
+
polytope_python.egg-info/requires.txt
|
|
54
|
+
polytope_python.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
polytope_feature
|
|
@@ -5,7 +5,7 @@ from setuptools import find_packages, setup
|
|
|
5
5
|
|
|
6
6
|
__version__ = re.search(
|
|
7
7
|
r'__version__\s*=\s*[\'"]([^\'"]*)[\'"]',
|
|
8
|
-
io.open("
|
|
8
|
+
io.open("polytope_feature/version.py", encoding="utf_8_sig").read(),
|
|
9
9
|
).group(1)
|
|
10
10
|
|
|
11
11
|
with open("requirements.txt") as f:
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "1.0.7"
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
LICENSE
|
|
2
|
-
MANIFEST.in
|
|
3
|
-
pyproject.toml
|
|
4
|
-
requirements.txt
|
|
5
|
-
setup.py
|
|
6
|
-
polytope/__init__.py
|
|
7
|
-
polytope/options.py
|
|
8
|
-
polytope/polytope.py
|
|
9
|
-
polytope/shapes.py
|
|
10
|
-
polytope/version.py
|
|
11
|
-
polytope/datacube/__init__.py
|
|
12
|
-
polytope/datacube/datacube_axis.py
|
|
13
|
-
polytope/datacube/index_tree_pb2.py
|
|
14
|
-
polytope/datacube/tensor_index_tree.py
|
|
15
|
-
polytope/datacube/tree_encoding.py
|
|
16
|
-
polytope/datacube/backends/__init__.py
|
|
17
|
-
polytope/datacube/backends/datacube.py
|
|
18
|
-
polytope/datacube/backends/fdb.py
|
|
19
|
-
polytope/datacube/backends/mock.py
|
|
20
|
-
polytope/datacube/backends/xarray.py
|
|
21
|
-
polytope/datacube/transformations/__init__.py
|
|
22
|
-
polytope/datacube/transformations/datacube_transformations.py
|
|
23
|
-
polytope/datacube/transformations/datacube_cyclic/__init__.py
|
|
24
|
-
polytope/datacube/transformations/datacube_cyclic/datacube_cyclic.py
|
|
25
|
-
polytope/datacube/transformations/datacube_mappers/__init__.py
|
|
26
|
-
polytope/datacube/transformations/datacube_mappers/datacube_mappers.py
|
|
27
|
-
polytope/datacube/transformations/datacube_mappers/mapper_types/__init__.py
|
|
28
|
-
polytope/datacube/transformations/datacube_mappers/mapper_types/healpix.py
|
|
29
|
-
polytope/datacube/transformations/datacube_mappers/mapper_types/healpix_nested.py
|
|
30
|
-
polytope/datacube/transformations/datacube_mappers/mapper_types/local_regular.py
|
|
31
|
-
polytope/datacube/transformations/datacube_mappers/mapper_types/octahedral.py
|
|
32
|
-
polytope/datacube/transformations/datacube_mappers/mapper_types/reduced_ll.py
|
|
33
|
-
polytope/datacube/transformations/datacube_mappers/mapper_types/regular.py
|
|
34
|
-
polytope/datacube/transformations/datacube_merger/__init__.py
|
|
35
|
-
polytope/datacube/transformations/datacube_merger/datacube_merger.py
|
|
36
|
-
polytope/datacube/transformations/datacube_reverse/__init__.py
|
|
37
|
-
polytope/datacube/transformations/datacube_reverse/datacube_reverse.py
|
|
38
|
-
polytope/datacube/transformations/datacube_type_change/__init__.py
|
|
39
|
-
polytope/datacube/transformations/datacube_type_change/datacube_type_change.py
|
|
40
|
-
polytope/engine/__init__.py
|
|
41
|
-
polytope/engine/engine.py
|
|
42
|
-
polytope/engine/hullslicer.py
|
|
43
|
-
polytope/utility/__init__.py
|
|
44
|
-
polytope/utility/combinatorics.py
|
|
45
|
-
polytope/utility/exceptions.py
|
|
46
|
-
polytope/utility/geometry.py
|
|
47
|
-
polytope/utility/list_tools.py
|
|
48
|
-
polytope/utility/profiling.py
|
|
49
|
-
polytope_python.egg-info/PKG-INFO
|
|
50
|
-
polytope_python.egg-info/SOURCES.txt
|
|
51
|
-
polytope_python.egg-info/dependency_links.txt
|
|
52
|
-
polytope_python.egg-info/not-zip-safe
|
|
53
|
-
polytope_python.egg-info/requires.txt
|
|
54
|
-
polytope_python.egg-info/top_level.txt
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
polytope
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{polytope-python-1.0.7/polytope → polytope-python-1.0.9/polytope_feature}/datacube/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{polytope-python-1.0.7/polytope → polytope-python-1.0.9/polytope_feature}/datacube/backends/fdb.py
RENAMED
|
File without changes
|
{polytope-python-1.0.7/polytope → polytope-python-1.0.9/polytope_feature}/datacube/backends/mock.py
RENAMED
|
File without changes
|
|
File without changes
|
{polytope-python-1.0.7/polytope → polytope-python-1.0.9/polytope_feature}/datacube/datacube_axis.py
RENAMED
|
File without changes
|
{polytope-python-1.0.7/polytope → polytope-python-1.0.9/polytope_feature}/datacube/index_tree_pb2.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{polytope-python-1.0.7/polytope → polytope-python-1.0.9/polytope_feature}/datacube/tree_encoding.py
RENAMED
|
File without changes
|
{polytope-python-1.0.7/polytope → polytope-python-1.0.9/polytope_feature}/engine/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{polytope-python-1.0.7/polytope → polytope-python-1.0.9/polytope_feature}/utility/__init__.py
RENAMED
|
File without changes
|
{polytope-python-1.0.7/polytope → polytope-python-1.0.9/polytope_feature}/utility/combinatorics.py
RENAMED
|
File without changes
|
{polytope-python-1.0.7/polytope → polytope-python-1.0.9/polytope_feature}/utility/exceptions.py
RENAMED
|
File without changes
|
{polytope-python-1.0.7/polytope → polytope-python-1.0.9/polytope_feature}/utility/geometry.py
RENAMED
|
File without changes
|
{polytope-python-1.0.7/polytope → polytope-python-1.0.9/polytope_feature}/utility/list_tools.py
RENAMED
|
File without changes
|
{polytope-python-1.0.7/polytope → polytope-python-1.0.9/polytope_feature}/utility/profiling.py
RENAMED
|
File without changes
|
{polytope-python-1.0.7 → polytope-python-1.0.9}/polytope_python.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|