POCS.py
#
Functions used for POCS interpolation script.
get_number_scales(x)
#
Compute number of shearlet scales based on input array shape.
References#
Source code in pseudo_3D_interpolation\functions\POCS.py
threshold(data, thresh, sub=0, kind='soft')
#
Apply user-defined threshold to input data (2D).
Parameters:
-
data
(ndarray
) –Input data.
-
thresh
((float, complex)
) –Threshold cut-off value.
-
sub
((int, float)
, default:0
) –Substitution value (default:
0
). -
kind
(str
, default:'soft'
) –Threshold method:
soft
(default)garrote
hard
soft-percentile
garrote-percentile
hard-percentile
Returns:
-
ndarray
–Updated input array using specified thresholding function.
Source code in pseudo_3D_interpolation\functions\POCS.py
threshold_wavelet(data, thresh, sub=0, kind='soft')
#
Apply user-defined threshold to input data (2D).
Compatible with output from pywavelet.wavedec2
(multilevel Discrete Wavelet Transform).
Parameters:
-
data
(ndarray
) –Input data.
-
thresh
((float, complex)
) –Threshold cut-off value.
-
sub
((int, float)
, default:0
) –Substitution value (default:
0
). -
kind
(str
, default:'soft'
) –Threshold method:
soft
(default)garrote
hard
soft-percentile
garrote-percentile
hard-percentile
Returns:
-
ndarray
–Updated input array using specified thresholding function.
Source code in pseudo_3D_interpolation\functions\POCS.py
get_threshold_decay(thresh_model, niter, transform_kind=None, p_max=0.99, p_min=0.001, x_fwd=None, kind='values')
#
Calculate iteration-based decay for thresholding function. Can be one of the following:
values
(based on max value in data)factors
(for usage as multiplier).
Parameters:
-
thresh_model
(str
) –Thresholding decay function.
- `linear` Gao et al. (2010) - `exponential` Yang et al. (2012), Zhang et al. (2015), Zhao et al. (2021) - `data-driven` Gao et al. (2013) - `inverse_proportional` Ge et al. (2015)
-
niter
(int
) –Maximum number of iterations.
-
transform_kind
(str
, default:None
) –Name of the specified transform (e.g. FFT, WAVELET, SHEARLET, CURVELET).
-
p_max
(float
, default:0.99
) –Maximum regularization percentage (float).
-
p_min
((float, str)
, default:0.001
) –Minimum regularization percentage (float) or 'adaptive': adaptive calculation of minimum threshold according to sparse coefficient.
-
x_fwd
(ndarray
, default:None
) –Forward transformed input data (required for thresh_model=
data-driven
and kind=values
). -
kind
(str
, default:'values'
) –Return either data
values
or multiplicationfactors
.
Returns:
-
tau
(ndarray
) –Array of decay values or factors (based on "kind" paramter).
References#
-
Gao, J.-J., Chen, X.-H., Li, J.-Y., Liu, G.-C., & Ma, J. (2010). Irregular seismic data reconstruction based on exponential threshold model of POCS method. Applied Geophysics, 7(3), 229–238. https://doi.org/10.1007/s11770-010-0246-5 ↩
-
Yang, P., Gao, J., & Chen, W. (2012). Curvelet-based POCS interpolation of nonuniformly sampled seismic records. Journal of Applied Geophysics, 79, 90–99. https://doi.org/10.1016/j.jappgeo.2011.12.004 ↩
-
Zhang, H., Chen, X., & Li, H. (2015). 3D seismic data reconstruction based on complex-valued curvelet transform in frequency domain. Journal of Applied Geophysics, 113, 64–73. https://doi.org/10.1016/j.jappgeo.2014.12.004 ↩
-
Zhao, H., Yang, T., Ni, Y.-D., Liu, X.-G., Xu, Y.-P., Zhang, Y.-L., & Zhang, G.-R. (2021). Reconstruction method of irregular seismic data with adaptive thresholds based on different sparse transform bases. Applied Geophysics, 18(3), 345–360. https://doi.org/10.1007/s11770-021-0903-5 ↩
-
Gao, J., Stanton, A., Naghizadeh, M., Sacchi, M. D., & Chen, X. (2013). Convergence improvement and noise attenuation considerations for beyond alias projection onto convex sets reconstruction. Geophysical Prospecting, 61, 138–151. https://doi.org/10.1111/j.1365-2478.2012.01103.x ↩
-
Ge, Z.-J., Li, J.-Y., Pan, S.-L., & Chen, X.-H. (2015). A fast-convergence POCS seismic denoising and reconstruction method. Applied Geophysics, 12(2), 169–178. https://doi.org/10.1007/s11770-015-0485-1 ↩
Source code in pseudo_3D_interpolation\functions\POCS.py
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 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 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 |
|
POCS_algorithm(x, mask, auxiliary_data=None, transform=None, itransform=None, transform_kind=None, niter=50, thresh_op='hard', thresh_model='exponential', eps=1e-09, alpha=1.0, p_max=0.99, p_min=1e-05, sqrt_decay=False, decay_kind='values', verbose=False, version='regular', results_dict=None, path_results=None)
#
Interpolate sparse input grid using Point Onto Convex Sets (POCS) algorithm. Applying a user-specified transform method:
FFT
Wavelet
Shearlet
Curvelet
Parameters:
-
x
(ndarray
) –Sparse input data (2D).
-
mask
(ndarray
) –Boolean mask of input data (
1
: data cell,0
: nodata cell). -
auxiliary_data
–Auxiliary data only required by
shearlet
transform. -
transform
(callable
, default:None
) –Forward transform to apply.
-
itransform
(callable
, default:None
) –Inverse transform to apply.
-
transform_kind
(str
, default:None
) –Name of the specified transform.
-
niter
(int
, default:50
) –Maximum number of iterations (default:
50
). -
thresh_op
(str
, default:'hard'
) –Threshold operator (default:
soft
). -
thresh_model
(str
, default:'exponential'
) –Thresholding decay function.
- `linear` Gao et al. (2010) - `exponential` Yang et al. (2012), Zhang et al. (2015), Zhao et al. (2021) - `data-driven` Gao et al. (2013) - `inverse_proportional` Ge et al. (2015)
-
eps
(float
, default:1e-09
) –Covergence threshold (default:
1e-9
). -
alpha
(float
, default:1.0
) –Weighting factor to scale re-insertion of input data (default:
1.0
). -
sqrt_decay
(bool
, default:False
) –Use squared decay values for thresholding (default:
False
). -
decay_kind
(str
, default:'values'
) –Return either data "values" or multiplication "factors".
-
verbose
(bool
, default:False
) –Print information about iteration steps (default:
False
). -
version
(str
, default:'regular'
) –Version of POCS algorithm. One of the following:
- `regular` Abma and Kabir (2006), Yang et al. (2012) - `fast` Yang et al. (2013), Gan et al (2015) - `adaptive` Wang et al. (2015, 2016)
-
results_dict
(dict
, default:None
) –If provided: return dict with total iterations, runtime (in seconds) and cost function.
Returns:
-
x_inv
(ndarray
) –Reconstructed (i.e. interpolated) input data.
References#
-
Gao, J.-J., Chen, X.-H., Li, J.-Y., Liu, G.-C., & Ma, J. (2010). Irregular seismic data reconstruction based on exponential threshold model of POCS method. Applied Geophysics, 7(3), 229–238. https://doi.org/10.1007/s11770-010-0246-5 ↩
-
Yang, P., Gao, J., & Chen, W. (2012). Curvelet-based POCS interpolation of nonuniformly sampled seismic records. Journal of Applied Geophysics, 79, 90–99. https://doi.org/10.1016/j.jappgeo.2011.12.004 ↩
-
Zhang, H., Chen, X., & Li, H. (2015). 3D seismic data reconstruction based on complex-valued curvelet transform in frequency domain. Journal of Applied Geophysics, 113, 64–73. https://doi.org/10.1016/j.jappgeo.2014.12.004 ↩
-
Zhao, H., Yang, T., Ni, Y.-D., Liu, X.-G., Xu, Y.-P., Zhang, Y.-L., & Zhang, G.-R. (2021). Reconstruction method of irregular seismic data with adaptive thresholds based on different sparse transform bases. Applied Geophysics, 18(3), 345–360. https://doi.org/10.1007/s11770-021-0903-5 ↩
-
Gao, J., Stanton, A., Naghizadeh, M., Sacchi, M. D., & Chen, X. (2013). Convergence improvement and noise attenuation considerations for beyond alias projection onto convex sets reconstruction. Geophysical Prospecting, 61, 138–151. https://doi.org/10.1111/j.1365-2478.2012.01103.x ↩
-
Ge, Z.-J., Li, J.-Y., Pan, S.-L., & Chen, X.-H. (2015). A fast-convergence POCS seismic denoising and reconstruction method. Applied Geophysics, 12(2), 169–178. https://doi.org/10.1007/s11770-015-0485-1 ↩
-
Abma, R., & Kabir, N. (2006). 3D interpolation of irregular data with a POCS algorithm. Geophysics, 71(6), E91–E97. https://doi.org/10.1190/1.2356088 ↩
-
Yang, P., Gao, J., & Chen, W. (2013) On analysis-based two-step interpolation methods for randomly sampled seismic data. Computers & Geosciences, 51, 449–461. https://doi.org/10.1016/j.cageo.2012.07.023 ↩
-
Gan, S., Wang, S., Chen, Y., Zhang, Y., & Jin, Z. (2015). Dealiased Seismic Data Interpolation Using Seislet Transform With Low-Frequency Constraint. IEEE Geoscience and Remote Sensing Letters, 12(10), 2150–2154. https://doi.org/10.1109/LGRS.2015.2453119 ↩
-
Wang, B., Wu, R.-S., Chen, X., & Li, J. (2015). Simultaneous seismic data interpolation and denoising with a new adaptive method based on dreamlet transform. Geophysical Journal International, 201(2), 1182–1194. https://doi.org/10.1093/gji/ggv072 ↩
-
Wang, B., Chen, X., Li, J., & Cao, J. (2016). An Improved Weighted Projection Onto Convex Sets Method for Seismic Data Interpolation and Denoising. IEEE Journal of Selected Topics in Applied Earth Observations and Remote Sensing, 9(1), 228–235. https://doi.org/10.1109/jstars.2015.2496374 ↩
Source code in pseudo_3D_interpolation\functions\POCS.py
371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 |
|