water-column-sonar-processing 0.0.12__py3-none-any.whl → 0.0.13__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.

@@ -188,10 +188,10 @@ class ResampleRegrid:
188
188
  for file_name in all_file_names:
189
189
  gc.collect()
190
190
  file_name_stem = Path(file_name).stem
191
- # file_name_stem = "D20070724-T151330"
192
191
  print(f"Processing file: {file_name_stem}.")
193
- # if f"{file_name_stem}.raw" not in list(cruise_df['FILE_NAME']):
194
- # raise Exception(f"Raw file file_stem not found in dynamodb.")
192
+
193
+ if f"{file_name_stem}.raw" not in list(cruise_df['FILE_NAME']):
194
+ raise Exception(f"Raw file file_stem not found in dynamodb.")
195
195
 
196
196
  # status = PipelineStatus['LEVEL_1_PROCESSING']
197
197
  # TODO: filter rows by enum success, filter the dataframe just for enums >= LEVEL_1_PROCESSING
@@ -296,6 +296,26 @@ class ResampleRegrid:
296
296
  output_zarr_store.longitude[
297
297
  start_ping_time_index:end_ping_time_index
298
298
  ] = geospatial.dropna()["longitude"].values
299
+
300
+ #########################################################################
301
+ # TODO: add the "detected_seafloor_depth/" to the
302
+ # L2 cruise dataarrays
303
+ # TODO: make bottom optional if 'detected_seafloor_depth' in input_xr.variables:
304
+ # TODO: Only checking the first channel for now. Need to average across all channels
305
+ # in the future. See https://github.com/CI-CMG/water-column-sonar-processing/issues/11
306
+ # detected_seafloor_depths = input_xr.detected_seafloor_depth.values[0, :] # note can include nans?
307
+ detected_seafloor_depth = input_xr.detected_seafloor_depth.values
308
+ detected_seafloor_depth[detected_seafloor_depth == 0.] = np.nan
309
+ detected_seafloor_depths = np.nanmean(detected_seafloor_depth, 0)
310
+ detected_seafloor_depths[detected_seafloor_depths == 0.] = np.nan
311
+ print(f"min depth measured: {np.nanmin(detected_seafloor_depths)}")
312
+ print(f"max depth measured: {np.nanmax(detected_seafloor_depths)}")
313
+ #available_indices = np.argwhere(np.isnan(geospatial['latitude'].values))
314
+ output_zarr_store.bottom[
315
+ start_ping_time_index:end_ping_time_index
316
+ ] = detected_seafloor_depths
317
+ #########################################################################
318
+ #########################################################################
299
319
  except Exception as err:
300
320
  print(f"Problem interpolating the data: {err}")
301
321
  raise err
@@ -246,7 +246,7 @@ class ZarrManager:
246
246
  #
247
247
  root.attrs["processing_software_name"] = Coordinates.PROJECT_NAME.value
248
248
  root.attrs["processing_software_version"] = (
249
- "0.0.12" # TODO: get programmatically, echopype>utils>prov.py
249
+ "0.0.13" # TODO: get programmatically, echopype>utils>prov.py
250
250
  )
251
251
  root.attrs["processing_software_time"] = Timestamp.get_timestamp()
252
252
  #
@@ -288,7 +288,7 @@ class ZarrManager:
288
288
  ):
289
289
  # Mounts a Zarr store using pythons Zarr implementation. The mounted store
290
290
  # will have read/write privileges so that store can be updated.
291
- print("Opening Zarr store with Zarr.")
291
+ print("Opening L2 Zarr store with Zarr for writing.")
292
292
  try:
293
293
  s3fs_manager = S3FSManager(endpoint_url=endpoint_url)
294
294
  root = f"{output_bucket_name}/level_2/{ship_name}/{cruise_name}/{sensor_name}/{cruise_name}.zarr"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: water_column_sonar_processing
3
- Version: 0.0.12
3
+ Version: 0.0.13
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
@@ -131,9 +131,12 @@ https://colab.research.google.com/drive/1KiLMueXiz9WVB9o4RuzYeGjNZ6PsZU7a#scroll
131
131
  3 failed, 38 passed, 3 skipped, 1 warning in 7.24s
132
132
 
133
133
  # Tag a Release
134
+ Step 1 --> increment the semantic version in the zarr_manager.py "metadata" & the "pyproject.toml"
135
+ ```commandline
136
+ git tag "v0.0.13" -a
137
+ ```
138
+ Step 3 --> enter description
134
139
  ```commandline
135
- git tag "v0.0.12" -a
136
- # enter description
137
140
  git push origin --tags
138
141
  ```
139
142
 
@@ -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=1IehrlhMAS5XAl7DLdQI4jIMSY9ZNLiW4YdcBEwYkbc,7679
11
11
  water_column_sonar_processing/cruise/experiment_datatree.py,sha256=K6Uq_36Rygw5oFF8zWavEwb1x8D27lJv5G3j0B59agE,243
