Model and data contracts#
Radar models and typed data contracts.
- class pyradar.base.ADCFrame(data, dims, radar=None, timestamp=None, frameId=None, metadata=<factory>)[source]#
Bases:
objectRaw ADC frame with explicit dimension names.
Raw ndarrays are never assigned dimensions by guesswork. A singleton
looporemissiondimension may be inserted only when the radar model proves that its size is one.- Parameters:
- data: NDArray[Any]#
- dims: AxisOrder#
- class pyradar.base.AWR1843Radar(waveform, sampler, transceivers, mimo, calibration=<factory>, processing=<factory>, name='radar', hardware='TI AWR1843', profileName='custom')[source]#
Bases:
RadarTI AWR1843 capture profile used by RAMPCNN/CRUW.
- Parameters:
waveform (FMCW)
sampler (Sampler)
transceivers (Transceivers)
mimo (MIMOScheme)
calibration (Calibration)
processing (ProcessingConfig)
name (str)
hardware (str)
profileName (str)
- class pyradar.base.BPM(numRx, codeMatrix=((1.0, 1.0), (1.0, -1.0)))[source]#
Bases:
MIMOSchemeTwo-transmitter binary phase modulation with Hadamard decoding.
- class pyradar.base.CFARConfig(method='ca', trainingCells=(8, 4), guardCells=(2, 1), pfa=0.0001, rankFraction=0.75, minSnrDb=0.0, peakGrouping=True, maxDetections=512)[source]#
Bases:
objectRange-Doppler CFAR and peak-grouping configuration.
- Parameters:
- class pyradar.base.Calibration(adcGain=None, adcPhase=None, frequencySlope=None, rangeCoupling=None, arrayPhase=None, overlapPairs=None)[source]#
Bases:
objectCalibration terms grouped by the signal-processing stage.
adcGain,adcPhase, andfrequencySlopeare indexed by(emission, rx)(or byrxfor SIMO).rangeCouplingis indexed by(virtual, range).arrayPhasehas one complex coefficient per virtual channel. Any supplied shape is checked at the point of use.- Parameters:
- class pyradar.base.ClusterSet(labels, clusterId, centroid, size, covariance, radialVelocity, power)[source]#
Bases:
objectPer-point labels and aggregate cluster statistics.
- Parameters:
labels (NDArray[int64])
clusterId (NDArray[int64])
centroid (NDArray[float64])
size (NDArray[float64])
covariance (NDArray[float64])
radialVelocity (NDArray[float64])
power (NDArray[float64])
- labels: NDArray[int64]#
- clusterId: NDArray[int64]#
- centroid: NDArray[float64]#
- size: NDArray[float64]#
- covariance: NDArray[float64]#
- radialVelocity: NDArray[float64]#
- power: NDArray[float64]#
- class pyradar.base.ClusteringConfig(enabled=False, eps=1.0, minSamples=3, velocityScale=1.0, dimensions=3)[source]#
Bases:
objectVelocity-aware deterministic DBSCAN defaults.
- Parameters:
- class pyradar.base.DDM(numTx, numRx, dopplerOffsets, codeLength)[source]#
Bases:
MIMOSchemeDoppler-division MIMO using orthogonal linear slow-time phase codes.
dopplerOffsetsare normalized cycles per raw chirp. Decoding correlates one complete code period, so the input loop count must be divisible bycodeLength. The target is assumed stationary over one code period.- property codes: NDArray[complex128]#
- class pyradar.base.DetectionSet(rangeBin, dopplerBin, power, noise, threshold, snr, azimuthBin=None, elevationBin=None)[source]#
Bases:
objectCFAR detections and their source bins.
- Parameters:
rangeBin (NDArray[int64])
dopplerBin (NDArray[int64])
power (NDArray[float64])
noise (NDArray[float64])
threshold (NDArray[float64])
snr (NDArray[float64])
azimuthBin (NDArray[int64] | None)
elevationBin (NDArray[int64] | None)
- rangeBin: NDArray[int64]#
- dopplerBin: NDArray[int64]#
- power: NDArray[float64]#
- noise: NDArray[float64]#
- threshold: NDArray[float64]#
- snr: NDArray[float64]#
- class pyradar.base.DoAConfig(method='auto', azimuthFov=(-1.5707963267948966, 1.5707963267948966), elevationFov=(-0.7853981633974483, 0.7853981633974483), azimuthBins=181, elevationBins=61, numSources=1, diagonalLoading=0.001, duplicatePolicy='coherent')[source]#
Bases:
objectDirection-of-arrival defaults in radians.
- Parameters:
- class pyradar.base.FFTConfig(rangeFftSize=None, dopplerFftSize=None, azimuthFftSize=256, elevationFftSize=128, rangeWindow='hann', dopplerWindow='hann', angleWindow='hann', removeRangeMean=False, removeDopplerMean=True, rangeCrop=None, azimuthCrop=None, elevationCrop=None)[source]#
Bases:
objectFFT sizes, windows, and optional output cropping.
- Parameters:
rangeFftSize (int | None)
dopplerFftSize (int | None)
azimuthFftSize (int)
elevationFftSize (int)
rangeWindow (Literal['rectangular', 'hann', 'hamming', 'blackman', 'blackmanharris'])
dopplerWindow (Literal['rectangular', 'hann', 'hamming', 'blackman', 'blackmanharris'])
angleWindow (Literal['rectangular', 'hann', 'hamming', 'blackman', 'blackmanharris'])
removeRangeMean (bool)
removeDopplerMean (bool)
- class pyradar.base.FMCW(startFrequency, slope, adcStartTime, rampEndTime, idleTime=0.0, shape='sawtooth')[source]#
Bases:
objectSawtooth FMCW chirp definition.
- Parameters:
- startFrequency:
Frequency at the beginning of the ramp, in Hz.
- slope:
Ramp slope, in Hz/s. v1 supports positive-slope sawtooth chirps.
- adcStartTime:
Delay from ramp start to the first ADC sample, in seconds.
- rampEndTime:
Ramp duration measured from ramp start, in seconds.
- idleTime:
Idle time after each ramp, in seconds.
- Parameters:
- property wavelength: float#
Wavelength at
centerFrequency.
- class pyradar.base.FrameResult(adcFrame, detections, pointCloud, rangeCube=None, rangeDopplerCube=None, rangeAngleCube=None, rangeDopplerAngleCube=None, clusters=None, tracks=None, metadata=<factory>)[source]#
Bases:
objectProducts generated while processing one ADC frame.
- Parameters:
adcFrame (ADCFrame)
detections (DetectionSet)
pointCloud (PointCloud)
rangeCube (RadarCube | None)
rangeDopplerCube (RadarCube | None)
rangeAngleCube (RadarCube | None)
rangeDopplerAngleCube (RadarCube | None)
clusters (ClusterSet | None)
tracks (TrackSet | None)
- detections: DetectionSet#
- pointCloud: PointCloud#
- clusters: ClusterSet | None#
- class pyradar.base.MIMOScheme[source]#
Bases:
ABCInterface implemented by all MIMO strategies.
- class pyradar.base.PointCloud(xyz, power, snr, radialVelocity, sourceBins, timestamp=None, frameId=None)[source]#
Bases:
objectRadar point cloud in FLU coordinates with velocity and provenance.
- Parameters:
- xyz: NDArray[float64]#
- power: NDArray[float64]#
- snr: NDArray[float64]#
- radialVelocity: NDArray[float64]#
- sourceBins: NDArray[int64]#
- property range: NDArray[float64]#
- property azimuth: NDArray[float64]#
- property elevation: NDArray[float64]#
- class pyradar.base.PointCloudConfig(minRange=0.0, maxRange=None, unwrapTdmVelocity=True)[source]#
Bases:
objectPoint-cloud filtering defaults.
- class pyradar.base.ProcessingConfig(fft=<factory>, cfar=<factory>, doa=<factory>, pointCloud=<factory>, clustering=<factory>, tracking=<factory>, retainRangeDoppler=True, retainRangeAngle=False, retainRangeDopplerAngle=False)[source]#
Bases:
objectLayered algorithm defaults used by
Radar.- Parameters:
fft (FFTConfig)
cfar (CFARConfig)
doa (DoAConfig)
pointCloud (PointCloudConfig)
clustering (ClusteringConfig)
tracking (TrackingConfig)
retainRangeDoppler (bool)
retainRangeAngle (bool)
retainRangeDopplerAngle (bool)
- cfar: CFARConfig#
- pointCloud: PointCloudConfig#
- clustering: ClusteringConfig#
- tracking: TrackingConfig#
- class pyradar.base.Radar(waveform, sampler, transceivers, mimo, calibration=<factory>, processing=<factory>, name='radar')[source]#
Bases:
objectValidated radar aggregate used as the context for all algorithms.
- Parameters:
waveform (FMCW)
sampler (Sampler)
transceivers (Transceivers)
mimo (MIMOScheme)
calibration (Calibration)
processing (ProcessingConfig)
name (str)
- transceivers: Transceivers#
- mimo: MIMOScheme#
- calibration: Calibration#
- processing: ProcessingConfig#
- property virtualArray: NDArray[float64]#
- property rangeBinIndices: NDArray[int64]#
- property rangeAxis: NDArray[float64]#
- property velocityAxis: NDArray[float64]#
- property azimuthAxis: NDArray[float64]#
- property elevationAxis: NDArray[float64]#
- simulate(targets, **kwargs)[source]#
Synthesize canonical ADC samples using this radar model.
The import is intentionally local so the physical model remains usable without loading optional simulation backends.
- Parameters:
targets (PointTarget | Sequence[PointTarget] | TargetScene)
kwargs (Any)
- Return type:
- class pyradar.base.RadarCube(data, dims, stage, radar=None, coords=<factory>, metadata=<factory>)[source]#
Bases:
objectAn ndarray with named dimensions, coordinates, and processing stage.
- Parameters:
- data: NDArray[Any]#
- dims: AxisOrder#
- class pyradar.base.SIMO(numRx)[source]#
Bases:
MIMOSchemeSingle-transmitter acquisition.
- Parameters:
numRx (int)
- class pyradar.base.Sampler(numSamples, numLoops, sampleRate, bitDepth=16, complexSampling=True, framePeriod=None)[source]#
Bases:
objectADC sampling and frame configuration.
Parameters are the samples captured per emission and the number of MIMO loops in one frame. Complex IQ sampling is the default for mmWave radars.
- Parameters:
- class pyradar.base.TDM(numTx, numRx, txOrder=(), emissionTimeOffsets=(), cyclePeriod=None)[source]#
Bases:
MIMOSchemeTime-division MIMO with arbitrary TX order and emission timing.
- Parameters:
- class pyradar.base.TI2243CascadeRadar(waveform, sampler, transceivers, mimo, calibration=<factory>, processing=<factory>, name='radar', hardware='TI AWR2243 4-chip cascade', profileName='custom')[source]#
Bases:
RadarA TI AWR2243 four-chip cascade with a concrete capture profile.
- Parameters:
waveform (FMCW)
sampler (Sampler)
transceivers (Transceivers)
mimo (MIMOScheme)
calibration (Calibration)
processing (ProcessingConfig)
name (str)
hardware (str)
profileName (str)
- classmethod radelft()[source]#
RaDelft capture profile using its physical chirp parameters.
- Return type:
- class pyradar.base.TrackSet(trackId, status, position, velocity, covariance, age, hits, misses)[source]#
Bases:
objectPublic snapshot of multi-target tracker state.
- Parameters:
- trackId: NDArray[int64]#
- position: NDArray[float64]#
- velocity: NDArray[float64]#
- covariance: NDArray[float64]#
- age: NDArray[int64]#
- hits: NDArray[int64]#
- misses: NDArray[int64]#
- class pyradar.base.TrackingConfig(enabled=False, dimensions=3, processNoise=2.0, measurementNoise=0.5, radialVelocityNoise=1.0, gatingThreshold=11.34, confirmationHits=3, deletionMisses=5)[source]#
Bases:
objectConstant-velocity multi-target tracking defaults.
- Parameters:
- class pyradar.base.Transceivers(txPositions, rxPositions, azimuthOnlyChannels=())[source]#
Bases:
objectTX/RX coordinates in the radar FLU frame, in meters.
FLU is right handed: x points forward, y left, and z up. Antenna arrays normally lie in the y-z plane. Virtual phase centers are formed from the TX/RX channel map supplied by a MIMO strategy.
- Parameters:
- txPositions: NDArray[float64]#
- rxPositions: NDArray[float64]#