pyadps 0.1.2__tar.gz → 0.1.3__tar.gz

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.
Files changed (33) hide show
  1. {pyadps-0.1.2 → pyadps-0.1.3}/PKG-INFO +1 -1
  2. {pyadps-0.1.2 → pyadps-0.1.3}/pyproject.toml +1 -1
  3. {pyadps-0.1.2 → pyadps-0.1.3}/src/pyadps/pages/03_Download_Raw_File.py +19 -21
  4. {pyadps-0.1.2 → pyadps-0.1.3}/src/pyadps/pages/05_QC_Test.py +20 -3
  5. {pyadps-0.1.2 → pyadps-0.1.3}/src/pyadps/pages/08_Write_File.py +3 -1
  6. {pyadps-0.1.2 → pyadps-0.1.3}/src/pyadps/utils/autoprocess.py +10 -5
  7. pyadps-0.1.3/src/pyadps/utils/metadata/flmeta.json +422 -0
  8. {pyadps-0.1.2 → pyadps-0.1.3}/src/pyadps/utils/plotgen.py +1 -1
  9. {pyadps-0.1.2 → pyadps-0.1.3}/src/pyadps/utils/pyreadrdi.py +112 -83
  10. {pyadps-0.1.2 → pyadps-0.1.3}/src/pyadps/utils/readrdi.py +34 -3
  11. {pyadps-0.1.2 → pyadps-0.1.3}/src/pyadps/utils/signal_quality.py +16 -4
  12. {pyadps-0.1.2 → pyadps-0.1.3}/src/pyadps/utils/writenc.py +101 -52
  13. pyadps-0.1.2/src/pyadps/utils/metadata/flmeta.json +0 -422
  14. {pyadps-0.1.2 → pyadps-0.1.3}/LICENSE +0 -0
  15. {pyadps-0.1.2 → pyadps-0.1.3}/README.md +0 -0
  16. {pyadps-0.1.2 → pyadps-0.1.3}/src/pyadps/Home_Page.py +0 -0
  17. {pyadps-0.1.2 → pyadps-0.1.3}/src/pyadps/__init__.py +0 -0
  18. {pyadps-0.1.2 → pyadps-0.1.3}/src/pyadps/__main__.py +0 -0
  19. {pyadps-0.1.2 → pyadps-0.1.3}/src/pyadps/pages/01_Read_File.py +0 -0
  20. {pyadps-0.1.2 → pyadps-0.1.3}/src/pyadps/pages/02_View_Raw_Data.py +0 -0
  21. {pyadps-0.1.2 → pyadps-0.1.3}/src/pyadps/pages/04_Sensor_Health.py +0 -0
  22. {pyadps-0.1.2 → pyadps-0.1.3}/src/pyadps/pages/06_Profile_Test.py +0 -0
  23. {pyadps-0.1.2 → pyadps-0.1.3}/src/pyadps/pages/07_Velocity_Test.py +0 -0
  24. {pyadps-0.1.2 → pyadps-0.1.3}/src/pyadps/pages/09_Auto_process.py +0 -0
  25. {pyadps-0.1.2 → pyadps-0.1.3}/src/pyadps/pages/__init__.py +0 -0
  26. {pyadps-0.1.2 → pyadps-0.1.3}/src/pyadps/utils/__init__.py +0 -0
  27. {pyadps-0.1.2 → pyadps-0.1.3}/src/pyadps/utils/metadata/config.ini +0 -0
  28. {pyadps-0.1.2 → pyadps-0.1.3}/src/pyadps/utils/metadata/demo.000 +0 -0
  29. {pyadps-0.1.2 → pyadps-0.1.3}/src/pyadps/utils/metadata/vlmeta.json +0 -0
  30. {pyadps-0.1.2 → pyadps-0.1.3}/src/pyadps/utils/profile_test.py +0 -0
  31. {pyadps-0.1.2 → pyadps-0.1.3}/src/pyadps/utils/script.py +0 -0
  32. {pyadps-0.1.2 → pyadps-0.1.3}/src/pyadps/utils/sensor_health.py +0 -0
  33. {pyadps-0.1.2 → pyadps-0.1.3}/src/pyadps/utils/velocity_test.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: pyadps
3
- Version: 0.1.2
3
+ Version: 0.1.3
4
4
  Summary: A Python package for ADCP data processing
