kuva-reader 1.0.0__py3-none-any.whl → 1.0.2__py3-none-any.whl

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.

Potentially problematic release.


This version of kuva-reader might be problematic. Click here for more details.

@@ -233,6 +233,16 @@ class Level0Product(ProductBase[MetadataLevel0]):
233
233
  bad_pixel_filename = f"{camera}_per_frame_cloud_mask.tif"
234
234
  return self._read_array(self.image_path / bad_pixel_filename)
235
235
 
236
+ def release_memory(self):
237
+ """Explicitely releases the memory of the `images` variable.
238
+
239
+ NOTE: this function is implemented because of a memory leak inside the Rioxarray
240
+ library that doesn't release memory properly. Only use it when the image data is
241
+ not needed anymore.
242
+ """
243
+ del self.images
244
+ self.images = None
245
+
236
246
 
237
247
  def generate_level_0_metafile():
238
248
  """Example function for reading a product and generating a metadata file from the
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: kuva-reader
3
- Version: 1.0.0
3
+ Version: 1.0.2
4
4
  Summary: Manipulate the Kuva Space image and metadata formats
5
5
  License: MIT
6
6
  Author: Guillem Ballesteros
@@ -11,8 +11,8 @@ Classifier: Programming Language :: Python :: 3
11
11
  Classifier: Programming Language :: Python :: 3.10
12
12
  Classifier: Programming Language :: Python :: 3.11
13
13
  Classifier: Programming Language :: Python :: 3.12
14
- Requires-Dist: kuva-geometry @ file:///home/olli/projects/kuva-repos/kuva-data-processing/kuva-geometry
15
- Requires-Dist: kuva-metadata @ file:///home/olli/projects/kuva-repos/kuva-data-processing/kuva-metadata
14
+ Requires-Dist: kuva-geometry
15
+ Requires-Dist: kuva-metadata
16
16
  Requires-Dist: numpy (>=1.26.4,<2.0.0)
17
17
  Requires-Dist: numpy-quaternion (>=2022.4.4,<2023.0.0)
18
18
  Requires-Dist: pint (>=0.22,<0.23)
@@ -53,15 +53,16 @@ pip install kuva-reader
53
53
 
54
54
  ## Minimal example
55
55
 
56
- This is a minimal example that allows you to read and print the image shape of a L1 product. \
57
- The result product is in this case an L1C product (as seen from the folder name).
56
+ This is a minimal example that allows you to read and print the image shape of a L2 product.
57
+
58
+ The result product is in this case an L2A product (as seen from the folder name).
58
59
  The loaded product is stored in a `rioxarray` object, which contains extensive GIS functionalities [(examples for usage)](https://corteva.github.io/rioxarray/stable/examples/examples.html).
59
60
 
60
61
  ```python
61
62
  from kuva_reader import read_product
62
63
 
63
64
  l2a_product = read_product("my_data_folder/hyperfield1a_L2A_20250105T092548")
64
- print(product) # Will show some main information such as image shape and CRS
65
+ print(l2a_product) # Will show some main information such as image shape and CRS
65
66
  ```
66
67
 
67
68
  This assumes a mostly untouched folder after distributing. Otherwise, you may need to
@@ -2,14 +2,14 @@ kuva_reader/__init__.py,sha256=qqsgtVNCkqXFuXOXf5v51ZT_Dcipj1ty0mGUw8fU3sU,1509
2
2
  kuva_reader/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
3
  kuva_reader/reader/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  kuva_reader/reader/image.py,sha256=Ep54Tzila3hKF2I_u-54xnFUf8WqP2fiKAJnbyZxasA,4647
5
- kuva_reader/reader/level0.py,sha256=NBeYTHcb5BxVe7f4sN9PfZCJA0wUotF5vAncFPk2CL8,10000
5
+ kuva_reader/reader/level0.py,sha256=-ONYaBH9YFHGaFvJDiDRlmXUWTYPQyQt0XZeuv5sEL4,10370
6
6
  kuva_reader/reader/level1.py,sha256=V1gNjz9y185nCJkYpQVcXrmAOQVMaFwIPeIhQJBzaI4,7815
7
7
  kuva_reader/reader/level2.py,sha256=lyEbVSLkBxz32ZIEnJih4ln-F_d8h6FTOu1Npt7VHg0,4091
8
8
  kuva_reader/reader/product_base.py,sha256=_O96DACi2bWEXhNJVuIU328RJ1y1gs7_rMyyEaMo4aA,4294
9
9
  kuva_reader/reader/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
10
  kuva_reader/reader/read.py,sha256=l2x-vlOLP8AUMzqSjHLaT7xt0YJtYUjiYWm6btV-rqo,1762
11
11
  kuva_reader/reader/utils.py,sha256=oZ1G43nm8lCxzfbdqBs0KhKaXWe_uf-78uBXWvmZigs,1566
12
- kuva_reader-1.0.0.dist-info/METADATA,sha256=4gh_BBCG6yKKJCxlcv6gOReBIDBHticGfiiIXfYAX0Q,4759
13
- kuva_reader-1.0.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
14
- kuva_reader-1.0.0.dist-info/entry_points.txt,sha256=YJysY9EChfOb1W_IEht2oE5Z8Y9jA0J6-kofaPv-NdI,149
15
- kuva_reader-1.0.0.dist-info/RECORD,,
12
+ kuva_reader-1.0.2.dist-info/METADATA,sha256=xAEDpi89F9xJTiRJJ7m1UYBFw2Diq8pgyYs4CM3tJ90,4612
13
+ kuva_reader-1.0.2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
14
+ kuva_reader-1.0.2.dist-info/entry_points.txt,sha256=YJysY9EChfOb1W_IEht2oE5Z8Y9jA0J6-kofaPv-NdI,149
15
+ kuva_reader-1.0.2.dist-info/RECORD,,