RadGEEToolbox 1.7.5__py3-none-any.whl → 1.7.6__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.
@@ -10,19 +10,24 @@ _LS_SCALE = 0.0000275
10
10
  _LS_OFFSET = -0.2
11
11
 
12
12
  def _scale_landsat_sr(img):
13
- """
14
- Converts Landsat C2 SR DN values to reflectance values for SR_B1..SR_B7 (overwrite bands).
15
-
16
- Args:
17
- img (ee.Image): Input Landsat image without scaled bands.
18
-
19
- Returns:
20
- ee.Image: Image with scaled reflectance bands.
21
- """
22
13
  img = ee.Image(img)
14
+
15
+ # Get the sensor from the image metadata
16
+ # This matches the logic you already use in _landsat_selector
17
+ sensor = img.get('SPACECRAFT_ID')
18
+
19
+ available_bands = img.bandNames()
20
+
21
+ target_bands = ee.List(_LS_SR_BANDS).filter(ee.Filter.inList('item', available_bands))
22
+
23
23
  is_scaled = ee.Algorithms.IsEqual(img.get('rgt:scaled'), 'landsat_sr')
24
- scaled = img.select(_LS_SR_BANDS).multiply(_LS_SCALE).add(_LS_OFFSET)
24
+
25
+ # Apply scaling factors (0.0000275 and -0.2) only to existing SR bands
26
+ scaled = img.select(target_bands).multiply(_LS_SCALE).add(_LS_OFFSET)
27
+ scaled = scaled.max(0.0001) # Ensure reflectance values are not negative after scaling
28
+
25
29
  out = img.addBands(scaled, None, True).set('rgt:scaled', 'landsat_sr')
30
+
26
31
  return ee.Image(ee.Algorithms.If(is_scaled, img, out))
27
32
 
28
33
  class LandsatCollection:
RadGEEToolbox/__init__.py CHANGED
@@ -1,4 +1,4 @@
1
- __version__ = "1.7.5"
1
+ __version__ = "1.7.6"
2
2
 
3
3
  from .CollectionStitch import collectionStitch, mosaicByDate
4
4
  from .Export import ExportToDrive
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: RadGEEToolbox
3
- Version: 1.7.5
3
+ Version: 1.7.6
4
4
  Summary: Streamlined Multispectral & SAR Analysis for Google Earth Engine Python API
5
5
  Home-page: https://github.com/radwinskis/RadGEEToolbox
6
6
  Author: Mark Radwin
@@ -43,7 +43,7 @@ Designed for both new and advanced users of Google Earth Engine, RadGEEToolbox m
43
43
 
44
44
  Although similar packages exist (eemont, geetools, etc.), `RadGEEToolbox` extends functionality and provides cohesive, chainable methods for research oriented projects working with Landsat TM & OLI, Sentinel-1 SAR, and/or Sentinel-2 MSI datasets (Table 1). The ultimate goal of `RadGEEToolbox` is to make satellite image processing easier and faster for real world applications relying on the most commonly utilized remote sensing platforms.
45
45
 
46
- As of version `1.7.5`, `RadGEEToolbox` supports any generic image collection via the `GenericCollection` module which allows for utilization of the same data management, temporal reduction, zonal statistics, and data export tools available for the `LandsatCollection`, `Sentinel1Collection`, and `Sentinel2Collection` modules. This allows users to provide their own image collection of choice, such as PRISM or MODIS data, to benefit from the tools available with `RadGEEToolbox`.
46
+ As of version `1.7.6`, `RadGEEToolbox` supports any generic image collection via the `GenericCollection` module which allows for utilization of the same data management, temporal reduction, zonal statistics, and data export tools available for the `LandsatCollection`, `Sentinel1Collection`, and `Sentinel2Collection` modules. This allows users to provide their own image collection of choice, such as PRISM or MODIS data, to benefit from the tools available with `RadGEEToolbox`.
47
47
 
48
48
  ***Table 1.*** *Comparison of functionality between RadGEEToolbox, eemont, and geetools.*
49
49
 
@@ -185,15 +185,15 @@ _____________
185
185
 
186
186
  ### Installing via pip
187
187
 
188
- To install `RadGEEToolbox` version 1.7.5 using pip (NOTE: it is recommended to create a new virtual environment):
188
+ To install `RadGEEToolbox` version 1.7.6 using pip (NOTE: it is recommended to create a new virtual environment):
189
189
 