5
5
  Home-page: https://pyadps.readthedocs.io/en/latest/index.html
6
6
  License: MIT
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "pyadps"
3
- version = "0.1.2"
3
+ version = "0.1.3"
4
4
  description = "A Python package for ADCP data processing"
5
5
  authors = ["P. Amol <prakashamol@gmail.com>"]
6
6
  readme = "README.md"
@@ -34,7 +34,7 @@ if "add_attributes_DRW" not in st.session_state:
34
34
 
35
35
  if "file_prefix" not in st.session_state:
36
36
  raw_basename = os.path.basename(st.session_state.fname)
37
- st.session_state.filename = os.path.splitext(raw_basename)[0]
37
+ st.session_state.filename = os.path.splitext(raw_basename)[0]
38
38
  st.session_state.file_prefix = st.session_state.filename
39
39
 
40
40
 
@@ -45,7 +45,6 @@ if "filename" not in st.session_state:
45
45
  st.session_state.filename = "" # <-- Default file name if not passed
46
46
 
47
47
 
48
-
49
48
  ################ Functions #######################
50
49
  @st.cache_data()
51
50
  def file_access(uploaded_file):
@@ -63,6 +62,7 @@ def read_file(filepath):
63
62
  ds.fixensemble()
64
63
  st.session_state.ds = ds
65
64
 
65
+
66
66
  @st.cache_data
67
67
  def get_prefixed_filename(base_name):
68
68
  """Generates the file name with the optional prefix."""
@@ -74,57 +74,55 @@ def get_prefixed_filename(base_name):
74
74
  @st.cache_data
75
75
  def file_write(path, axis_option, add_attributes=True):
76
76
  tempdirname = tempfile.TemporaryDirectory(delete=False)
77
- st.session_state.rawfilename = os.path.join(tempdirname.name, get_prefixed_filename("RAW_DAT.nc"))
77
+ st.session_state.rawfilename = os.path.join(
78
+ tempdirname.name, get_prefixed_filename("RAW_DAT.nc")
79
+ )
78
80
 
79
81
  if add_attributes:
80
82
  wr.rawnc(
81
83
  path,
82
84
  st.session_state.rawfilename,
83
- st.session_state.date1,
84
- axis_option,
85
+ axis_option=axis_option,
85
86
  attributes=st.session_state.attributes,
86
87
  )
87
88
  else:
88
- wr.rawnc(
89
- path, st.session_state.rawfilename, st.session_state.date1, axis_option
90
- )
89
+ wr.rawnc(path, st.session_state.rawfilename, axis_option)
90
+
91
91
 
92
92
  @st.cache_data
93
93
  def file_write_flead(path, axis_option, add_attributes=True):
94
94
  tempvardirname = tempfile.TemporaryDirectory(delete=False)
95
- st.session_state.fleadfilename = os.path.join(tempvardirname.name, get_prefixed_filename("RAW_FIX.nc"))
95
+ st.session_state.fleadfilename = os.path.join(
96
+ tempvardirname.name, get_prefixed_filename("RAW_FIX.nc")
97
+ )
96
98
 
97
99
  if add_attributes:
98
100
  wr.flead_nc(
99
101
  path,
100
102
  st.session_state.fleadfilename,
101
- st.session_state.date2,
102
- axis_option,
103
+ axis_option=axis_option,
103
104
  attributes=st.session_state.attributes,
104
105
  )
105
106
  else:
106
- wr.flead_nc(
107
- path, st.session_state.fleadfilename, st.session_state.date2, axis_option
108
- )
107
+ wr.flead_nc(path, st.session_state.fleadfilename, axis_option)
108
+
109
109
 
110
110
  @st.cache_data
111
111
  def file_write_vlead(path, axis_option, add_attributes=True):
112
112
  tempvardirname = tempfile.TemporaryDirectory(delete=False)
113
- st.session_state.vleadfilename = os.path.join(tempvardirname.name, get_prefixed_filename("RAW_VAR.nc"))
113
+ st.session_state.vleadfilename = os.path.join(
114
+ tempvardirname.name, get_prefixed_filename("RAW_VAR.nc")
115
+ )
114
116
 
115
117
  if add_attributes:
116
118
  wr.vlead_nc(
117
119
  path,
118
120
  st.session_state.vleadfilename,
119
- st.session_state.date3,
120
- axis_option,
121
+ axis_option=axis_option,
121
122
  attributes=st.session_state.attributes,
122
123
  )
