PDE models¶
sies.pde.conductivity ¶
The conductivity problem in free space.
The potential \(u\) solves
$$ \nabla \cdot (\rho_D \nabla u) = 0 \quad \text{in } \mathbb{R}^2 \setminus {x_s}, \qquad u - G(\cdot - x_s) = O(|x|^{-1}), $$ where \(\rho_D = 1 + \sum_l (k_l - 1) \chi_{D_l}\) and \(k_l = \sigma_l + i \omega \epsilon_l\). The Multi-Static Response (MSR) matrix collects the perturbations \(u - G\) measured at the receivers; it is simulated here through a boundary integral representation, and inverted for the CGPT of the inclusions.
Reference: Ammari et al., Target identification using dictionary matching of generalized polarization tensors, FoCM (2014).
MSRData
dataclass
¶
MSRData(msr, freqs, msr_noisy=list(), noise_sigma=list())
Multi-static response data, possibly at several frequencies.
Attributes:
| Name | Type | Description |
|---|---|---|
msr |
list of ndarray
|
One MSR matrix of shape |
freqs |
list of float
|
Working frequencies. |
msr_noisy |
list of ndarray
|
Noisy version of |
noise_sigma |
list of float
|
Standard deviation of the noise added at each frequency. |
ReconstructionResult
dataclass
¶
ReconstructionResult(cgpt, residual, relative_residual, source_matrix, receiver_matrix)
Result of a CGPT reconstruction.
Attributes:
| Name | Type | Description |
|---|---|---|
cgpt |
list of ndarray
|
Reconstructed CGPT matrix at each frequency. |
residual |
list of float
|
Norm of the data misfit at each frequency. |
relative_residual |
list of float
|
Data misfit relative to the data norm. |
source_matrix |
ndarray
|
Linear operator |
receiver_matrix |
ndarray
|
Linear operator |
ConductivityR2 ¶
ConductivityR2(inclusions, cnd, pmtt, cfg)
Conductivity problem with small inclusions in free space.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
inclusions
|
C2Boundary or list of C2Boundary
|
Mutually disjoint inclusions, all discretized with the same number of boundary points. |
required |
cnd
|
array_like
|
Conductivity of each inclusion (positive, different from one). |
required |
pmtt
|
array_like
|
Permittivity of each inclusion (nonnegative). |
required |
cfg
|
AcquisitionConfig
|
Geometry of sources and receivers. |
required |
Attributes:
| Name | Type | Description |
|---|---|---|
inclusions |
list of C2Boundary
|
The inclusions. |
cnd, pmtt |
ndarray
|
Material constants. |
cfg |
AcquisitionConfig
|
The acquisition configuration. |
Source code in src/sies/pde/conductivity.py
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 | |
simulate_data ¶
simulate_data(freqs=0.0)
Simulate the MSR matrices at the given frequencies.
The perturbation measured by a receiver is represented as a sum of single layer potentials, \(u - G = \sum_l S_{D_l}[\phi_l]\).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
freqs
|
float or list of float
|
Working frequencies. |
0.0
|
Returns:
| Type | Description |
|---|---|
MSRData
|
The simulated data. |
Source code in src/sies/pde/conductivity.py
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 | |
add_white_noise
staticmethod
¶
add_white_noise(data, level, rng=None)
Add white noise to simulated MSR data.
The real and imaginary parts are corrupted independently, source by source.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
MSRData
|
Simulated data. |
required |
level
|
float
|
Noise level (e.g. |
required |
rng
|
Generator
|
Random generator, for reproducibility. |
None
|
Returns:
| Type | Description |
|---|---|
MSRData
|
A new data object with the |
Source code in src/sies/pde/conductivity.py
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 | |
make_matrix_a
staticmethod
¶
make_matrix_a(points, center, order)
Acquisition matrix of the linearized CGPT forward model.
Row i contains the coefficients
\([\cos(m\theta_i), \sin(m\theta_i)] / (2\pi m R_i^m)\)
for m = 1..order, where \((R_i, \theta_i)\) are the
polar coordinates of the i-th point relative to center.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
points
|
(ndarray, shape(2, n))
|
Coordinates of the sources or receivers. |
required |
center
|
(ndarray, shape(2))
|
Reference center. |
required |
order
|
int
|
Maximum CGPT order. |
required |
Returns:
| Type | Description |
|---|---|
(ndarray, shape(n, 2 * order))
|
The acquisition matrix. |
Source code in src/sies/pde/conductivity.py
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 277 278 279 280 | |
make_linear_operator ¶
make_linear_operator(order)
Build the matrices of the forward model MSR = As CGPT Ar^T.
Only single-group (full or sparse view) configurations are supported.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
order
|
int
|
Maximum CGPT order. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
source_matrix |
(ndarray, shape(nb_sources, 2 * order))
|
Matrix |
receiver_matrix |
(ndarray, shape(nb_receivers, 2 * order))
|
Matrix |
Source code in src/sies/pde/conductivity.py
282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 | |
reconstruct_cgpt ¶
reconstruct_cgpt(msr, order)
Reconstruct the CGPT from MSR data by least squares.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
msr
|
ndarray or list of ndarray
|
MSR matrix (or one matrix per frequency). |
required |
order
|
int
|
Maximum order of the reconstruction. |
required |
Returns:
| Type | Description |
|---|---|
ReconstructionResult
|
The reconstructed CGPT and residuals. |
Source code in src/sies/pde/conductivity.py
306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 | |
reconstruct_cgpt_analytic ¶
reconstruct_cgpt_analytic(msr, order)
Reconstruct the CGPT with the closed-form least-squares inverse.
For equispaced full-view circular configurations the acquisition
matrices satisfy Cs' Cs = Ns / 2 I, which yields the explicit
solution
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
msr
|
ndarray or list of ndarray
|
MSR matrix (or one matrix per frequency). |
required |
order
|
int
|
Maximum order of the reconstruction. Internally capped at
|
required |
Returns:
| Type | Description |
|---|---|
ReconstructionResult
|
The reconstructed CGPT and residuals. |
Source code in src/sies/pde/conductivity.py
324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 | |
plot ¶
plot(ax=None, **kwargs)
Plot the inclusions and the acquisition system.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ax
|
Axes
|
Axes to draw on. A new figure is created if omitted. |
None
|
**kwargs
|
Forwarded to the inclusion plot calls. |
{}
|
Returns:
| Type | Description |
|---|---|
Axes
|
The axes containing the plot. |
Source code in src/sies/pde/conductivity.py
418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 | |