MATLAB-to-pytcl migration map
The explicit function mappings and calling-convention differences between the MATLAB Tracker Component Library and pytcl. Companion to MATLAB TCL parity inventory, which says what is ported; this says how to call it.
Every pytcl target in the tables below was resolved by import when the tables were generated — none is asserted from memory. Signature examples are quoted from the sources of both libraries.
Calling conventions
Naming. MATLAB camelCase becomes snake_case. Families rename
systematically: Kalman* → kf_*, disc*Pred → *_predict,
*Update → *_update, calc*/get* prefixes are dropped, and the
MATLAB distribution-class suffix D disappears (GaussianD →
Gaussian).
Argument order is not preserved — check every call. The canonical trap:
MATLAB: [xUpdate,PUpdate,innov,Pzz,W] = KalmanUpdate(xPred,PPred,z,R,H)
pytcl: kf_update(x, P, z, H, R) -> KalmanUpdate(x, P, y, S, K, likelihood)
MATLAB puts R before H and makes H optional; pytcl puts H
before R and requires both. For a square measurement model a transposed
call runs without error and produces garbage.
Return values. MATLAB multiple outputs become NamedTuples, with renames:
innov → y, Pzz → S, W (gain) → K. Access by field
name; unpacking by position reproduces the MATLAB order only where documented.
Array layout. MATLAB states are xDim×1 column vectors and point sets
are one column per point. pytcl filters take 1-D arrays for single states and
(N, dim) row-per-item arrays for batches (including the GPU batch API).
The coordinate-conversion functions are the exception: they accept the
MATLAB-style (3, n) column layout directly, plus (3,) and (n, 3)
with automatic transposition.
Indexing and sentinels. MATLAB is 1-based and marks unassigned rows with
0 in its assignment vectors (col4row). pytcl is 0-based and returns
explicit pairs plus explicit absence:
MATLAB: col4row = [1; 2; 0] % row 3 unassigned
pytcl: Assignment2DResult(row_indices=[0, 1], col_indices=[0, 1],
cost=..., unassigned_rows=[2], unassigned_cols=[])
Units. Both libraries use radians and SI units at API boundaries. No degree/radian conversion is needed when porting call sites.
Time arguments. MATLAB TCL passes two-part Julian dates (Jul1, Jul2)
for precision; pytcl time functions take a single float Julian date. Expect
~4e-5 s quantization at contemporary epochs, which matters only for
sub-millisecond timing work.
Optional arguments. MATLAB skips optionals positionally with [];
pytcl uses keywords. MATLAB variant selectors that were separate arguments
(systemType integers) become string keywords (system_type='az-el'),
and MATLAB features absent from a pytcl signature — e.g. the bistatic
zTx/zRx arguments of Cart2Sphere — are unported, not renamed.
Function mappings
Curated mappings cover the systematic renames; same-name matches are listed for completeness. Absence from these tables means no counterpart exists — see MATLAB TCL parity inventory for the per-area accounting of what is unported.
Assignment Algorithms
MATLAB |
pytcl |
|---|---|
|
|
|
|
|
|
|
|
|
|
Astronomical Code
MATLAB |
pytcl |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
Clustering and Mixture Reduction
MATLAB |
pytcl |
|---|---|
|
|
|
|
|
|
Container Classes
MATLAB |
pytcl |
|---|---|
|
|
|
|
|
|
Coordinate Systems
MATLAB |
pytcl |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Dynamic Estimation
MATLAB |
pytcl |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Dynamic Models
MATLAB |
pytcl |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
Gravity
MATLAB |
pytcl |
|---|---|
|
|
|
|
Magnetism
MATLAB |
pytcl |
|---|---|
|
|
|
|
Mathematical Functions
MATLAB |
pytcl |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Performance Evaluation
MATLAB |
pytcl |
|---|---|
|
|
|
|
Static Estimation
MATLAB |
pytcl |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|