123
124
  else:
124
- wr.vlead_nc(
125
- path, st.session_state.vleadfilename, st.session_state.date3, axis_option
126
- )
127
-
125
+ wr.vlead_nc(path, st.session_state.vleadfilename, axis_option)
128
126
 
129
127
 
130
128
  if "axis_option" not in st.session_state:
@@ -92,11 +92,12 @@ def qc_submit():
92
92
  evt = st.session_state.evt_QCT
93
93
  ft = st.session_state.ft_QCT
94
94
  is3beam = st.session_state.is3beam_QCT
95
+ beam_ignore = st.session_state.beam_to_ignore
95
96
  mask = pg_check(ds, mask, pgt, threebeam=is3beam)
96
- mask = correlation_check(ds, mask, ct)
97
- mask = echo_check(ds, mask, et)
97
+ mask = correlation_check(ds, mask, ct,is3beam,beam_ignore=beam_ignore)
98
+ mask = echo_check(ds, mask, et,is3beam,beam_ignore=beam_ignore)
98
99
  mask = ev_check(ds, mask, evt)
99
- mask = false_target(ds, mask, ft, threebeam=True)
100
+ mask = false_target(ds, mask, ft, threebeam=is3beam, beam_ignore=beam_ignore)
100
101
  # Store the processed mask in a temporary mask
101
102
  st.session_state.qc_mask_temp = mask
102
103
 
@@ -337,6 +338,22 @@ with tab2:
337
338
  "Would you like to use a three-beam solution?", (True, False)
338
339
  )
339
340
 
