water-column-sonar-processing 25.1.2__py3-none-any.whl → 25.1.3__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 water-column-sonar-processing might be problematic. Click here for more details.
- water_column_sonar_processing/aws/dynamodb_manager.py +63 -12
- water_column_sonar_processing/cruise/resample_regrid.py +6 -1
- water_column_sonar_processing/model/zarr_manager.py +1 -1
- water_column_sonar_processing/utility/constants.py +1 -1
- {water_column_sonar_processing-25.1.2.dist-info → water_column_sonar_processing-25.1.3.dist-info}/METADATA +1 -1
- {water_column_sonar_processing-25.1.2.dist-info → water_column_sonar_processing-25.1.3.dist-info}/RECORD +9 -9
- {water_column_sonar_processing-25.1.2.dist-info → water_column_sonar_processing-25.1.3.dist-info}/LICENSE +0 -0
- {water_column_sonar_processing-25.1.2.dist-info → water_column_sonar_processing-25.1.3.dist-info}/WHEEL +0 -0
- {water_column_sonar_processing-25.1.2.dist-info → water_column_sonar_processing-25.1.3.dist-info}/top_level.txt +0 -0
|
@@ -140,15 +140,7 @@ class DynamoDBManager:
|
|
|
140
140
|
To be used to initialize a cruise, deletes all entries associated with that cruise
|
|
141
141
|
in the database.
|
|
142
142
|
"""
|
|
143
|
-
|
|
144
|
-
":cr": {"S": cruise_name},
|
|
145
|
-
":se": {"S": sensor_name},
|
|
146
|
-
":sh": {"S": ship_name},
|
|
147
|
-
}
|
|
148
|
-
filter_expression = (
|
|
149
|
-
"CRUISE_NAME = :cr and SENSOR_NAME = :se and SHIP_NAME = :sh"
|
|
150
|
-
)
|
|
151
|
-
# filter_expression = "CRUISE_NAME = :cr"
|
|
143
|
+
filter_expression = "CRUISE_NAME = :cr"
|
|
152
144
|
response = self.dynamodb_client.scan(
|
|
153
145
|
TableName=table_name,
|
|
154
146
|
# Limit=1000,
|
|
@@ -156,7 +148,7 @@ class DynamoDBManager:
|
|
|
156
148
|
# ExclusiveStartKey=where to pick up
|
|
157
149
|
#ReturnConsumedCapacity='INDEXES' | 'TOTAL' | 'NONE', ...not sure
|
|
158
150
|
# ProjectionExpression='#SH, #CR, #FN', # what to specifically return — from expression_attribute_names
|
|
159
|
-
FilterExpression=
|
|
151
|
+
FilterExpression=filter_expression,
|
|
160
152
|
# ExpressionAttributeNames={
|
|
161
153
|
# '#SH': 'SHIP_NAME',
|
|
162
154
|
# '#CR': 'CRUISE_NAME',
|
|
@@ -170,7 +162,6 @@ class DynamoDBManager:
|
|
|
170
162
|
ConsistentRead=True
|
|
171
163
|
# ExclusiveStartKey=response["LastEvaluatedKey"],
|
|
172
164
|
)
|
|
173
|
-
print(response)
|
|
174
165
|
# Note: table.scan() has 1 MB limit on results so pagination is used
|
|
175
166
|
|
|
176
167
|
if len(response["Items"]) == 0 and "LastEvaluatedKey" not in response:
|
|
@@ -183,7 +174,7 @@ class DynamoDBManager:
|
|
|
183
174
|
TableName=table_name,
|
|
184
175
|
### Either 'Select' or 'ExpressionAttributeNames'/'ProjectionExpression'
|
|
185
176
|
Select='ALL_ATTRIBUTES', # or 'SPECIFIC_ATTRIBUTES',
|
|
186
|
-
FilterExpression=
|
|
177
|
+
FilterExpression=filter_expression,
|
|
187
178
|
#ProjectionExpression='#SH, #CR, #FN', # what to specifically return — from expression_attribute_names
|
|
188
179
|
# ExpressionAttributeNames={ # would need to specify all cols in df
|
|
189
180
|
# '#SH': 'SHIP_NAME',
|
|
@@ -205,6 +196,66 @@ class DynamoDBManager:
|
|
|
205
196
|
|
|
206
197
|
return df.sort_values(by="START_TIME", ignore_index=True)
|
|
207
198
|
|
|
199
|
+
#####################################################################
|
|
200
|
+
# def get_cruise_list(
|
|
201
|
+
# self,
|
|
202
|
+
# table_name,
|
|
203
|
+
# ) -> list:
|
|
204
|
+
# """
|
|
205
|
+
# Experimental, gets all cruise names as list
|
|
206
|
+
# """
|
|
207
|
+
# filter_expression = "CRUISE_NAME = :cr"
|
|
208
|
+
# response = self.dynamodb_client.scan(
|
|
209
|
+
# TableName=table_name,
|
|
210
|
+
# Select='SPECIFIC_ATTRIBUTES',
|
|
211
|
+
# #ReturnConsumedCapacity='INDEXES' | 'TOTAL' | 'NONE', ...not sure
|
|
212
|
+
# # ProjectionExpression='#SH, #CR, #FN', # what to specifically return — from expression_attribute_names
|
|
213
|
+
# FilterExpression=filter_expression,
|
|
214
|
+
# # ExpressionAttributeNames={
|
|
215
|
+
# # '#SH': 'SHIP_NAME',
|
|
216
|
+
# # '#CR': 'CRUISE_NAME',
|
|
217
|
+
# # '#FN': 'FILE_NAME',
|
|
218
|
+
# # },
|
|
219
|
+
# # ExpressionAttributeValues={ # criteria
|
|
220
|
+
# # ':cr': {
|
|
221
|
+
# # 'S': cruise_name,
|
|
222
|
+
# # },
|
|
223
|
+
# # },
|
|
224
|
+
# )
|
|
225
|
+
# # Note: table.scan() has 1 MB limit on results so pagination is used
|
|
226
|
+
#
|
|
227
|
+
# if len(response["Items"]) == 0 and "LastEvaluatedKey" not in response:
|
|
228
|
+
# return pd.DataFrame() # If no results, return empty dataframe
|
|
229
|
+
#
|
|
230
|
+
# data = response["Items"]
|
|
231
|
+
#
|
|
232
|
+
# while response.get('LastEvaluatedKey'): #"LastEvaluatedKey" in response:
|
|
233
|
+
# response = self.dynamodb_client.scan(
|
|
234
|
+
# TableName=table_name,
|
|
235
|
+
# ### Either 'Select' or 'ExpressionAttributeNames'/'ProjectionExpression'
|
|
236
|
+
# Select='ALL_ATTRIBUTES', # or 'SPECIFIC_ATTRIBUTES',
|
|
237
|
+
# FilterExpression=filter_expression,
|
|
238
|
+
# #ProjectionExpression='#SH, #CR, #FN', # what to specifically return — from expression_attribute_names
|
|
239
|
+
# # ExpressionAttributeNames={ # would need to specify all cols in df
|
|
240
|
+
# # '#SH': 'SHIP_NAME',
|
|
241
|
+
# # '#CR': 'CRUISE_NAME',
|
|
242
|
+
# # '#FN': 'FILE_NAME',
|
|
243
|
+
# # },
|
|
244
|
+
# ExpressionAttributeValues={ # criteria
|
|
245
|
+
# ':cr': {
|
|
246
|
+
# 'S': cruise_name,
|
|
247
|
+
# },
|
|
248
|
+
# },
|
|
249
|
+
# ConsistentRead=True,
|
|
250
|
+
# ExclusiveStartKey=response["LastEvaluatedKey"],
|
|
251
|
+
# )
|
|
252
|
+
# data.extend(response["Items"])
|
|
253
|
+
#
|
|
254
|
+
# deserializer = self.type_deserializer
|
|
255
|
+
# df = pd.DataFrame([deserializer.deserialize({"M": i}) for i in data])
|
|
256
|
+
#
|
|
257
|
+
# return df.sort_values(by="START_TIME", ignore_index=True)
|
|
258
|
+
|
|
208
259
|
#####################################################################
|
|
209
260
|
# TODO: WIP
|
|
210
261
|
def delete_item(
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import gc
|
|
2
|
-
import os
|
|
3
2
|
from pathlib import Path
|
|
4
3
|
|
|
5
4
|
import numcodecs
|
|
@@ -311,6 +310,12 @@ class ResampleRegrid:
|
|
|
311
310
|
output_zarr_store.bottom[
|
|
312
311
|
start_ping_time_index:end_ping_time_index
|
|
313
312
|
] = detected_seafloor_depths
|
|
313
|
+
#
|
|
314
|
+
#
|
|
315
|
+
#
|
|
316
|
+
# TODO: write the time variable last so that I can parse that as check
|
|
317
|
+
#
|
|
318
|
+
#
|
|
314
319
|
#########################################################################
|
|
315
320
|
#########################################################################
|
|
316
321
|
except Exception as err:
|
|
@@ -250,7 +250,7 @@ class ZarrManager:
|
|
|
250
250
|
#
|
|
251
251
|
root.attrs["processing_software_name"] = Coordinates.PROJECT_NAME.value
|
|
252
252
|
root.attrs["processing_software_version"] = (
|
|
253
|
-
"25.1.
|
|
253
|
+
"25.1.3" # TODO: get programmatically, echopype>utils>prov.py
|
|
254
254
|
)
|
|
255
255
|
root.attrs["processing_software_time"] = Timestamp.get_timestamp()
|
|
256
256
|
#
|
|
@@ -3,7 +3,7 @@ from enum import Enum, Flag, unique
|
|
|
3
3
|
|
|
4
4
|
@unique
|
|
5
5
|
class Constants(Flag):
|
|
6
|
-
TILE_SIZE =
|
|
6
|
+
TILE_SIZE = 1024 # TODO: add tile size to metadata?
|
|
7
7
|
|
|
8
8
|
# Average https://noaa-wcsd-zarr-pds.s3.us-east-1.amazonaws.com/level_2/Henry_B._Bigelow/HB0902/EK60/HB0902.zarr/time/927
|
|
9
9
|
# chunk size is ~1.3 kB, HB0902 cruise takes ~30 seconds to load all time/lat/lon data
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: water_column_sonar_processing
|
|
3
|
-
Version: 25.1.
|
|
3
|
+
Version: 25.1.3
|
|
4
4
|
Summary: A processing tool for water column sonar data.
|
|
5
5
|
Author-email: Rudy Klucik <rudy.klucik@noaa.gov>
|
|
6
6
|
Project-URL: Homepage, https://github.com/CI-CMG/water-column-sonar-processing
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
water_column_sonar_processing/__init__.py,sha256=fvRK4uFo_A0l7w_T4yckvDqJ3wMUq4JB3VVPXqWfewE,226
|
|
2
2
|
water_column_sonar_processing/process.py,sha256=-yQtK3rnZq6lGAr3q02zLDe1NuMH9c0PiUOxKzG_r18,5386
|
|
3
3
|
water_column_sonar_processing/aws/__init__.py,sha256=KJqK8oYMn-u8n8i-Jp_lG5BvCOTjwWSjWP8yAyDlWVo,297
|
|
4
|
-
water_column_sonar_processing/aws/dynamodb_manager.py,sha256
|
|
4
|
+
water_column_sonar_processing/aws/dynamodb_manager.py,sha256=htP4Y2rmOSFtdzUFrgK14Bn-UXAFG22Ow-dDrR2alSw,13949
|
|
5
5
|
water_column_sonar_processing/aws/s3_manager.py,sha256=-PCiW7YF31nGIPa1oVOVTzjTSExAAkT_IyNNnvWv2HU,16214
|
|
6
6
|
water_column_sonar_processing/aws/s3fs_manager.py,sha256=Vo-DXj6vgb8t1l4LdtNu7JCtq_RfFsnl33RuGeBUXhk,2561
|
|
7
7
|
water_column_sonar_processing/aws/sns_manager.py,sha256=Dp9avG5VSugSWPR1dZ-askuAw1fCZkNUHbOUP65iR-k,1867
|
|
@@ -9,7 +9,7 @@ water_column_sonar_processing/aws/sqs_manager.py,sha256=NSUrWmnSC8h8Gf7gT0U8zFaQ
|
|
|
9
9
|
water_column_sonar_processing/cruise/__init__.py,sha256=H5hW0JMORuaFvQk_R31B4VL8RnRyKeanOOiWmqEMZJk,156
|
|
10
10
|
water_column_sonar_processing/cruise/create_empty_zarr_store.py,sha256=ZsFQTDA0gXfQHlxDsXBGD1qQ0ipmx4kS81DcY6ml5Ew,7767
|
|
11
11
|
water_column_sonar_processing/cruise/datatree_manager.py,sha256=Qy4dZCW8_q31lbjxbMsx3JtBS4BvQT17_2P0QD1RQcY,639
|
|
12
|
-
water_column_sonar_processing/cruise/resample_regrid.py,sha256=
|
|
12
|
+
water_column_sonar_processing/cruise/resample_regrid.py,sha256=986oZm6G8kngAmTg1GTTyxdx8Zy9fXAUGlK533GcrZ8,14413
|
|
13
13
|
water_column_sonar_processing/geometry/__init__.py,sha256=GIzzc-_7pwEwbOkGpc4i_fmjWI5ymllXqzdHq_d3Rio,299
|
|
14
14
|
water_column_sonar_processing/geometry/elevation_manager.py,sha256=eq9w691WJknPwWYkvO3giKTPleIxCVc2tMGR0e8ZRxQ,4267
|
|
15
15
|
water_column_sonar_processing/geometry/geometry_manager.py,sha256=nz5T1vCDWHYIfQ853EqKYHDetTul7jRWS3y8Evep8QU,10855
|
|
@@ -18,17 +18,17 @@ water_column_sonar_processing/geometry/pmtile_generation.py,sha256=7Lm08Jr6YaM4n
|
|
|
18
18
|
water_column_sonar_processing/index/__init__.py,sha256=izEObsKiOoIJ0kZCFhvaYsBd6Ga71XJxnogjrNInw68,68
|
|
19
19
|
water_column_sonar_processing/index/index_manager.py,sha256=qsS6rKObJlFXKyzRuT1bk2_qW1YagW-Fg_AkQ1U_KRs,14213
|
|
20
20
|
water_column_sonar_processing/model/__init__.py,sha256=FXaCdbPqxp0ogmZm9NplRirqpgMiYs1iRYgJbFbbX2Y,65
|
|
21
|
-
water_column_sonar_processing/model/zarr_manager.py,sha256=
|
|
21
|
+
water_column_sonar_processing/model/zarr_manager.py,sha256=UT3GSEQ6-_kd62dDZf9AOvueR8jEiUPbzoFcpiwy8IY,15505
|
|
22
22
|
water_column_sonar_processing/processing/__init__.py,sha256=tdpSfwnY6lbAS_yBTu4aG0SjPgCKqh6LAFvIj_t3j3U,168
|
|
23
23
|
water_column_sonar_processing/processing/batch_downloader.py,sha256=qXoruHdbgzAolmroK6eRn9bWgeHFgaVQLwhJ6X5oHRE,6299
|
|
24
24
|
water_column_sonar_processing/processing/raw_to_zarr.py,sha256=Sn0_zBT7yYP6abbSTlQBPA6iZSBxeVqPYYSgoroiBEU,17599
|
|
25
25
|
water_column_sonar_processing/utility/__init__.py,sha256=yDObMOL0_OxKWet5wffK2-XVJgoE9iwiY2q04GZrtBQ,234
|
|
26
26
|
water_column_sonar_processing/utility/cleaner.py,sha256=bNbs-hopWxtKAFBK0Eu18xdRErZCGZvtla3j-1bTwQw,619
|
|
27
|
-
water_column_sonar_processing/utility/constants.py,sha256=
|
|
27
|
+
water_column_sonar_processing/utility/constants.py,sha256=nAThVjJGpFp8kMdv3I1g6I1hVvOBJBDbGCTEEYewB4o,2181
|
|
28
28
|
water_column_sonar_processing/utility/pipeline_status.py,sha256=O-0SySqdRGJ6bs3zQe1NV9vkOpmsRM7zj5QoHgzYioY,4395
|
|
29
29
|
water_column_sonar_processing/utility/timestamp.py,sha256=bO0oir7KxxoEHPGRkz9FCBfOligkocUyRiWRzAq8fnU,361
|
|
30
|
-
water_column_sonar_processing-25.1.
|
|
31
|
-
water_column_sonar_processing-25.1.
|
|
32
|
-
water_column_sonar_processing-25.1.
|
|
33
|
-
water_column_sonar_processing-25.1.
|
|
34
|
-
water_column_sonar_processing-25.1.
|
|
30
|
+
water_column_sonar_processing-25.1.3.dist-info/LICENSE,sha256=lz4IpJ5_adG3S0ali-WaIpQFVTnEAOucMDQPECUVEYw,1110
|
|
31
|
+
water_column_sonar_processing-25.1.3.dist-info/METADATA,sha256=R0wRzg_ywppwzCzyY1MOyqRtFrPl6lyq1ltldgisbe4,5448
|
|
32
|
+
water_column_sonar_processing-25.1.3.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
33
|
+
water_column_sonar_processing-25.1.3.dist-info/top_level.txt,sha256=aRYU4A7RNBlNrL4vzjytFAir3BNnmOgsvIGKKA36tg4,30
|
|
34
|
+
water_column_sonar_processing-25.1.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|