aaa ¤
AAA (Adaptive Antoulas-Anderson) rational approximation.
Implements the AAA algorithm (Nakatsukasa, Sète, Trefethen 2018) as an alternative pole-finding stage compatible with the Circulax fitting infrastructure.
References
Nakatsukasa, Y., Sète, O., & Trefethen, L. N. (2018). The AAA algorithm for rational approximation. SIAM Journal on Scientific Computing, 40(3), A1494-A1522.
Functions:
| Name | Description |
|---|---|
aaa_driver | Fit bigH(s) using AAA rational approximation for pole finding. |
aaa_scalar | Discover AAA support with either backend, returning compact NumPy arrays. |
aaa_driver ¤
aaa_driver(
bigH: ndarray,
s: ndarray,
opts: FitOptions,
tol: float = 1e-10,
mmax: int = 100,
verbose: bool = True,
) -> tuple[VFModel, SSModel, float, ndarray]
Fit bigH(s) using AAA rational approximation for pole finding.
Replaces the VF pole-finding phase with AAA applied to each diagonal element. The poles found are then used with the standard residue identification step.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
bigH | ndarray | (Nc, Nc, Ns) complex — frequency-domain matrix data. | required |
s | ndarray | (Ns,) complex — frequency points (= j*omega). | required |
opts | FitOptions | FitOptions — asymp and weightparam are used; N is ignored. | required |
tol | float | AAA convergence tolerance (per diagonal element). | 1e-10 |
mmax | int | maximum AAA support points per diagonal element. | 100 |
verbose | bool | print progress. | True |
Returns:
| Name | Type | Description |
|---|---|---|
model | VFModel | VFModel — fitted pole-residue model. |
ss | SSModel | SSModel — state-space form. |
rmserr | float | float — final RMS fitting error. |
bigHfit | ndarray | (Nc, Nc, Ns) — reconstructed frequency response. |
Source code in circulax/fitting/aaa.py
161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 | |
aaa_scalar ¤
Discover AAA support with either backend, returning compact NumPy arrays.
Use aaa_scalar_jax directly for padded device arrays and batching. This wrapper is the explicit host boundary before SciPy pole extraction.