341
+ if st.session_state.is3beam_QCT:
342
+ beam_label_to_value = {
343
+ "None": None,
344
+ "Beam 1": 0,
345
+ "Beam 2": 1,
346
+ "Beam 3": 2,
347
+ "Beam 4": 3
348
+ }
349
+
350
+ selected_beam = st.selectbox(
351
+ "Select Beam to Ignore",
352
+ options=list(beam_label_to_value.keys()),
353
+ index=0 # Default is "None"
354
+ )
355
+ st.session_state.beam_to_ignore = beam_label_to_value[selected_beam]
356
+
340
357
  st.session_state.pgt_QCT = st.number_input(
341
358
  "Select Percent Good Threshold",
342
359
  0,
@@ -1,6 +1,6 @@
1
1
  import configparser
2
2
  import tempfile
3
-
3
+ import os
4
4
  import numpy as np
5
5
  import pandas as pd
6
6
  import plotly.graph_objects as go
@@ -506,6 +506,8 @@ if generate_config_radio == "Yes":
506
506
  config["QCTest"]["error_velocity"] = str(st.session_state.evt_QCT)
507
507
  config["QCTest"]["false_target"] = str(st.session_state.ft_QCT)
508
508
  config["QCTest"]["three_beam"] = str(st.session_state.is3beam_QCT)
509
+ if st.session_state.is3beam_QCT:
510
+ config["QCTest"]["beam_ignore"] = str(st.session_state.beam_to_ignore)
509
511
  config["QCTest"]["percent_good"] = str(st.session_state.pgt_QCT)
510
512
 
511
513
  # Tab 4
@@ -192,15 +192,20 @@ def autoprocess(config_file, binary_file_path=None):
192
192
  evt = config.getint("QCTest", "error_velocity")
193
193
  et = config.getint("QCTest", "echo_intensity")
194
194
  ft = config.getint("QCTest", "false_target")
195
- is3Beam = config.getboolean("QCTest", "three_beam")
195
+ is3beam = config.getboolean("QCTest", "three_beam")
196
+ if is3beam != None:
197
+ is3beam = int(is3beam)
198
+ beam_ignore = config.get("QCTest","beam_ignore")
196
199
  pgt = config.getint("QCTest", "percent_good")
197
200
  orientation = config.get("QCTest", "orientation")
201
+ beam_ignore = config.getboolean("QCTest",)
198
202
 
199
- mask = pg_check(ds, mask, pgt, threebeam=is3Beam)
200
- mask = correlation_check(ds, mask, ct)
201
- mask = echo_check(ds, mask, et)
203
+ mask = pg_check(ds, mask, pgt, threebeam=is3beam)
204
+ mask = correlation_check(ds, mask, ct,is3beam,beam_ignore=beam_ignore)
205
+ mask = echo_check(ds, mask, et,is3beam,beam_ignore=beam_ignore)
202
206
  mask = ev_check(ds, mask, evt)
203
- mask = false_target(ds, mask, ft, threebeam=True)
207
+ mask = false_target(ds, mask, ft, threebeam=is3beam, beam_ignore=beam_ignore)
208
+
204
209
 
205
210
  print("QC Check Complete.")
206
211
 
@@ -0,0 +1,422 @@
1
+ {
2
+ "cpu_version": {
3
+ "index": 1,
4
+ "unit": "",
5
+ "scale": 1,
6
+ "byte": 1,
7
+ "type": "uint8",
8
+ "command": "",
9
+ "valid_min": "",
10
+ "valid_max": "",
11
+ "long_name": "CPU Firmware Version Number",
12
+ "description": "Contains the version number of the CPU firmware."
13
+ },
14
+ "cpu_revision": {
15
+ "index": 2,
16
+ "unit": "",
17
+ "scale": 1,
18
+ "byte": 1,
19
+ "type": "uint8",
20
+ "command": "",
21
+ "valid_min": "",
22
+ "valid_max": "",
23
+ "long_name": "CPU Firmware Revision Number",
24
+ "description": "Contains the revision number of the CPU firmware."
25
+ },
26
+ "system_config_code": {
27
+ "index": 3,
28
+ "unit": "",
29
+ "scale": 1,
30
+ "byte": 2,
31
+ "type": "uint16",
32
+ "command": "",
33
+ "valid_min": "",
34
+ "valid_max": "",
35
+ "long_name": "System Configuration Code",
36
+ "description": "This field defines the WorkHorse ADCP hardware configuration. Check RDI manual for details."
37
+ },
38
+ "real_flag": {
39
+ "index": 4,
40
+ "unit": "",
41
+ "scale": 1,
42
+ "byte": 1,
43
+ "type": "uint8",
44
+ "command": "PD",
45
+ "valid_min": "",
46
+ "valid_max": "",
47
+ "long_name": "Real/Sim Flag",
48
+ "description": "This field is set by default as real data (0)."
49
+ },
50
+ "lag_length": {
51
+ "index": 5,
52
+ "unit": "",
53
+ "scale": 1,
54
+ "byte": 1,
55
+ "type": "uint8",
56
+ "command": "",
57
+ "valid_min": "",
58
+ "valid_max": "",
59
+ "long_name": "Lag Length",
60
+ "description": "The lag length is the time period between sound pulses. This is varied, and therefore of interest in, at a minimum, for the WM5, WM8 and WM11 and BM7 commands."
61
+ },
62
+ "beams": {
63
+ "index": 6,
64
+ "unit": "",
65
+ "scale": 1,
66
+ "byte": 1,
67
+ "type": "uint8",
68
+ "command": "",
69
+ "valid_min": "",
70
+ "valid_max": "",
71
+ "long_name": "Number of Beams",
72
+ "description": "Contains the number of beams used to calculate velocity data (not physical beams). The WorkHorse ADCP needs only three beams to calculate water-current velocities. The fourth beam provides an error velocity that determines data validity. If only three beams are available, the WorkHorse ADCP does not make this validity check."
73
+ },
74
+ "cells": {
75
+ "index": 7,
76
+ "unit": "",
77
+ "scale": 1,
78
+ "byte": 2,
79
+ "type": "uint16",
80
+ "command": "WN",
81
+ "valid_min": "1",
82
+ "valid_max": "255",
83
+ "long_name": "Number of Cells",
84
+ "description": "Contains the number of depth cells over which the WorkHorse ADCP collects data"
85
+ },
86
+ "pings": {
87
+ "index": 8,
88
+ "unit": "",
89
+ "scale": 1,
90
+ "byte": 2,
91
+ "type": "uint16",
92
+ "command": "WP",
93
+ "valid_min": "0",
94
+ "valid_max": "16384",
95
+ "long_name": "Pings Per Ensemble",
96
+ "description": "Contains the number of pings averaged together during a data ensemble (WP command). If WP = 0, the WorkHorse ADCP does not collect the WD water-profile data "
97
+ },
98
+ "depth_cell_len": {
99
+ "index": 9,
100
+ "unit": "cm",
101
+ "scale": 1,
102
+ "byte": 2,
103
+ "type": "uint16",
104
+ "command": "WS",
105
+ "valid_min": "1",
106
+ "valid_max": "6400",
107
+ "long_name": "Depth Cell Length",
108
+ "description": "Contains the length of one depth cell"
109
+ },
110
+ "blank_transmit": {
111
+ "index": 10,
112
+ "unit": "cm",
113
+ "scale": 1,
114
+ "byte": 2,
115
+ "type": "uint16",
116
+ "command": "WF",
117
+ "valid_min": "0",
118
+ "valid_max": "9999",
119
+ "long_name": "Blank After Transmit",
120
+ "description": "Contains the blanking distance used by the WorkHorse ADCP to allow the transmit circuits time to recover before the receive cycle begins (WF command)."
121
+ },
122
+ "signal_mode": {
123
+ "index": 11,
124
+ "unit": "",
125
+ "scale": 1,
126
+ "byte": 1,
127
+ "type": "uint8",
128
+ "command": "",
129
+ "valid_min": "",
130
+ "valid_max": "",
131
+ "long_name": "Signal Processing Mode",
132
+ "description": "Contains the Signal Processing Mode. This field will always be set to 1."
133
+ },
134
+ "correlation_thresh": {
135
+ "index": 12,
136
+ "unit": "",
137
+ "scale": 1,
138
+ "byte": 1,
139
+ "type": "uint8",
140
+ "command": "WC",
141
+ "valid_min": "0",
142
+ "valid_max": "255",
143
+ "long_name": "Low Correlation Threshold",
144
+ "description": "Contains the minimum threshold of correlation that water-profile data can have to be considered good data (WC command)"
145
+ },
146
+ "code_reps": {
147
+ "index": 13,
148
+ "unit": "",
149
+ "scale": 1,
150
+ "byte": 1,
151
+ "type": "uint8",
152
+ "command": "",
153
+ "valid_min": "0",
154
+ "valid_max": "255",
155
+ "long_name": "Number of Code Repetitions",
156
+ "description": "Contains the number of code repetitions in the transmit pulse."
157
+ },
158
+ "percent_good_min": {
159
+ "index": 14,
160
+ "unit": "%",
161
+ "scale": 1,
162
+ "byte": 1,
163
+ "type": "int8",
164
+ "command": "WG",
165
+ "valid_min": "1",
166
+ "valid_max": "100",
167
+ "long_name": "Percentage Good Minimum",
168
+ "description": "Contains the minimum percentage of water-profiling pings in an ensemble that must be considered good to output velocity data."
169
+ },
170
+ "error_velocity_thresh": {
171
+ "index": 15,
172
+ "unit": "mm/s",
173
+ "scale": 1,
174
+ "byte": 2,
175
+ "type": "int16",
176
+ "command": "WE",
177
+ "valid_min": "0",
178
+ "valid_max": "5000",
179
+ "long_name": "Error Velocity Threshold",
180
+ "description": "This field, initially set by the WE command, contains the actual threshold value used to flag water-current data as good or bad. If the error velocity value exceeds this threshold, the WorkHorse ADCP flags all four beams of the affected bin as bad."
181
+ },
182
+ "tp_minute": {
183
+ "index": 16,
184
+ "unit": "",
185
+ "scale": 1,
186
+ "byte": 1,
187
+ "type": "uint8",
188
+ "command": "",
189
+ "valid_min": "",
190
+ "valid_max": "",
191
+ "long_name": "Minutes Between Ping Groups",
192
+ "description": "These fields, set by the TP command, contain the amount of time between ping groups in the ensemble. NOTE: The WorkHorse ADCP automatically extends the ensemble interval (set by TE) if (WP x TP > TE)."
193
+ },
194
+ "tp_second": {
195
+ "index": 17,
196
+ "unit": "",
197
+ "scale": 1,
198
+ "byte": 1,
199
+ "type": "uint8",
200
+ "command": "",
201
+ "valid_min": "",
202
+ "valid_max": "",
203
+ "long_name": "Seconds Between Ping Groups",
204
+ "description": "These fields, set by the TP command, contain the amount of time between ping groups in the ensemble. NOTE: The WorkHorse ADCP automatically extends the ensemble interval (set by TE) if (WP x TP > TE)."
205
+ },
206
+ "tp_hundredth": {
207
+ "index": 18,
208
+ "unit": "",
209
+ "scale": 1,
210
+ "byte": 1,
211
+ "type": "uint8",
212
+ "command": "",
213
+ "valid_min": "",
214
+ "valid_max": "",
215
+ "long_name": "Hundredth Between Ping Groups",
216
+ "description": "Contains the minute portion of the WorkHorse ADCP’s elapsed time measurement of the amount of time needed to complete the pinging of the current ensemble."
217
+ },
218
+ "coord_transform_code": {
219
+ "index": 19,
220
+ "unit": "",
221
+ "scale": "",
222
+ "byte": 1,
223
+ "type": "uint8",
224
+ "command": "EX",
225
+ "valid_min": "",
226
+ "valid_max": "",
227
+ "long_name": "Coordinate Trasnformation Code",
228
+ "description": "Contains the coordinate transformation processing parameters (EX command). These firmware switches indicate how the WorkHorse ADCP collected data."
229
+ },
230
+ "head_alignment": {
231
+ "index": 20,
232
+ "unit": "degrees",
233
+ "scale": 0.01,
234
+ "byte": 2,
235
+ "type": "uint16",
236
+ "command": "EA",
237
+ "valid_min": "-179.99",
238
+ "valid_max": "180.00",
239
+ "long_name": "Head Alignment",
240
+ "description": "Contains a correction factor for physical heading misalignment."
241
+ },
242
+ "head_bias": {
243
+ "index": 21,
244
+ "unit": "degrees",
245
+ "scale": 0.01,
246
+ "byte": 2,
247
+ "type": "uint16",
248
+ "command": "EB",
249
+ "valid_min": "-179.99",
250
+ "valid_max": "180.00",
251
+ "long_name": "Head Bias",
252
+ "description": "Contains a correction factor for electrical/magnetic heading bias."
253
+ },
254
+ "sensor_source_code": {
255
+ "index": 22,
256
+ "unit": "",
257
+ "scale": "",
258
+ "byte": 1,
259
+ "type": "uint8",
260
+ "command": "EZ",
261
+ "valid_min": "",
262
+ "valid_max": "",
263
+ "long_name": "Sensor Source Code",
264
+ "description": "Contains the selected source of environmental sensor data (EZ command). These firmware switches indicate the following."
265
+ },
266
+ "sensor_avail_code": {
267
+ "index": 23,
268
+ "unit": "",
269
+ "scale": "",
270
+ "byte": 1,
271
+ "type": "uint8",
272
+ "command": "",
273
+ "valid_min": "",
274
+ "valid_max": "",
275
+ "long_name": "Sensor Available Code",
276
+ "description": "This field reflects which sensors are available"
277
+ },
278
+ "bin_1_dist": {
279
+ "index": 24,
280
+ "unit": "cm",
281
+ "scale": 1,
282
+ "byte": 2,
283
+ "type": "uint16",
284
+ "command": "",
285
+ "valid_min": "0",
286
+ "valid_max": "65535",
287
+ "long_name": "Bin 1 Distance",
288
+ "description": "This field contains the distance to the middle of the first depth cell (bin). This distance is a function of depth cell length (WS), the profiling mode (WM), the blank after transmit distance (WF), and speed of sound."
289
+ },
290
+ "xmit_pulse_len": {
291
+ "index": 25,
292
+ "unit": "cm",
293
+ "scale": 1,
294
+ "byte": 2,
295
+ "type": "uint16",
296
+ "command": "WT",
297
+ "valid_min": "0",
298
+ "valid_max": "65535",
299
+ "long_name": "Transmit Pulse Length",
300
+ "description": "This field, set by the WT command, contains the length of the transmit pulse. When the WorkHorse ADCP receives a <BREAK> signal, it sets the transmit pulse length as close as possible to the depth cell length (WS command). This means the WorkHorse ADCP uses a WT command of zero. However, the WT field contains the actual length of the transmit pulse used."
301
+ },
302
+ "ref_layer_avg": {
303
+ "index": 26,
304
+ "unit": "",
305
+ "scale": 1,
306
+ "byte": 2,
307
+ "type": "uint16",
308
+ "command": "WL",
309
+ "valid_min": "1",
310
+ "valid_max": "128",
311
+ "long_name": "Reference Layer Average",
312
+ "description": "Contains the starting depth cell (LSB, byte 37) and the ending depth cell (MSB, byte 38) used for water reference layer averaging (WL command)."
313
+ },
314
+ "false_target_thresh": {
315
+ "index": 27,
316
+ "unit": "count",
317
+ "scale": 1,
318
+ "byte": 1,
319
+ "type": "uint8",
320
+ "command": "",
321
+ "valid_min": "0",
322
+ "valid_max": "255",
323
+ "long_name": "False Target Threshold",
324
+ "description": "Contains the threshold value used to reject data received from a false target, usually fish."
325
+ },
326
+ "spare_1": {
327
+ "index": 28,
328
+ "unit": "",
329
+ "scale": 1,
330
+ "byte": 1,
331
+ "type": "uint8",
332
+ "command": "CX",
333
+ "valid_min": "0",
334
+ "valid_max": "5",
335
+ "long_name": "Spare",
336
+ "description": "Contains the CX command setting. Range = 0 to 5"
337
+ },
338
+ "transmit_lag_dist": {
339
+ "index": 29,
340
+ "unit": "cm",
341
+ "scale": 1,
342
+ "byte": 2,
343
+ "type": "uint16",
344
+ "command": "WM",
345
+ "valid_min": "0",
346
+ "valid_max": "65535",
347
+ "long_name": "ADC Channel 4",
348
+ "description": "These fields contain the outputs of the Analog-to-Digital Converter (ADC) located on the DSP board. The ADC sequentially samples one of the eight channels per ping group (the number of ping groups per ensemble is the maximum of the WP). These fields are zeroed at the beginning of the deployment and updated each ensemble at the rate of one channel per ping group."
349
+ },
350
+ "cpu_serial_no": {
351
+ "index": 30,
352
+ "unit": "",
353
+ "scale": 1,
354
+ "byte": 8,
355
+ "type": "uint64",
356
+ "command": "",
357
+ "valid_min": "",
358
+ "valid_max": "",
359
+ "long_name": "CPU Board Serial Number",
360
+ "description": "Contains the serial number of the CPU board. The CPU Board Serial number is stored in Big Endian (MSB sent first)."
361
+ },
362
+ "system_bandwidth": {
363
+ "index": 31,
364
+ "unit": "",
365
+ "scale": 1,
366
+ "byte": 2,
367
+ "type": "uint16",
368
+ "command": "WB",
369
+ "valid_min": "0",
370
+ "valid_max": "1",
371
+ "long_name": "System Bandwidth",
372
+ "description": "Contains the WB command setting. Range = 0 to 1"
373
+ },
374
+ "system_power": {
375
+ "index": 32,
376
+ "unit": "",
377
+ "scale": 1,
378
+ "byte": 1,
379
+ "type": "uint8",
380
+ "command": "CQ",
381
+ "valid_min": "0",
382
+ "valid_max": "255",
383
+ "long_name": "System Power",
384
+ "description": "Contains the CQ command setting for WorkHorse ADCP Monitor/Sentinel/Long Ranger ADCPs. Range 0 to 255."
385
+ },
386
+ "spare_2": {
387
+ "index": 33,
388
+ "unit": "",
389
+ "scale": 1,
390
+ "byte": 1,
391
+ "type": "uint8",
392
+ "command": "",
393
+ "valid_min": "",
394
+ "valid_max": "",
395
+ "long_name": "Spare",
396
+ "description": "Spare"
397
+ },
398
+ "instrument_no": {
399
+ "index": 34,
400
+ "unit": "",
401
+ "scale": "",
402
+ "byte": 4,
403
+ "type": "uint32",
404
+ "command": "CY",
405
+ "valid_min": "",
406
+ "valid_max": "",
407
+ "long_name": "Instrument Serial Number",
408
+ "description": "Contains the instrument serial number."
409
+ },
410
+ "beam_angle": {
411
+ "index": 35,
412
+ "unit": "degrees",
413
+ "scale": "",
414
+ "byte": "",
415
+ "type": "uint8",
416
+ "command": "CY",
417
+ "valid_min": "",
418
+ "valid_max": "",
419
+ "long_name": "Beam Angle",
420
+ "description": "Beam Angle"
421
+ }
422
+ }
@@ -4,7 +4,7 @@ import matplotlib.pyplot as plt
4
4
  from matplotlib.widgets import Button, RadioButtons, Slider, TextBox
5
5
  from matplotlib.widgets import RectangleSelector
6
6
 
7
- mpl.use("TkAgg")
7
+ # mpl.use("TkAgg")
8
8
 
9
9
 
10
10
  class CutBins: