Projection
gwmock_signal.projection
¶
Projection of GW polarizations onto detector networks.
project_polarizations_to_network(polarizations, detector_names, *, right_ascension, declination, polarization_angle, earth_rotation=True, precess_source_direction=False, backend='numpy', sinc_taps=DEFAULT_SINC_TAPS, kaiser_beta=DEFAULT_KAISER_BETA)
¶
Project tensor plus/cross strains onto detectors using detector geometry.
Built-in and custom detector codes are resolved through the LAL cached
detector registry. For earth_rotation=False, the constant
geocenter->detector delay is applied via an exact frequency-domain phase
shift (h(t-tau) <-> H(f)*exp(-2*pi*i*f*tau)), which is lossless at all
frequencies. For earth_rotation=True, the polarizations are resampled at the
time-dependent delayed times with the Kaiser-windowed sinc kernel in
:mod:gwmock_signal.projection.resampling, gathered from a zero-padded copy so kernel
taps reaching past either end read zero rather than repeating the endpoint.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
polarizations
|
Mapping[str, TimeSeries]
|
Mapping containing |
required |
detector_names
|
Sequence[DetectorSpec]
|
Sequence of IFO codes (e.g. |
required |
right_ascension
|
float
|
Source right ascension in radians. |
required |
declination
|
float
|
Source declination in radians. |
required |
polarization_angle
|
float
|
Polarization angle psi in radians (tensor modes). |
required |
earth_rotation
|
bool
|
If |
True
|
precess_source_direction
|
bool
|
Whether to rotate
This is therefore a property of the generator, not of the projection, which is why it is
an explicit argument with no clever default: see
:func: |
False
|
backend
|
str
|
Which implementation evaluates the |
'numpy'
|
sinc_taps
|
int
|
Taps in the band-limited resampling kernel used by the
|
DEFAULT_SINC_TAPS
|
kaiser_beta
|
float
|
Kaiser window shape parameter for that kernel. |
DEFAULT_KAISER_BETA
|
Returns:
| Type | Description |
|---|---|
dict[str, TimeSeries]
|
Mapping from each detector name to the projected strain as a GWpy time |
dict[str, TimeSeries]
|
series (same length and sample rate as the inputs). |
Raises:
| Type | Description |
|---|---|
TypeError
|
If |
ValueError
|
If keys are missing, time grids disagree, a detector name is not
recognized, |
Source code in src/gwmock_signal/projection/network.py
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 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 | |
validate_projection_backend(value, *, parameter='backend')
¶
Return value if it names a projection implementation, else raise.
Shared so the name is checked identically wherever it is accepted -- this function, and the simulators that take it at construction time and only reach the projection later. Checking it in each place separately is how one of them ends up accepting a name the projection does not.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
str
|
The candidate backend name. |
required |
parameter
|
str
|
What to call it in the error message, since callers spell the argument
differently ( |
'backend'
|
Returns:
| Type | Description |
|---|---|
str
|
value unchanged. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If value is not one of :data: |
Source code in src/gwmock_signal/projection/network.py
236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 | |
For usage examples, see the User guide — Detector projection examples.