radarkit 6.2.5.dev0__tar.gz → 6.3.dev0__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.
- {radarkit-6.2.5.dev0/src/radarkit.egg-info → radarkit-6.3.dev0}/PKG-INFO +1 -1
- {radarkit-6.2.5.dev0 → radarkit-6.3.dev0}/src/radarkit/main.py +30 -14
- {radarkit-6.2.5.dev0 → radarkit-6.3.dev0/src/radarkit.egg-info}/PKG-INFO +1 -1
- {radarkit-6.2.5.dev0 → radarkit-6.3.dev0}/LICENSE +0 -0
- {radarkit-6.2.5.dev0 → radarkit-6.3.dev0}/MANIFEST.in +0 -0
- {radarkit-6.2.5.dev0 → radarkit-6.3.dev0}/README.md +0 -0
- {radarkit-6.2.5.dev0 → radarkit-6.3.dev0}/pyproject.toml +0 -0
- {radarkit-6.2.5.dev0 → radarkit-6.3.dev0}/requirements.txt +0 -0
- {radarkit-6.2.5.dev0 → radarkit-6.3.dev0}/setup.cfg +0 -0
- {radarkit-6.2.5.dev0 → radarkit-6.3.dev0}/src/radarkit/__init__.py +0 -0
- {radarkit-6.2.5.dev0 → radarkit-6.3.dev0}/src/radarkit/_ctypes_.py +0 -0
- {radarkit-6.2.5.dev0 → radarkit-6.3.dev0}/src/radarkit/chart.py +0 -0
- {radarkit-6.2.5.dev0 → radarkit-6.3.dev0}/src/radarkit/defs.py +0 -0
- {radarkit-6.2.5.dev0 → radarkit-6.3.dev0}/src/radarkit/maps/citiesx020.shp.json +0 -0
- {radarkit-6.2.5.dev0 → radarkit-6.3.dev0}/src/radarkit/maps/gz_2010_us_050_00_500k.stq.json +0 -0
- {radarkit-6.2.5.dev0 → radarkit-6.3.dev0}/src/radarkit/maps/intrstat.stq.json +0 -0
- {radarkit-6.2.5.dev0 → radarkit-6.3.dev0}/src/radarkit/maps/states-10m.stq.json +0 -0
- {radarkit-6.2.5.dev0 → radarkit-6.3.dev0}/src/radarkit/overlay.py +0 -0
- {radarkit-6.2.5.dev0 → radarkit-6.3.dev0}/src/radarkit/prod.py +0 -0
- {radarkit-6.2.5.dev0 → radarkit-6.3.dev0}/src/radarkit/sweep.py +0 -0
- {radarkit-6.2.5.dev0 → radarkit-6.3.dev0}/src/radarkit.egg-info/SOURCES.txt +0 -0
- {radarkit-6.2.5.dev0 → radarkit-6.3.dev0}/src/radarkit.egg-info/dependency_links.txt +0 -0
- {radarkit-6.2.5.dev0 → radarkit-6.3.dev0}/src/radarkit.egg-info/requires.txt +0 -0
- {radarkit-6.2.5.dev0 → radarkit-6.3.dev0}/src/radarkit.egg-info/top_level.txt +0 -0
|
@@ -105,7 +105,6 @@ class Workspace(ctypes.Structure):
|
|
|
105
105
|
def __init__(self):
|
|
106
106
|
super().__init__()
|
|
107
107
|
self.name = f"\033{RKPythonColor[4:]}< Python Core >\033[m"
|
|
108
|
-
self.verbose = 0
|
|
109
108
|
self.fid = None
|
|
110
109
|
self.desc = None
|
|
111
110
|
self.header = None
|
|
@@ -114,7 +113,17 @@ class Workspace(ctypes.Structure):
|
|
|
114
113
|
RKSetProgramName(b"RadarKit")
|
|
115
114
|
RKLog(f"{self.name} Initializing ...")
|
|
116
115
|
|
|
117
|
-
def open(self, filename,
|
|
116
|
+
def open(self, filename, **kwargs):
|
|
117
|
+
"""
|
|
118
|
+
kwargs:
|
|
119
|
+
path: str, default "data"
|
|
120
|
+
The data path
|
|
121
|
+
cores: int, default 4
|
|
122
|
+
The number of cores to use for pulse processing.
|
|
123
|
+
verbose: int, default 0
|
|
124
|
+
The verbosity level.
|
|
125
|
+
"""
|
|
126
|
+
self.verbose = kwargs.get("verbose", 0)
|
|
118
127
|
self.fid = RKFileOpen(filename, "r")
|
|
119
128
|
self.header = RKFileHeaderInitFromFid(self.fid).contents
|
|
120
129
|
self.filesize = RKFileGetSize(self.fid)
|
|
@@ -130,7 +139,7 @@ class Workspace(ctypes.Structure):
|
|
|
130
139
|
# Store as self.desc using the first header.desc and override some attributes. Only the first encounter matters.
|
|
131
140
|
if self.desc is None or self.allocated is False:
|
|
132
141
|
desc = self.header.desc
|
|
133
|
-
desc.dataPath =
|
|
142
|
+
desc.dataPath = kwargs.get("path", "data").encode("utf-8")
|
|
134
143
|
desc.configBufferDepth = 3
|
|
135
144
|
desc.pulseBufferDepth = 10 * RKMaximumPulsesPerRay + 50
|
|
136
145
|
desc.rayBufferDepth = RKMaximumRaysPerSweep + 50
|
|
@@ -155,7 +164,7 @@ class Workspace(ctypes.Structure):
|
|
|
155
164
|
print("PulseEngine: N RingFilterEngine: N")
|
|
156
165
|
self.configIndex = pyRKuint32(desc.configBufferDepth - 1)
|
|
157
166
|
self.desc = desc
|
|
158
|
-
self.alloc(cores=cores)
|
|
167
|
+
self.alloc(cores=kwargs.get("cores", 4))
|
|
159
168
|
|
|
160
169
|
if (
|
|
161
170
|
(self.desc.initFlags & RKInitFlagStartPulseEngine)
|
|
@@ -412,7 +421,12 @@ class Workspace(ctypes.Structure):
|
|
|
412
421
|
if z % 100 == 0:
|
|
413
422
|
s = z * 0.01
|
|
414
423
|
m = self.pulseMachine.contents.maxWorkerLag
|
|
415
|
-
self.print(f"Waiting for workers ... z = {z:d} / {s:.1f}s {m:.1f}
|
|
424
|
+
self.print(f"Waiting for workers ... z = {z:d} / {s:.1f}s {m:.1f}\n")
|
|
425
|
+
pulse = self.get_done_pulse()
|
|
426
|
+
while pulse is not None:
|
|
427
|
+
ic += 1
|
|
428
|
+
ciq[ic, :, :] = read_RKComplex_from_pulse(pulse, downSampledGateCount)
|
|
429
|
+
pulse = self.get_done_pulse()
|
|
416
430
|
z = z + 1
|
|
417
431
|
|
|
418
432
|
r = RKReadPulseFromFileReference(pulse, ctypes.byref(self.header), self.fid)
|
|
@@ -427,26 +441,30 @@ class Workspace(ctypes.Structure):
|
|
|
427
441
|
d16 = read_RKInt16C_from_pulse(pulse, pulse.contents.header.gateCount)
|
|
428
442
|
place_RKInt16C_to_pulse(pulse, filter(d16))
|
|
429
443
|
|
|
444
|
+
el[ip] = pulse.contents.header.elevationDegrees
|
|
445
|
+
az[ip] = pulse.contents.header.azimuthDegrees
|
|
446
|
+
if self.header.dataType == RKRawDataTypeFromTransceiver:
|
|
447
|
+
riq[ip, :, :] = read_RKInt16C_from_pulse(pulse, gateCount)
|
|
448
|
+
|
|
430
449
|
pulse.contents.header.s |= RKPulseStatusHasIQData | RKPulseStatusHasPosition
|
|
431
450
|
if not (self.desc.initFlags & RKInitFlagStartRingFilterEngine):
|
|
432
451
|
pulse.contents.header.s |= RKPulseStatusRingProcessed
|
|
433
452
|
if self.header.dataType == RKRawDataTypeAfterMatchedFilter:
|
|
434
453
|
pulse.contents.header.s |= RKPulseStatusCompleteForMoments
|
|
435
454
|
|
|
436
|
-
el[ip] = pulse.contents.header.elevationDegrees
|
|
437
|
-
az[ip] = pulse.contents.header.azimuthDegrees
|
|
438
|
-
if self.header.dataType == RKRawDataTypeFromTransceiver:
|
|
439
|
-
riq[ip, :, :] = read_RKInt16C_from_pulse(pulse, gateCount)
|
|
440
455
|
pulse = self.get_done_pulse()
|
|
441
456
|
while pulse is not None:
|
|
442
457
|
ic += 1
|
|
443
458
|
ciq[ic, :, :] = read_RKComplex_from_pulse(pulse, downSampledGateCount)
|
|
444
459
|
pulse = self.get_done_pulse()
|
|
445
460
|
|
|
461
|
+
# Yield to other threads to process the pulses
|
|
462
|
+
time.sleep(1.0e-6)
|
|
463
|
+
|
|
446
464
|
pbar.update(1.0)
|
|
447
465
|
pbar.close()
|
|
448
466
|
|
|
449
|
-
if self.verbose:
|
|
467
|
+
if self.verbose > 1:
|
|
450
468
|
print(f"E1: ip = {ip:,d} ic = {ic:,d} pulseCount = {pulseCount:,d}")
|
|
451
469
|
s = 0
|
|
452
470
|
while ic < ip and s < 30:
|
|
@@ -457,7 +475,7 @@ class Workspace(ctypes.Structure):
|
|
|
457
475
|
continue
|
|
458
476
|
ic += 1
|
|
459
477
|
ciq[ic, :, :] = read_RKComplex_from_pulse(pulse, downSampledGateCount)
|
|
460
|
-
if self.verbose or s >= 30 or ic < ip:
|
|
478
|
+
if self.verbose > 1 or s >= 30 or ic < ip:
|
|
461
479
|
print(f"E0: ip = {ip:,d} ic = {ic:,d} pulseCount = {pulseCount:,d}")
|
|
462
480
|
|
|
463
481
|
RKFileSeek(self.fid, pos)
|
|
@@ -529,9 +547,7 @@ def open(filename, **kwargs):
|
|
|
529
547
|
workspace = Workspace()
|
|
530
548
|
else:
|
|
531
549
|
workspace = workspaces[-1]
|
|
532
|
-
|
|
533
|
-
workspace.verbose = kwargs["verbose"]
|
|
534
|
-
workspace.open(filename)
|
|
550
|
+
workspace.open(filename, **kwargs)
|
|
535
551
|
if len(workspaces) > 3:
|
|
536
552
|
print(f"Warning. Multiple workspaces ({len(workspaces)}) detected.")
|
|
537
553
|
return workspace
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|