pyadps 0.1.0b0__py3-none-any.whl → 0.1.1__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.
- pyadps/Home_Page.py +11 -5
- pyadps/pages/01_Read_File.py +191 -16
- pyadps/pages/02_View_Raw_Data.py +69 -33
- pyadps/pages/03_Download_Raw_File.py +161 -60
- pyadps/pages/04_Sensor_Health.py +905 -0
- pyadps/pages/05_QC_Test.py +476 -0
- pyadps/pages/06_Profile_Test.py +971 -0
- pyadps/pages/07_Velocity_Test.py +600 -0
- pyadps/pages/08_Write_File.py +587 -0
- pyadps/pages/09_Auto_process.py +64 -0
- pyadps/pages/__pycache__/__init__.cpython-312.pyc +0 -0
- pyadps/utils/__init__.py +3 -3
- pyadps/utils/__pycache__/__init__.cpython-312.pyc +0 -0
- pyadps/utils/__pycache__/autoprocess.cpython-312.pyc +0 -0
- pyadps/utils/__pycache__/cutbin.cpython-312.pyc +0 -0
- pyadps/utils/__pycache__/plotgen.cpython-312.pyc +0 -0
- pyadps/utils/__pycache__/profile_test.cpython-312.pyc +0 -0
- pyadps/utils/__pycache__/pyreadrdi.cpython-312.pyc +0 -0
- pyadps/utils/__pycache__/readrdi.cpython-312.pyc +0 -0
- pyadps/utils/__pycache__/regrid.cpython-312.pyc +0 -0
- pyadps/utils/__pycache__/script.cpython-312.pyc +0 -0
- pyadps/utils/__pycache__/sensor_health.cpython-312.pyc +0 -0
- pyadps/utils/__pycache__/signal_quality.cpython-312.pyc +0 -0
- pyadps/utils/__pycache__/velocity_test.cpython-312.pyc +0 -0
- pyadps/utils/__pycache__/writenc.cpython-312.pyc +0 -0
- pyadps/utils/autoprocess.py +548 -0
- pyadps/utils/metadata/config.ini +99 -0
- pyadps/utils/metadata/demo.000 +0 -0
- pyadps/utils/plotgen.py +505 -3
- pyadps/utils/profile_test.py +526 -145
- pyadps/utils/pyreadrdi.py +27 -17
- pyadps/utils/readrdi.py +167 -20
- pyadps/utils/script.py +197 -147
- pyadps/utils/sensor_health.py +120 -0
- pyadps/utils/signal_quality.py +344 -24
- pyadps/utils/velocity_test.py +103 -20
- pyadps/utils/writenc.py +223 -27
- {pyadps-0.1.0b0.dist-info → pyadps-0.1.1.dist-info}/METADATA +56 -24
- pyadps-0.1.1.dist-info/RECORD +47 -0
- {pyadps-0.1.0b0.dist-info → pyadps-0.1.1.dist-info}/WHEEL +1 -1
- pyadps-0.1.1.dist-info/entry_points.txt +5 -0
- pyadps/pages/04_QC_Test.py +0 -283
- pyadps/pages/05_Profile_Test.py +0 -389
- pyadps/pages/06_Velocity_Test.py +0 -293
- pyadps/pages/07_Write_File.py +0 -367
- pyadps/utils/cutbin.py +0 -413
- pyadps/utils/regrid.py +0 -122
- pyadps-0.1.0b0.dist-info/RECORD +0 -29
- pyadps-0.1.0b0.dist-info/entry_points.txt +0 -3
- {pyadps-0.1.0b0.dist-info → pyadps-0.1.1.dist-info}/LICENSE +0 -0
pyadps/utils/writenc.py
CHANGED
@@ -17,7 +17,6 @@ from netCDF4 import date2num
|
|
17
17
|
from pyadps.utils import readrdi as rd
|
18
18
|
|
19
19
|
|
20
|
-
|
21
20
|
def pd2nctime(time, t0="hours since 2000-01-01"):
|
22
21
|
"""
|
23
22
|
Function to convert pandas datetime format to netcdf datetime format.
|
@@ -68,9 +67,16 @@ def flead_ncatt(fl_obj, ncfile_id, ens=0):
|
|
68
67
|
setattr(ncfile_id, format_key, format(value))
|
69
68
|
|
70
69
|
|
71
|
-
def
|
70
|
+
def rawnc(
|
71
|
+
infile,
|
72
|
+
outfile,
|
73
|
+
time,
|
74
|
+
axis_option=None,
|
75
|
+
attributes=None,
|
76
|
+
t0="hours since 2000-01-01",
|
77
|
+
):
|
72
78
|
"""
|
73
|
-
|
79
|
+
rawnc is a function to create netcdf file. Stores 3-D data types like
|
74
80
|
velocity, echo, correlation, and percent good.
|
75
81
|
|
76
82
|
Args:
|
@@ -90,14 +96,33 @@ def main(infile, outfile, attributes=None):
|
|
90
96
|
beam_list = flead.fleader["Beams"]
|
91
97
|
|
92
98
|
# Dimensions
|
93
|
-
|
99
|
+
# Define the primary axis based on axis_option
|
100
|
+
if axis_option == "ensemble":
|
101
|
+
outnc.createDimension("ensemble", None)
|
102
|
+
primary_axis = "ensemble"
|
103
|
+
ensemble = outnc.createVariable("ensemble", "i4", ("ensemble",))
|
104
|
+
ensemble.axis = "T"
|
105
|
+
elif axis_option == "time":
|
106
|
+
tsize = len(time)
|
107
|
+
outnc.createDimension("time", tsize)
|
108
|
+
primary_axis = "time"
|
109
|
+
time_var = outnc.createVariable("time", "i4", ("time",))
|
110
|
+
time_var.axis = "T"
|
111
|
+
time_var.units = t0
|
112
|
+
time_var.long_name = "time"
|
113
|
+
|
114
|
+
# Convert time_data to numerical format
|
115
|
+
nctime = pd2nctime(time, t0)
|
116
|
+
time_var[:] = nctime
|
117
|
+
|
118
|
+
else:
|
119
|
+
raise ValueError(f"Invalid axis_option: {axis_option}.")
|
120
|
+
|
94
121
|
outnc.createDimension("cell", max(cell_list))
|
95
122
|
outnc.createDimension("beam", max(beam_list))
|
96
123
|
|
97
124
|
# Variables
|
98
125
|
# Dimension Variables
|
99
|
-
ensemble = outnc.createVariable("ensemble", "u4", ("ensemble",))
|
100
|
-
ensemble.axis = "T"
|
101
126
|
cell = outnc.createVariable("cell", "i2", ("cell",))
|
102
127
|
cell.axis = "Z"
|
103
128
|
beam = outnc.createVariable("beam", "i2", ("beam",))
|
@@ -118,9 +143,9 @@ def main(infile, outfile, attributes=None):
|
|
118
143
|
for i, item in enumerate(varlist):
|
119
144
|
if item == "Velocity":
|
120
145
|
varid[i] = outnc.createVariable(
|
121
|
-
item, "i2", (
|
146
|
+
item, "i2", (primary_axis, "cell", "beam"), fill_value=-32768
|
122
147
|
)
|
123
|
-
varid[i].missing_value = -32768
|
148
|
+
# varid[i].missing_value = -32768
|
124
149
|
vel = getattr(rd, item)
|
125
150
|
var = vel(infile).data
|
126
151
|
# var = rd.variables(infile, item)
|
@@ -129,7 +154,7 @@ def main(infile, outfile, attributes=None):
|
|
129
154
|
# Unsigned integers might be assigned for future netcdf versions
|
130
155
|
format_item = item.replace(" ", "") # For percent good
|
131
156
|
varid[i] = outnc.createVariable(
|
132
|
-
format_item, "i2", (
|
157
|
+
format_item, "i2", (primary_axis, "cell", "beam")
|
133
158
|
)
|
134
159
|
datatype = getattr(rd, format_item)
|
135
160
|
var = np.array(datatype(infile).data, dtype="int16")
|
@@ -137,22 +162,100 @@ def main(infile, outfile, attributes=None):
|
|
137
162
|
|
138
163
|
vshape = var.T.shape
|
139
164
|
if i == 0:
|
140
|
-
|
165
|
+
if primary_axis == "ensemble":
|
166
|
+
ensemble[:] = np.arange(1, vshape[0] + 1, 1)
|
167
|
+
|
141
168
|
varid[i][0 : vshape[0], 0 : vshape[1], 0 : vshape[2]] = var.T
|
142
|
-
|
169
|
+
|
143
170
|
# Add global attributes if provided
|
144
171
|
if attributes:
|
145
172
|
for key, value in attributes.items():
|
146
|
-
setattr(
|
173
|
+
setattr(
|
174
|
+
outnc, key, str(value)
|
175
|
+
) # Convert to string to store in NetCDF metadata
|
147
176
|
|
148
177
|
# outnc.history = "Created " + time.ctime(time.time())
|
149
178
|
flead_ncatt(flead, outnc)
|
150
|
-
|
151
179
|
|
152
180
|
outnc.close()
|
153
181
|
|
182
|
+
def flead_nc(
|
183
|
+
infile,
|
184
|
+
outfile,
|
185
|
+
time,
|
186
|
+
axis_option=None,
|
187
|
+
attributes=None,
|
188
|
+
t0="hours since 2000-01-01",
|
189
|
+
):
|
190
|
+
"""
|
191
|
+
Function to create ncfile containing Variable Leader.
|
192
|
+
|
193
|
+
Args:
|
194
|
+
infile (string): Input file path including filename
|
195
|
+
outfile (string): Output file path including filename
|
196
|
+
"""
|
197
|
+
outnc = nc4.Dataset(outfile, "w", format="NETCDF4")
|
198
|
+
|
199
|
+
# Dimensions
|
200
|
+
# Define the primary axis based on axis_option
|
201
|
+
if axis_option == "ensemble":
|
202
|
+
outnc.createDimension("ensemble", None)
|
203
|
+
primary_axis = "ensemble"
|
204
|
+
ensemble = outnc.createVariable("ensemble", "i4", ("ensemble",))
|
205
|
+
ensemble.axis = "T"
|
206
|
+
elif axis_option == "time":
|
207
|
+
tsize = len(time)
|
208
|
+
outnc.createDimension("time", tsize)
|
209
|
+
primary_axis = "time"
|
210
|
+
time_var = outnc.createVariable("time", "i4", ("time",))
|
211
|
+
time_var.axis = "T"
|
212
|
+
time_var.units = t0
|
213
|
+
time_var.long_name = "time"
|
214
|
+
|
215
|
+
# Convert time_data to numerical format
|
216
|
+
nctime = pd2nctime(time, t0)
|
217
|
+
time_var[:] = nctime
|
218
|
+
|
219
|
+
else:
|
220
|
+
raise ValueError(f"Invalid axis_option: {axis_option}.")
|
221
|
+
|
222
|
+
# Variables
|
223
|
+
|
224
|
+
flead = rd.FixedLeader(infile)
|
225
|
+
fdict = flead.fleader
|
226
|
+
varid = [0] * len(fdict)
|
227
|
+
|
228
|
+
i = 0
|
229
|
+
|
230
|
+
for key, values in fdict.items():
|
231
|
+
format_item = key.replace(" ", "_")
|
232
|
+
varid[i] = outnc.createVariable(
|
233
|
+
format_item, "i4", primary_axis, fill_value=-32768
|
234
|
+
)
|
235
|
+
var = values
|
236
|
+
vshape = var.shape
|
237
|
+
if i == 0:
|
238
|
+
if primary_axis == "ensemble":
|
239
|
+
ensemble[:] = np.arange(1, vshape[0] + 1, 1)
|
240
|
+
|
241
|
+
varid[i][0 : vshape[0]] = var
|
242
|
+
i += 1
|
243
|
+
|
244
|
+
# Add global attributes if provided
|
245
|
+
if attributes:
|
246
|
+
for key, value in attributes.items():
|
247
|
+
setattr(outnc, key, str(value)) # Store attributes as strings
|
248
|
+
|
249
|
+
outnc.close()
|
154
250
|
|
155
|
-
def vlead_nc(
|
251
|
+
def vlead_nc(
|
252
|
+
infile,
|
253
|
+
outfile,
|
254
|
+
time,
|
255
|
+
axis_option=None,
|
256
|
+
attributes=None,
|
257
|
+
t0="hours since 2000-01-01",
|
258
|
+
):
|
156
259
|
"""
|
157
260
|
Function to create ncfile containing Variable Leader.
|
158
261
|
|
@@ -163,12 +266,29 @@ def vlead_nc(infile, outfile, attributes=None):
|
|
163
266
|
outnc = nc4.Dataset(outfile, "w", format="NETCDF4")
|
164
267
|
|
165
268
|
# Dimensions
|
166
|
-
|
269
|
+
# Define the primary axis based on axis_option
|
270
|
+
if axis_option == "ensemble":
|
271
|
+
outnc.createDimension("ensemble", None)
|
272
|
+
primary_axis = "ensemble"
|
273
|
+
ensemble = outnc.createVariable("ensemble", "i4", ("ensemble",))
|
274
|
+
ensemble.axis = "T"
|
275
|
+
elif axis_option == "time":
|
276
|
+
tsize = len(time)
|
277
|
+
outnc.createDimension("time", tsize)
|
278
|
+
primary_axis = "time"
|
279
|
+
time_var = outnc.createVariable("time", "i4", ("time",))
|
280
|
+
time_var.axis = "T"
|
281
|
+
time_var.units = t0
|
282
|
+
time_var.long_name = "time"
|
283
|
+
|
284
|
+
# Convert time_data to numerical format
|
285
|
+
nctime = pd2nctime(time, t0)
|
286
|
+
time_var[:] = nctime
|
287
|
+
|
288
|
+
else:
|
289
|
+
raise ValueError(f"Invalid axis_option: {axis_option}.")
|
167
290
|
|
168
291
|
# Variables
|
169
|
-
# Dimension Variables
|
170
|
-
ensemble = outnc.createVariable("ensemble", "i4", ("ensemble",))
|
171
|
-
ensemble.axis = "T"
|
172
292
|
|
173
293
|
vlead = rd.VariableLeader(infile)
|
174
294
|
vdict = vlead.vleader
|
@@ -179,16 +299,17 @@ def vlead_nc(infile, outfile, attributes=None):
|
|
179
299
|
for key, values in vdict.items():
|
180
300
|
format_item = key.replace(" ", "_")
|
181
301
|
varid[i] = outnc.createVariable(
|
182
|
-
format_item, "i4",
|
302
|
+
format_item, "i4", primary_axis, fill_value=-32768
|
183
303
|
)
|
184
304
|
var = values
|
185
305
|
vshape = var.shape
|
186
306
|
if i == 0:
|
187
|
-
|
307
|
+
if primary_axis == "ensemble":
|
308
|
+
ensemble[:] = np.arange(1, vshape[0] + 1, 1)
|
188
309
|
|
189
310
|
varid[i][0 : vshape[0]] = var
|
190
311
|
i += 1
|
191
|
-
|
312
|
+
|
192
313
|
# Add global attributes if provided
|
193
314
|
if attributes:
|
194
315
|
for key, value in attributes.items():
|
@@ -197,7 +318,9 @@ def vlead_nc(infile, outfile, attributes=None):
|
|
197
318
|
outnc.close()
|
198
319
|
|
199
320
|
|
200
|
-
def finalnc(
|
321
|
+
def finalnc(
|
322
|
+
outfile, depth, final_mask, final_echo, final_corr , final_pgood, time, data, t0="hours since 2000-01-01", attributes=None
|
323
|
+
):
|
201
324
|
"""
|
202
325
|
Function to create the processed NetCDF file.
|
203
326
|
|
@@ -208,6 +331,24 @@ def finalnc(outfile, depth, time, data, t0="hours since 2000-01-01", attributes=
|
|
208
331
|
data (numpy array): Velocity (beam, depth, time)
|
209
332
|
t0 (string): Time unit and origin
|
210
333
|
"""
|
334
|
+
fill = -32768
|
335
|
+
|
336
|
+
# Change velocity to cm/s
|
337
|
+
data = data.astype(np.float64)
|
338
|
+
data[data > fill] /= 10
|
339
|
+
|
340
|
+
# Change depth to positive
|
341
|
+
# depth = abs(depth)
|
342
|
+
|
343
|
+
# Reverse the arrays if depth in descending order
|
344
|
+
if np.all(depth[:-1] >= depth[1:]):
|
345
|
+
depth = depth[::-1]
|
346
|
+
data = data[:, ::-1, :]
|
347
|
+
final_mask = final_mask[::-1, :]
|
348
|
+
final_echo = final_echo[:,::-1, :]
|
349
|
+
final_corr = final_corr[:,::-1, :]
|
350
|
+
final_pgood = final_pgood[:,::-1, :]
|
351
|
+
|
211
352
|
ncfile = nc4.Dataset(outfile, mode="w", format="NETCDF4")
|
212
353
|
# Check if depth is scalar or array
|
213
354
|
if np.isscalar(depth):
|
@@ -221,21 +362,22 @@ def finalnc(outfile, depth, time, data, t0="hours since 2000-01-01", attributes=
|
|
221
362
|
z = ncfile.createVariable("depth", np.float32, ("depth"))
|
222
363
|
z.units = "m"
|
223
364
|
z.long_name = "depth"
|
365
|
+
z.positive = "down"
|
224
366
|
|
225
367
|
t = ncfile.createVariable("time", np.float32, ("time"))
|
226
368
|
t.units = t0
|
227
369
|
t.long_name = "time"
|
228
370
|
|
229
371
|
# Create 2D variables
|
230
|
-
uvel = ncfile.createVariable("u", np.float32, ("time", "depth"), fill_value
|
372
|
+
uvel = ncfile.createVariable("u", np.float32, ("time", "depth"), fill_value=fill)
|
231
373
|
uvel.units = "cm/s"
|
232
374
|
uvel.long_name = "zonal_velocity"
|
233
375
|
|
234
|
-
vvel = ncfile.createVariable("v", np.float32, ("time", "depth"), fill_value
|
376
|
+
vvel = ncfile.createVariable("v", np.float32, ("time", "depth"), fill_value=fill)
|
235
377
|
vvel.units = "cm/s"
|
236
378
|
vvel.long_name = "meridional_velocity"
|
237
379
|
|
238
|
-
wvel = ncfile.createVariable("w", np.float32, ("time", "depth"), fill_value
|
380
|
+
wvel = ncfile.createVariable("w", np.float32, ("time", "depth"), fill_value=fill)
|
239
381
|
wvel.units = "cm/s"
|
240
382
|
wvel.long_name = "vertical_velocity"
|
241
383
|
|
@@ -245,18 +387,72 @@ def finalnc(outfile, depth, time, data, t0="hours since 2000-01-01", attributes=
|
|
245
387
|
evel.units = "cm/s"
|
246
388
|
evel.long_name = "error_velocity"
|
247
389
|
|
390
|
+
mvel = ncfile.createVariable("mask", np.float32, ("time", "depth"), fill_value=fill)
|
391
|
+
mvel.long_name = "Velocity Mask (1: bad value, 0: good value)"
|
392
|
+
|
393
|
+
echo1 = ncfile.createVariable("echo1", np.float32, ("time", "depth"), fill_value=-32768)
|
394
|
+
echo1.long_name = "Echo intensity Beam 1"
|
395
|
+
|
396
|
+
echo2 = ncfile.createVariable("echo2", np.float32, ("time", "depth"), fill_value=-32768)
|
397
|
+
echo2.long_name = "Echo intensity Beam 2"
|
398
|
+
|
399
|
+
echo3 = ncfile.createVariable("echo3", np.float32, ("time", "depth"), fill_value=-32768)
|
400
|
+
echo3.long_name = "Echo intensity Beam 3"
|
401
|
+
|
402
|
+
echo4 = ncfile.createVariable("echo4", np.float32, ("time", "depth"), fill_value=-32768)
|
403
|
+
echo4.long_name = "Echo intensity Beam 4"
|
404
|
+
|
405
|
+
corr1 = ncfile.createVariable("corr1", np.float32, ("time", "depth"), fill_value=-32768)
|
406
|
+
corr1.long_name = "Beam 1 correlation"
|
407
|
+
|
408
|
+
corr2 = ncfile.createVariable("corr2", np.float32, ("time", "depth"), fill_value=-32768)
|
409
|
+
corr2.long_name = "Beam 2 correlation"
|
410
|
+
|
411
|
+
corr3 = ncfile.createVariable("corr3", np.float32, ("time", "depth"), fill_value=-32768)
|
412
|
+
corr3.long_name = "Beam 3 correlation"
|
413
|
+
|
414
|
+
corr4 = ncfile.createVariable("corr4", np.float32, ("time", "depth"), fill_value=-32768)
|
415
|
+
corr4.long_name = "Beam 4 correlation"
|
416
|
+
|
417
|
+
pgd1 = ncfile.createVariable("pgd1", np.float32, ("time", "depth"), fill_value=-32768)
|
418
|
+
pgd1.long_name = "Percent Good Beam 1"
|
419
|
+
|
420
|
+
pgd2 = ncfile.createVariable("pgd2", np.float32, ("time", "depth"), fill_value=-32768)
|
421
|
+
pgd2.long_name = "Percent Good Beam 2"
|
422
|
+
|
423
|
+
pgd3 = ncfile.createVariable("pgd3", np.float32, ("time", "depth"), fill_value=-32768)
|
424
|
+
pgd3.long_name = "Percent Good Beam 3"
|
425
|
+
|
426
|
+
pgd4 = ncfile.createVariable("pgd4", np.float32, ("time", "depth"), fill_value=-32768)
|
427
|
+
pgd4.long_name = "Percent Good Beam 4"
|
428
|
+
|
248
429
|
nctime = pd2nctime(time, t0)
|
249
430
|
# write data
|
250
|
-
z[:] = depth
|
431
|
+
z[:] = depth
|
251
432
|
t[:] = nctime
|
252
433
|
uvel[:, :] = data[0, :, :].T
|
253
434
|
vvel[:, :] = data[1, :, :].T
|
254
435
|
wvel[:, :] = data[2, :, :].T
|
255
436
|
evel[:, :] = data[3, :, :].T
|
256
|
-
|
437
|
+
mvel[:, :] = final_mask.T
|
438
|
+
echo1[:, :] = final_echo[0, :, :].T
|
439
|
+
echo2[:, :] = final_echo[1, :, :].T
|
440
|
+
echo3[:, :] = final_echo[2, :, :].T
|
441
|
+
echo4[:, :] = final_echo[3, :, :].T
|
442
|
+
corr1[:, :] = final_corr[0, :, :].T
|
443
|
+
corr2[:, :] = final_corr[1, :, :].T
|
444
|
+
corr3[:, :] = final_corr[2, :, :].T
|
445
|
+
corr4[:, :] = final_corr[3, :, :].T
|
446
|
+
pgd1[:, :] = final_pgood[0, :, :].T
|
447
|
+
pgd2[:, :] = final_pgood[1, :, :].T
|
448
|
+
pgd3[:, :] = final_pgood[2, :, :].T
|
449
|
+
pgd4[:, :] = final_pgood[3, :, :].T
|
450
|
+
|
257
451
|
# Add global attributes if provided
|
258
452
|
if attributes:
|
259
453
|
for key, value in attributes.items():
|
260
454
|
setattr(ncfile, key, str(value)) # Store attributes as strings
|
261
455
|
|
456
|
+
ncfile.mask_applied = "True"
|
457
|
+
|
262
458
|
ncfile.close()
|
@@ -1,8 +1,8 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.3
|
2
2
|
Name: pyadps
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.1
|
4
4
|
Summary: A Python package for ADCP data processing
|
5
|
-
Home-page: https://
|
5
|
+
Home-page: https://pyadps.readthedocs.io/en/latest/index.html
|
6
6
|
License: MIT
|
7
7
|
Keywords: adcp,data-processing,oceanography
|
8
8
|
Author: P. Amol
|
@@ -12,6 +12,7 @@ Classifier: License :: OSI Approved :: MIT License
|
|
12
12
|
Classifier: Operating System :: OS Independent
|
13
13
|
Classifier: Programming Language :: Python :: 3
|
14
14
|
Classifier: Programming Language :: Python :: 3.12
|
15
|
+
Classifier: Programming Language :: Python :: 3.13
|
15
16
|
Provides-Extra: tests
|
16
17
|
Requires-Dist: cmake (>=3.30.2)
|
17
18
|
Requires-Dist: matplotlib (>=3.8.4)
|
@@ -21,18 +22,30 @@ Requires-Dist: numpy (>=1.26.4)
|
|
21
22
|
Requires-Dist: pandas (>=2.2.2)
|
22
23
|
Requires-Dist: plotly (>=5.22.0)
|
23
24
|
Requires-Dist: plotly-resampler (>=0.10.0)
|
25
|
+
Requires-Dist: pygeomag (>=1.1.0,<2.0.0)
|
24
26
|
Requires-Dist: scipy (>=1.14.0)
|
25
27
|
Requires-Dist: streamlit (>=1.36.0)
|
26
|
-
|
27
|
-
Project-URL: Documentation, https://example.com/docs
|
28
|
+
Project-URL: Documentation, https://pyadps.readthedocs.io/en/latest/index.html
|
28
29
|
Project-URL: Repository, https://github.com/p-amol/pyadps
|
29
30
|
Description-Content-Type: text/markdown
|
30
31
|
|
31
32
|
# pyadps
|
32
33
|
|
33
|
-
`pyadps` is a Python package for processing moored Acoustic Doppler
|
34
|
+
`pyadps` is a Python package for processing moored Acoustic Doppler
|
35
|
+
Current Profiler (ADCP) data. It provides various functionalities
|
36
|
+
such as data reading, quality control tests, NetCDF file creation,
|
37
|
+
and visualization.
|
34
38
|
|
35
|
-
This software offers both a graphical interface (`Streamlit`) for
|
39
|
+
This software offers both a graphical interface (`Streamlit`) for
|
40
|
+
those new to Python and direct Python package access for experienced
|
41
|
+
users. Please note that `pyadps` is primarily designed for Teledyne
|
42
|
+
RDI workhorse ADCPs. Other company's ADCP files are not compatible,
|
43
|
+
and while some other RDI models may work, they might require additional
|
44
|
+
considerations.
|
45
|
+
|
46
|
+
- Documentation: <https://pyadps.readthedocs.io>
|
47
|
+
- Source code: <https://github.com/p-amol/pyadps>
|
48
|
+
- Bug reports: <https://github.com/p-amol/pyadps/issues>
|
36
49
|
|
37
50
|
## Table of Contents
|
38
51
|
|
@@ -42,37 +55,49 @@ This software offers both a graphical interface (`Streamlit`) for those new to P
|
|
42
55
|
|
43
56
|
## Installation
|
44
57
|
|
45
|
-
We recommend installing the package within a virtual environment.
|
46
|
-
|
58
|
+
We recommend installing the package within a virtual environment.
|
59
|
+
At present, the package is compatible exclusively with Python version 3.12.
|
60
|
+
You can create a Python environment using tools like `venv` or `conda`.
|
61
|
+
Below are instructions for both methods.
|
47
62
|
|
48
63
|
### 1. Using `venv` (Built-in Python Tool)
|
49
64
|
|
50
65
|
#### Step 1: Install Python version 3.12 (if not already installed)
|
66
|
+
|
51
67
|
Ensure you have Python installed. You can download the latest version from [python.org](https://www.python.org/downloads/).
|
52
68
|
|
53
|
-
#### Step 2: Create a Virtual Environment
|
69
|
+
#### Step 2: Create a Virtual Environment
|
70
|
+
|
54
71
|
- Open your terminal or command prompt.
|
55
72
|
- Navigate to your project folder:
|
73
|
+
|
56
74
|
```bash
|
57
75
|
cd /path/to/your/project
|
58
76
|
```
|
59
|
-
|
77
|
+
|
78
|
+
- Run the following command to create a virtual environment
|
79
|
+
(replace adpsenv with your preferred environment name):
|
60
80
|
|
61
81
|
```bash
|
62
82
|
python -m venv adpsenv
|
63
83
|
```
|
64
84
|
|
65
85
|
#### Step 3: Activate the Environment
|
86
|
+
|
66
87
|
- On Windows:
|
88
|
+
|
67
89
|
```bash
|
68
90
|
adpsenv\Scripts\activate
|
69
91
|
```
|
70
92
|
|
71
93
|
- On macOS/Linux:
|
94
|
+
|
72
95
|
```bash
|
73
96
|
source adpsenv/bin/activate
|
74
97
|
```
|
75
|
-
|
98
|
+
|
99
|
+
You’ll see the environment name in your terminal prompt
|
100
|
+
indicating the environment is active.
|
76
101
|
|
77
102
|
#### Step 4: Install Dependencies
|
78
103
|
|
@@ -83,44 +108,51 @@ pip install pyadps
|
|
83
108
|
```
|
84
109
|
|
85
110
|
#### Step 5: Deactivate the Environment
|
111
|
+
|
86
112
|
When you’re done working in the environment, deactivate it by running:
|
87
113
|
|
88
114
|
```bash
|
89
115
|
deactivate
|
90
116
|
```
|
91
117
|
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
### 2. Using `conda` (Anaconda/Miniconda):
|
118
|
+
### 2. Using `conda` (Anaconda/Miniconda)
|
96
119
|
|
97
120
|
#### Step 1: Install Conda
|
121
|
+
|
98
122
|
First, you need to have Conda installed on your system. You can either install:
|
99
123
|
|
100
124
|
- [Anaconda (Full Distribution)](https://www.anaconda.com/products/individual)
|
101
125
|
- [Miniconda (Lightweight Version)](https://docs.conda.io/en/latest/miniconda.html)
|
102
126
|
|
103
127
|
#### Step 2: Create a Conda Environment with Python 3.12
|
104
|
-
|
128
|
+
|
129
|
+
Once Conda is installed, open a terminal or command prompt and run
|
130
|
+
the following to create a new environment (replace `adpsenv` with
|
131
|
+
your preferred environment name):
|
105
132
|
|
106
133
|
```bash
|
107
134
|
conda create --name adpsenv python=3.12
|
108
135
|
```
|
109
136
|
|
110
|
-
#### Step 3: Activate the Environment
|
137
|
+
#### Step 3: Activate the Conda Environment
|
138
|
+
|
111
139
|
```bash
|
112
140
|
conda activate adpsenv
|
113
141
|
```
|
114
142
|
|
115
|
-
#### Step 4: Install Dependencies
|
116
|
-
|
143
|
+
#### Step 4: Install pyadps Dependencies
|
144
|
+
|
145
|
+
You can install packages with pip inside Conda environments.
|
146
|
+
|
117
147
|
```bash
|
118
148
|
pip install pyadps
|
119
149
|
```
|
120
150
|
|
121
|
-
#### Step 5: Deactivate the Environment
|
122
|
-
|
123
|
-
|
151
|
+
#### Step 5: Deactivate the Conda Environment
|
152
|
+
|
153
|
+
When done working in the environment, deactivate the environment by running:
|
154
|
+
|
155
|
+
```bash
|
124
156
|
conda deactivate
|
125
157
|
```
|
126
158
|
|
@@ -129,11 +161,11 @@ conda deactivate
|
|
129
161
|
### Streamlit web interface
|
130
162
|
|
131
163
|
Open a terminal or command prompt, activate the environment, and run the command.
|
164
|
+
|
132
165
|
```bash
|
133
166
|
run-pyadps
|
134
167
|
```
|
135
168
|
|
136
|
-
|
137
169
|
## License
|
138
170
|
|
139
171
|
This project is licensed under the MIT License. See the LICENSE file for details.
|
@@ -0,0 +1,47 @@
|
|
1
|
+
pyadps/Home_Page.py,sha256=j_-3fsp1hkhpNEl5jE-CEQvClDGpMi1H3ZQPXfuKWBg,1782
|
2
|
+
pyadps/__init__.py,sha256=bNCm6_WIhiwvaUeOZhRkyLZyzzUKfSH80Fslg0JPJyk,232
|
3
|
+
pyadps/__main__.py,sha256=cIFUayxPnKl00oIR99L6IUEvc8trW7dijtfBQCAen5c,356
|
4
|
+
pyadps/pages/01_Read_File.py,sha256=4LUeSEumOtsGpsEdPdeRq5msHP91JqdZXcJB_PJHPXo,14373
|
5
|
+
pyadps/pages/02_View_Raw_Data.py,sha256=AhT7gvDbcMRPf-WIBzTQ0o-nn9_q7NH6plTlpMtgzaY,6170
|
6
|
+
pyadps/pages/03_Download_Raw_File.py,sha256=A17wxNTHZC1Oi51S0fa2uLTBQsRTWRjDZQjFb2l78uI,10721
|
7
|
+
pyadps/pages/04_Sensor_Health.py,sha256=2Qnwl7D46H-f8LmXLVZj5X36h8MjRwmVRK6Bs_wuB_k,33905
|
8
|
+
pyadps/pages/05_QC_Test.py,sha256=8wt7h-RHLOf3GZ8-B_kXA0IqzHTBwW_H7YQFEk5EM6E,15904
|
9
|
+
pyadps/pages/06_Profile_Test.py,sha256=zH2TdpEzRFUiXSDQGfdeSsGYAihdCRuj4YgsedB61E0,34776
|
10
|
+
pyadps/pages/07_Velocity_Test.py,sha256=K4vEiLPMXrU4JMLj-mIA1G4H5ORozMbHMiMov3ZZXP0,23008
|
11
|
+
pyadps/pages/08_Write_File.py,sha256=ghzxAaIrnArb04Mvn4b4jNu1ewZ-U9V8uZQAFuO6DZc,22255
|
12
|
+
pyadps/pages/09_Auto_process.py,sha256=SRtQVD9_kodlSvYdF9-02ur6EaWG2zMvN6-BcWdzYV8,1874
|
13
|
+
pyadps/pages/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
14
|
+
pyadps/pages/__pycache__/__init__.cpython-312.pyc,sha256=6pMyqdclo2Qu_4JRR0WGzppdaQyxFUIBQbciBi14wgw,157
|
15
|
+
pyadps/utils/__init__.py,sha256=nCqRp-OT_1BC7RnL3ARUIldlw9sWyr1XqQvQid-B4ts,407
|
16
|
+
pyadps/utils/__pycache__/__init__.cpython-312.pyc,sha256=1FNTM005xyJOn2eJ9-kn8rJjD215cvgy3Cc-Xb-apf0,545
|
17
|
+
pyadps/utils/__pycache__/autoprocess.cpython-312.pyc,sha256=s_f3V09eFxcGWaGNHiXADgBs1OaWhGz6ypEdkVV4rpg,17996
|
18
|
+
pyadps/utils/__pycache__/cutbin.cpython-312.pyc,sha256=Fu6VQQL0rjRkvrSS8qLmU8ctaz-Y-juw2b6fcIuS30g,28442
|
19
|
+
pyadps/utils/__pycache__/plotgen.cpython-312.pyc,sha256=HA8QnkI9CQttcAlXrRPvrZrgKroJb_W_S6dmR0XM9pk,47182
|
20
|
+
pyadps/utils/__pycache__/profile_test.cpython-312.pyc,sha256=FGaPZj5POdrBmUwbLs9tKFXJQL29WjZsX1l7mumUwrk,20852
|
21
|
+
pyadps/utils/__pycache__/pyreadrdi.cpython-312.pyc,sha256=6_jgCt-3N4gQVLKLZZCLqOKsQJ3mQXQrq_w2jtU7ARw,37624
|
22
|
+
pyadps/utils/__pycache__/readrdi.cpython-312.pyc,sha256=-3SpMj71glafcy0XlS_itLYFKCQAXLnrmliBwVDhEqM,53190
|
23
|
+
pyadps/utils/__pycache__/regrid.cpython-312.pyc,sha256=STOYAAGBfLnP91Pvqlcvtd8ilwyOoRDoGxHs56hiSYo,9804
|
24
|
+
pyadps/utils/__pycache__/script.cpython-312.pyc,sha256=ubdOI-kEG_iBBB0tBvU-r4CZWj9Wn42PewdGKsNlu2M,8230
|
25
|
+
pyadps/utils/__pycache__/sensor_health.cpython-312.pyc,sha256=8iYp15CEZNFujAIftWylksg9WbdPe0ozsk99jJFQqco,5037
|
26
|
+
pyadps/utils/__pycache__/signal_quality.cpython-312.pyc,sha256=PeUZEesieBLxrc8z8aKoX7N7zjUJfpTqcvsTp_V0FG0,18256
|
27
|
+
pyadps/utils/__pycache__/velocity_test.cpython-312.pyc,sha256=6tUY161EOSGwwSkfMEnWwF8jzrCIl5bm9D-PEcCogyY,7071
|
28
|
+
pyadps/utils/__pycache__/writenc.cpython-312.pyc,sha256=0c1p-PLaJjYJrTXrgJ-VRCyZtqVlPyYyfeefIAr0t-8,11738
|
29
|
+
pyadps/utils/autoprocess.py,sha256=8KAg5-7uC7dsMHrCPfvM5icPzle3MU1gpFNcC-eZrkM,20086
|
30
|
+
pyadps/utils/metadata/config.ini,sha256=TC7htzGwUukIXt_u3JR5ycyvOoDj_JxWgGY6khjNeck,2154
|
31
|
+
pyadps/utils/metadata/demo.000,sha256=qxB3sgjABrpv4DNXkwjpbSxk5sc4UwAI8kgQX0--PM8,234468
|
32
|
+
pyadps/utils/metadata/flmeta.json,sha256=diIB9nht_0uw9YJNSFGdZYGzeVbR-07zIZS9Nf4VPSE,14245
|
33
|
+
pyadps/utils/metadata/vlmeta.json,sha256=_dkQlGkkUvpAIM7S6kEUenSaiCpOrwXg8n1aU3dDF3s,22535
|
34
|
+
pyadps/utils/plotgen.py,sha256=-A5fN2WoCZevt_SLT5OKSeYCzfv3rGG4tw7p1qzFjeA,26344
|
35
|
+
pyadps/utils/profile_test.py,sha256=kcqdFigL2wQwMRrKyfNzfGIYcFwRj1_945lEpIio6pQ,20173
|
36
|
+
pyadps/utils/pyreadrdi.py,sha256=2xBg9v7wvxywfvJK1E0hrjR9XSqiiNwpA9ELfcSsuhM,35303
|
37
|
+
pyadps/utils/readrdi.py,sha256=ullqqWL-tvK3V9fjX8kpPwRpWhmRZy-CyA240gmcdr4,50012
|
38
|
+
pyadps/utils/script.py,sha256=TKMCYe0HEz-2GFpNxKVzpg0p4MM-Cu2rcMZc51GgLn4,6534
|
39
|
+
pyadps/utils/sensor_health.py,sha256=aHRaU4kMJZ9dGmYypKpCCgq-owWoNjvcl1I_9I7dG68,3973
|
40
|
+
pyadps/utils/signal_quality.py,sha256=dohaMtJT_MCeyxF__zMRy36_rMmVZqU5vCdW1AYH35s,16239
|
41
|
+
pyadps/utils/velocity_test.py,sha256=O8dgjv_5pxhJq6QuWHxysMjNzxSnob_2KPLInmO1kHI,6112
|
42
|
+
pyadps/utils/writenc.py,sha256=fgE0qpxCy_uk5hsYCeN5l77jWgj-vLxpjx-4hEJDJU0,13955
|
43
|
+
pyadps-0.1.1.dist-info/LICENSE,sha256=sfY_7DzQF5FxnO2T6ek74dfm5uBmwEp1oEg_WlzNsb8,1092
|
44
|
+
pyadps-0.1.1.dist-info/METADATA,sha256=bCxR_5Za17VwJ69R7Ja7h9UwVAidcFwI_3veHtBn9Qs,4518
|
45
|
+
pyadps-0.1.1.dist-info/WHEEL,sha256=RaoafKOydTQ7I_I3JTrPCg6kUmTgtm4BornzOqyEfJ8,88
|
46
|
+
pyadps-0.1.1.dist-info/entry_points.txt,sha256=-oZhbbJq8Q29uNVh5SmzOLp9OeFM9VUzHVxovfI4LXA,126
|
47
|
+
pyadps-0.1.1.dist-info/RECORD,,
|