hydroanomaly 0.7.0__py3-none-any.whl → 0.7.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.
- hydroanomaly/__init__.py +5 -4
- hydroanomaly/usgs_turbidity.py +0 -41
- {hydroanomaly-0.7.0.dist-info → hydroanomaly-0.7.2.dist-info}/METADATA +1 -1
- hydroanomaly-0.7.2.dist-info/RECORD +9 -0
- hydroanomaly-0.7.0.dist-info/RECORD +0 -9
- {hydroanomaly-0.7.0.dist-info → hydroanomaly-0.7.2.dist-info}/WHEEL +0 -0
- {hydroanomaly-0.7.0.dist-info → hydroanomaly-0.7.2.dist-info}/licenses/LICENSE +0 -0
- {hydroanomaly-0.7.0.dist-info → hydroanomaly-0.7.2.dist-info}/top_level.txt +0 -0
hydroanomaly/__init__.py
CHANGED
@@ -9,12 +9,12 @@ A simple Python package with just 3 modules:
|
|
9
9
|
That's it - nothing else!
|
10
10
|
"""
|
11
11
|
|
12
|
-
__version__ = "0.7.
|
12
|
+
__version__ = "0.7.2"
|
13
13
|
__author__ = "Ehsan Kahrizi (Ehsan.kahrizi@usu.edu)"
|
14
14
|
|
15
15
|
# Import the 3 simple modules
|
16
16
|
from .usgs_turbidity import get_turbidity, get_usgs_turbidity
|
17
|
-
from .sentinel_bands import get_sentinel_bands, get_satellite_data, get_sentinel,
|
17
|
+
from .sentinel_bands import get_sentinel_bands, get_satellite_data, get_sentinel, get_sentinel_bands_gee
|
18
18
|
from .visualize import plot_timeseries, plot_turbidity, plot_sentinel, plot_comparison, plot, visualize
|
19
19
|
|
20
20
|
# Export everything
|
@@ -24,11 +24,12 @@ __all__ = [
|
|
24
24
|
'get_usgs_turbidity',
|
25
25
|
|
26
26
|
# Sentinel functions
|
27
|
+
'get_sentinel_bands_gee',
|
27
28
|
'get_sentinel_bands',
|
28
29
|
'get_satellite_data',
|
29
30
|
'get_sentinel',
|
30
|
-
|
31
|
-
|
31
|
+
|
32
|
+
|
32
33
|
# Visualization functions
|
33
34
|
'plot_timeseries',
|
34
35
|
'plot_turbidity',
|
hydroanomaly/usgs_turbidity.py
CHANGED
@@ -132,46 +132,5 @@ def _parse_usgs_response(content: str) -> pd.DataFrame:
|
|
132
132
|
return pd.DataFrame()
|
133
133
|
|
134
134
|
|
135
|
-
"""
|
136
|
-
# Generate synthetic data if data not exist in USGS ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
137
|
-
def _create_synthetic_turbidity(start_date: str, end_date: str) -> pd.DataFrame:
|
138
|
-
"""Create realistic synthetic turbidity data."""
|
139
|
-
|
140
|
-
date_range = pd.date_range(start=start_date, end=end_date, freq='H')
|
141
|
-
|
142
|
-
# Generate realistic turbidity values (typically 0-50 NTU)
|
143
|
-
base_turbidity = 8.0 # Base level
|
144
|
-
daily_variation = 3.0 # Daily fluctuation
|
145
|
-
|
146
|
-
# Create synthetic values with realistic patterns
|
147
|
-
synthetic_values = []
|
148
|
-
for i, dt in enumerate(date_range):
|
149
|
-
# Base value with daily pattern
|
150
|
-
daily_factor = np.sin(2 * np.pi * dt.hour / 24) * daily_variation
|
151
|
-
|
152
|
-
# Add some noise
|
153
|
-
noise = np.random.normal(0, 1.5)
|
154
|
-
|
155
|
-
# Occasional high turbidity events (storms)
|
156
|
-
if np.random.random() < 0.02: # 2% chance of high event
|
157
|
-
storm_factor = np.random.uniform(10, 30)
|
158
|
-
else:
|
159
|
-
storm_factor = 0
|
160
|
-
|
161
|
-
value = base_turbidity + daily_factor + noise + storm_factor
|
162
|
-
value = max(0.1, value) # Ensure positive values
|
163
|
-
|
164
|
-
synthetic_values.append(value)
|
165
|
-
|
166
|
-
# Create DataFrame
|
167
|
-
synthetic_data = pd.DataFrame({
|
168
|
-
'turbidity': synthetic_values
|
169
|
-
}, index=date_range)
|
170
|
-
|
171
|
-
print(f"Created {len(synthetic_data)} synthetic turbidity measurements")
|
172
|
-
|
173
|
-
return synthetic_data
|
174
|
-
"""
|
175
|
-
|
176
135
|
# Simple alias for backwards compatibility
|
177
136
|
get_usgs_turbidity = get_turbidity
|
@@ -0,0 +1,9 @@
|
|
1
|
+
hydroanomaly/__init__.py,sha256=gAEU8qpI-DJxwaV0AefXWPsug2iSJsdVMHV8zr0MtSs,1388
|
2
|
+
hydroanomaly/sentinel_bands.py,sha256=TbdyvBRe9v3YGOz4umYhSJ-16a5lCF0YLwnmArZ9Gvs,3627
|
3
|
+
hydroanomaly/usgs_turbidity.py,sha256=k0cXRXpTe1YgjfR0Htw77SLD8hM--43jiEiJwx1vRg0,5664
|
4
|
+
hydroanomaly/visualize.py,sha256=gkLgI3agx291jK5o08nYEbEpGpr6cD-6aAKn2Ha2Lqk,6937
|
5
|
+
hydroanomaly-0.7.2.dist-info/licenses/LICENSE,sha256=OphKV48tcMv6ep-7j-8T6nycykPT0g8ZlMJ9zbGvdPs,1066
|
6
|
+
hydroanomaly-0.7.2.dist-info/METADATA,sha256=nrBagNESM-1Ax4rXQEe3Ju4ngmR5oG0xvQ3RBS9PKoI,12962
|
7
|
+
hydroanomaly-0.7.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
8
|
+
hydroanomaly-0.7.2.dist-info/top_level.txt,sha256=t-5Lc-eTLlkxIhR_N1Cpp6_YZafKS3xLLk9D2CtbE7o,13
|
9
|
+
hydroanomaly-0.7.2.dist-info/RECORD,,
|
@@ -1,9 +0,0 @@
|
|
1
|
-
hydroanomaly/__init__.py,sha256=ogIwGNHlNygEY0V-GlUxvD4DBAjVTO3BXtQUZpk_WKM,1375
|
2
|
-
hydroanomaly/sentinel_bands.py,sha256=TbdyvBRe9v3YGOz4umYhSJ-16a5lCF0YLwnmArZ9Gvs,3627
|
3
|
-
hydroanomaly/usgs_turbidity.py,sha256=_KL7vKmm1StH_WfxZwhZ1g3vtiz42kNrOSEOCSGWm2E,7221
|
4
|
-
hydroanomaly/visualize.py,sha256=gkLgI3agx291jK5o08nYEbEpGpr6cD-6aAKn2Ha2Lqk,6937
|
5
|
-
hydroanomaly-0.7.0.dist-info/licenses/LICENSE,sha256=OphKV48tcMv6ep-7j-8T6nycykPT0g8ZlMJ9zbGvdPs,1066
|
6
|
-
hydroanomaly-0.7.0.dist-info/METADATA,sha256=6wPV6ouwCt8u7E7nNiet-ipKPTJM_QmSHmffKCPUgag,12962
|
7
|
-
hydroanomaly-0.7.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
8
|
-
hydroanomaly-0.7.0.dist-info/top_level.txt,sha256=t-5Lc-eTLlkxIhR_N1Cpp6_YZafKS3xLLk9D2CtbE7o,13
|
9
|
-
hydroanomaly-0.7.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|