190
190
  ```bash
191
- pip install RadGEEToolbox==1.7.5
191
+ pip install RadGEEToolbox==1.7.6
192
192
  ```
193
193
 
194
194
  ### Installing via Conda
195
195
 
196
- To install `RadGEEToolbox` version 1.7.5 using conda-forge (NOTE: it is recommended to create a new virtual environment):
196
+ To install `RadGEEToolbox` version 1.7.6 using conda-forge (NOTE: it is recommended to create a new virtual environment):
197
197
 
198
198
  ```bash
199
199
  conda install conda-forge::radgeetoolbox
@@ -224,7 +224,7 @@ To verify that `RadGEEToolbox` was installed correctly:
224
224
  python -c "import RadGEEToolbox; print(RadGEEToolbox.__version__)"
225
225
  ```
226
226
 
227
- You should see `1.7.5` printed as the version number.
227
+ You should see `1.7.6` printed as the version number.
228
228
 
229
229
  ### Want to Visualize Data? Install These Too
230
230
 
@@ -2,13 +2,13 @@ RadGEEToolbox/CollectionStitch.py,sha256=za_UHSgPqkflNcapg42ruu8-Mk6QCeRNQi3fPx2
2
2
  RadGEEToolbox/Export.py,sha256=FLQZw6Hy3iwYxsLqV1HomGex3pZo9ynUr5FoiP15Cfk,11017
3
3
  RadGEEToolbox/GenericCollection.py,sha256=GzB7fXxdLZ3EY2NEGOaI2hJjOV29Y3_QLhlbM3urdR4,188243
4
4
  RadGEEToolbox/GetPalette.py,sha256=Ve7vYzs0EYHZyvFwaB_k8FR4uo5RRDy4pcq7eBK9yM0,7145
5
- RadGEEToolbox/LandsatCollection.py,sha256=ryamip7tUCGffMqOqOE1xyM2a6Y-0ik9gbyrO0R-lqg,260162
5
+ RadGEEToolbox/LandsatCollection.py,sha256=qgV41JrqsIUgJYXd9xbH8OtjhroKrRWZvPKyTxBQaGY,260390
6
6
  RadGEEToolbox/Sentinel1Collection.py,sha256=opBKACVTIkPXPi-H5KF95fGe2ZRwTPAInr6mxGdeCtQ,177557
7
7
  RadGEEToolbox/Sentinel2Collection.py,sha256=WopoVGRht0vc3ekmd4ZwL8GFkKLBuB2qSRCNBW4KSBY,227188
8
8
  RadGEEToolbox/VisParams.py,sha256=ONjnJd83jfaM1r-hbtlcIxiBOGMoJGtdHF0mw1iaw5c,8183
9
- RadGEEToolbox/__init__.py,sha256=IJB9E_bvnRnP_EXhRECb0oAu87ZB72VQoIdqiMe7H8Y,663
10
- radgeetoolbox-1.7.5.dist-info/licenses/LICENSE.txt,sha256=5Xj9dwVkawz6d8zhCwJy0SmXvm0U4K_msJnOrkHLO1w,1089
11
- radgeetoolbox-1.7.5.dist-info/METADATA,sha256=P8XQ6UN60-VV2psWNSQuYoCPhxHyBASxQ7okzjrF6RY,17737
12
- radgeetoolbox-1.7.5.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
13
- radgeetoolbox-1.7.5.dist-info/top_level.txt,sha256=W2E520tugQoptDkhctKFbzsheL2l_DyYLKqKXkD9G_E,14
14
- radgeetoolbox-1.7.5.dist-info/RECORD,,
9
+ RadGEEToolbox/__init__.py,sha256=Ao8cWeAfXUB6e2ZZkTBfnr2J66nC0lqwbu7xaWsAuKE,663
10
+ radgeetoolbox-1.7.6.dist-info/licenses/LICENSE.txt,sha256=5Xj9dwVkawz6d8zhCwJy0SmXvm0U4K_msJnOrkHLO1w,1089
11
+ radgeetoolbox-1.7.6.dist-info/METADATA,sha256=2-0QuDUmYtqjKabAa6PZx5ZRNBWXHWaDzvlMJCyRz84,17737
12
+ radgeetoolbox-1.7.6.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
13
+ radgeetoolbox-1.7.6.dist-info/top_level.txt,sha256=W2E520tugQoptDkhctKFbzsheL2l_DyYLKqKXkD9G_E,14
14
+ radgeetoolbox-1.7.6.dist-info/RECORD,,