12
- water_column_sonar_processing/cruise/resample_regrid.py,sha256=WFWxP083X4VpH9x50Om4nxSEUwTsjKjdejQz3Nh8CLs,12822
12
+ water_column_sonar_processing/cruise/resample_regrid.py,sha256=XpGRs8nWspWuVoXBEV6VNVJSMlr3_IjnKlN1dK6dEA4,14292
13
13
  water_column_sonar_processing/geometry/__init__.py,sha256=_ol5nI8AL30pYXeAh5rtP7YmQggitPC6LA_kuTfPJ0Q,231
14
14
  water_column_sonar_processing/geometry/geometry_manager.py,sha256=nz5T1vCDWHYIfQ853EqKYHDetTul7jRWS3y8Evep8QU,10855
15
15
  water_column_sonar_processing/geometry/geometry_simplification.py,sha256=im1HG9nfYIerQv3w-PUHzphw2B7aGgnsA3Zcdy2oTmA,3016
@@ -17,7 +17,7 @@ water_column_sonar_processing/geometry/pmtile_generation.py,sha256=7Lm08Jr6YaM4n
17
17
  water_column_sonar_processing/index/__init__.py,sha256=izEObsKiOoIJ0kZCFhvaYsBd6Ga71XJxnogjrNInw68,68
18
18
  water_column_sonar_processing/index/index_manager.py,sha256=YS6y_THfGAZpjfBZOj5n8O1aY_BnBYS781eNHfhpip0,11239
19
19
  water_column_sonar_processing/model/__init__.py,sha256=FXaCdbPqxp0ogmZm9NplRirqpgMiYs1iRYgJbFbbX2Y,65
20
- water_column_sonar_processing/model/zarr_manager.py,sha256=ph0sU-aJQM5TkbyyArDHqXLpeiIki_ce6WN_Z7RVxxw,15053
20
+ water_column_sonar_processing/model/zarr_manager.py,sha256=LoL8vOnEl2r_Jhu4l30p6AgfUZg1tW5aBydHx_BZAZg,15068
21
21
  water_column_sonar_processing/processing/__init__.py,sha256=UwdB3BnoUxy4q3k9-ZjBF6KzmCWVDcqbcArTeHgmvGA,118
22
22
  water_column_sonar_processing/processing/cruise_sampler.py,sha256=hadPrnH5nz7_oG_4pND7YbMFH6NMR9d6p3xAXedtKU8,15927
23
23
  water_column_sonar_processing/processing/raw_to_zarr.py,sha256=agbb2A0BWf7D4b5u-mYOBN_VyjRVjOdQM2aeRGBweWw,17617
@@ -26,8 +26,8 @@ water_column_sonar_processing/utility/cleaner.py,sha256=bNbs-hopWxtKAFBK0Eu18xdR
26
26
  water_column_sonar_processing/utility/constants.py,sha256=EbzsorvYKadsPjuutRjQKKByGibhFm0Gw6D-Sp2ZD3I,2143
27
27
  water_column_sonar_processing/utility/pipeline_status.py,sha256=O-0SySqdRGJ6bs3zQe1NV9vkOpmsRM7zj5QoHgzYioY,4395
28
28
  water_column_sonar_processing/utility/timestamp.py,sha256=bO0oir7KxxoEHPGRkz9FCBfOligkocUyRiWRzAq8fnU,361
29
- water_column_sonar_processing-0.0.12.dist-info/LICENSE,sha256=lz4IpJ5_adG3S0ali-WaIpQFVTnEAOucMDQPECUVEYw,1110
30
- water_column_sonar_processing-0.0.12.dist-info/METADATA,sha256=813ibpVKvkucEfCFlJVHeUfKIC8n1_Pt_Di4k6OebrQ,4960
31
- water_column_sonar_processing-0.0.12.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
32
- water_column_sonar_processing-0.0.12.dist-info/top_level.txt,sha256=aRYU4A7RNBlNrL4vzjytFAir3BNnmOgsvIGKKA36tg4,30
33
- water_column_sonar_processing-0.0.12.dist-info/RECORD,,
29
+ water_column_sonar_processing-0.0.13.dist-info/LICENSE,sha256=lz4IpJ5_adG3S0ali-WaIpQFVTnEAOucMDQPECUVEYw,1110
30
+ water_column_sonar_processing-0.0.13.dist-info/METADATA,sha256=MUkVn5e1wkAFUAYpk25V02yNCeYNmwBsyib788i2ibg,5087
31
+ water_column_sonar_processing-0.0.13.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
32
+ water_column_sonar_processing-0.0.13.dist-info/top_level.txt,sha256=aRYU4A7RNBlNrL4vzjytFAir3BNnmOgsvIGKKA36tg4,30
33
+ water_column_sonar_processing-0.0.13.dist-info/RECORD,,