Simulation Tools
TOAST contains a variety of Operators and other tools for simulating telescope observations and different detector signals.
Simulated Observing
When designing new telescopes or observing strategies the TOAST scheduler can be used to
create schedule files that can be passed to the SimGround
and SimSatellite
operators.
Ground-Based Schedules
Sky Patches
To-Do
We can't add docs for the patch types, because they have no docstrings...
Scheduling Utilities
To-Do
Do we want more of the low-level tools here?
toast.schedule_sim_ground.parse_patches(args, observer, sun, moon, start_timestamp, stop_timestamp)
Source code in toast/schedule_sim_ground.py
3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 |
|
toast.schedule_sim_ground.build_schedule(args, start_timestamp, stop_timestamp, patches, observer, sun, moon)
Source code in toast/schedule_sim_ground.py
2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 |
|
Generating the Schedule
toast.schedule_sim_ground.run_scheduler(opts=None)
Source code in toast/schedule_sim_ground.py
3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 |
|
Space-Based Schedules
Generating schedules for a satellite is conceptually simpler due to the constraints on spacecraft dynamics.
toast.schedule_sim_satellite.create_satellite_schedule(prefix='', mission_start=None, observation_time=10 * u.minute, gap_time=0 * u.minute, num_observations=1, prec_period=10 * u.minute, spin_period=2 * u.minute, site_name='space', telescope_name='satellite')
Generate a satellite observing schedule.
This creates a series of scans with identical lengths and rotation rates, as well as optional gaps between.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
prefix
|
str
|
The prefix for the name of each scan. |
''
|
mission_start
|
datetime
|
The overall start time of the schedule. |
None
|
observation_time
|
Quantity
|
The length of each observation. |
10 * minute
|
gap_time
|
Quantity
|
The time between observations. |
0 * minute
|
num_observations
|
int
|
The number of observations. |
1
|
prec_period
|
Quantity
|
The time for one revolution about the precession axis. |
10 * minute
|
spin_period
|
Quantity
|
The time for one revolution about the spin axis. |
2 * minute
|
site_name
|
str
|
The name of the site to include in the schedule. |
'space'
|
telescope_name
|
str
|
The name of the telescope to include in the schedule. |
'satellite'
|
Returns:
Type | Description |
---|---|
SatelliteSchedule
|
The resulting schedule. |
Source code in toast/schedule_sim_satellite.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
|
Creating Observations
toast.ops.SimGround
Bases: Operator
Simulate a generic ground-based telescope scanning.
This simulates ground-based pointing in constant elevation scans for a telescope located at a particular site and using an pre-created schedule.
The created observations define several interval lists to describe regions where the telescope is scanning left, right or in a turnaround or El-nod. A shared flag array is also created with bits sets for these same properties.
Source code in toast/ops/sim_ground.py
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 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 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 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 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 369 370 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 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 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 |
|
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
azimuth = Unicode(defaults.azimuth, help='Observation shared key for Azimuth')
class-attribute
instance-attribute
boresight_azel = Unicode(defaults.boresight_azel, help='Observation shared key for boresight AZ/EL')
class-attribute
instance-attribute
boresight_radec = Unicode(defaults.boresight_radec, help='Observation shared key for boresight RA/DEC')
class-attribute
instance-attribute
det_data = Unicode(defaults.det_data, allow_none=True, help='Observation detdata key to initialize')
class-attribute
instance-attribute
det_data_units = Unit(defaults.det_data_units, help='Output units if creating detector data')
class-attribute
instance-attribute
det_flags = Unicode(defaults.det_flags, allow_none=True, help='Observation detdata key for flags to initialize')
class-attribute
instance-attribute
detset_key = Unicode(None, allow_none=True, help='If specified, use this column of the focalplane detector_data to group detectors')
class-attribute
instance-attribute
distribute_time = Bool(False, help='Distribute observation data along the time axis rather than detector axis')
class-attribute
instance-attribute
el_mod_amplitude = Quantity(1.0 * u.degree, help='Range of elevation modulation')
class-attribute
instance-attribute
el_mod_rate = Quantity(0.0 * u.Hz, help='Modulate elevation continuously at this rate')
class-attribute
instance-attribute
el_mod_sine = Bool(False, help='Modulate elevation with a sine wave instead of a triangle wave')
class-attribute
instance-attribute
el_mod_step = Quantity(0.0 * u.degree, help='Amount to step elevation after each left-right scan pair')
class-attribute
instance-attribute
elevation = Unicode(defaults.elevation, help='Observation shared key for Elevation')
class-attribute
instance-attribute
elnod_end = Bool(False, help='Perform an el-nod after the scan')
class-attribute
instance-attribute
elnod_every_scan = Bool(False, help='Perform el nods every scan')
class-attribute
instance-attribute
elnod_interval = Unicode(defaults.elnod_interval, help='Interval name for elnods')
class-attribute
instance-attribute
elnod_mask = Int(defaults.shared_mask_irregular, help='Bit mask to raise elevation nod flags with')
class-attribute
instance-attribute
elnod_start = Bool(False, help='Perform an el-nod before the scan')
class-attribute
instance-attribute
elnods = List([], help='List of relative el_nods')
class-attribute
instance-attribute
fix_rate_on_sky = Bool(True, help='If True, `scan_rate_az` is given in sky coordinates and azimuthal rate on mount will be adjusted to meet it. If False, `scan_rate_az` is used as the mount azimuthal rate.')
class-attribute
instance-attribute
hwp_angle = Unicode(None, allow_none=True, help='Observation shared key for HWP angle')
class-attribute
instance-attribute
hwp_rpm = Float(None, allow_none=True, help='The rate (in RPM) of the HWP rotation')
class-attribute
instance-attribute
hwp_step = Quantity(None, allow_none=True, help='For stepped HWP, the angle of each step')
class-attribute
instance-attribute
hwp_step_time = Quantity(None, allow_none=True, help='For stepped HWP, the time between steps')
class-attribute
instance-attribute
max_pwv = Quantity(None, allow_none=True, help='Maximum PWV for the simulated weather.')
class-attribute
instance-attribute
median_weather = Bool(False, help='Use median weather parameters instead of sampling from the distributions')
class-attribute
instance-attribute
position = Unicode(defaults.position, help='Observation shared key for position')
class-attribute
instance-attribute
randomize_phase = Bool(False, help='If True, the Constant Elevation Scan will begin at a randomized phase.')
class-attribute
instance-attribute
realization = Int(0, help='The realization index')
class-attribute
instance-attribute
scan_accel_az = Quantity(1.0 * u.degree / u.second ** 2, help='Mount scanning rate acceleration for turnarounds')
class-attribute
instance-attribute
scan_accel_el = Quantity(1.0 * u.degree / u.second ** 2, allow_none=True, help='Mount elevation rate acceleration.')
class-attribute
instance-attribute
scan_cosecant_modulation = Bool(False, help='Modulate the scan rate according to 1/sin(az) for uniform depth')
class-attribute
instance-attribute
scan_leftright_interval = Unicode(defaults.scan_leftright_interval, help='Interval name for left to right scans')
class-attribute
instance-attribute
scan_rate_az = Quantity(1.0 * u.degree / u.second, help='The sky or mount azimuth scanning rate. See `fix_rate_on_sky`')
class-attribute
instance-attribute
scan_rate_el = Quantity(1.0 * u.degree / u.second, allow_none=True, help='The sky elevation scanning rate')
class-attribute
instance-attribute
scan_rightleft_interval = Unicode(defaults.scan_rightleft_interval, help='Interval name for right to left scans')
class-attribute
instance-attribute
scanning_interval = Unicode(defaults.scanning_interval, help='Interval name for scanning')
class-attribute
instance-attribute
schedule = Instance(klass=GroundSchedule, allow_none=True, help='Instance of a GroundSchedule')
class-attribute
instance-attribute
session_split_key = Unicode(None, allow_none=True, help='Focalplane key for splitting into observations')
class-attribute
instance-attribute
shared_flags = Unicode(defaults.shared_flags, allow_none=True, help='Observation shared key for common flags')
class-attribute
instance-attribute
sun_angle_min = Quantity(90.0 * u.degree, help='Minimum angular distance for the scan and the Sun')
class-attribute
instance-attribute
sun_close_distance = Quantity(45.0 * u.degree, help="'Sun close' flagging distance")
class-attribute
instance-attribute
sun_close_interval = Unicode(defaults.sun_close_interval, help='Interval name for times when the sun is close')
class-attribute
instance-attribute
sun_close_mask = Int(defaults.shared_mask_sun_close, help='Bit mask to raise Sun close flags with')
class-attribute
instance-attribute
sun_up_interval = Unicode(defaults.sun_up_interval, help='Interval name for times when the sun is up')
class-attribute
instance-attribute
sun_up_mask = Int(defaults.shared_mask_sun_up, help='Bit mask to raise Sun up flags with')
class-attribute
instance-attribute
telescope = Instance(klass=Telescope, allow_none=True, help='This must be an instance of a Telescope')
class-attribute
instance-attribute
throw_interval = Unicode(defaults.throw_interval, help='Interval name for scan + turnaround intervals')
class-attribute
instance-attribute
throw_leftright_interval = Unicode(defaults.throw_leftright_interval, help='Interval name for left to right scans + turnarounds')
class-attribute
instance-attribute
throw_rightleft_interval = Unicode(defaults.throw_rightleft_interval, help='Interval name for right to left scans + turnarounds')
class-attribute
instance-attribute
times = Unicode(defaults.times, help='Observation shared key for timestamps')
class-attribute
instance-attribute
track_azimuth = Bool(False, help='If True, the azimuth throw is continually adjusted to center the field.')
class-attribute
instance-attribute
turn_leftright_interval = Unicode(defaults.turn_leftright_interval, help='Interval name for turnarounds after left to right scans')
class-attribute
instance-attribute
turn_rightleft_interval = Unicode(defaults.turn_rightleft_interval, help='Interval name for turnarounds after right to left scans')
class-attribute
instance-attribute
turnaround_interval = Unicode(defaults.turnaround_interval, help='Interval name for turnarounds')
class-attribute
instance-attribute
turnaround_mask = Int(defaults.shared_mask_unstable_scanrate, help='Bit mask to raise turnaround flags with')
class-attribute
instance-attribute
use_ephem = Bool(True, help='Use PyEphem to convert between horizontal and equatorial systems')
class-attribute
instance-attribute
use_qpoint = Bool(False, help='Use qpoint to convert between horizontal and equatorial systems')
class-attribute
instance-attribute
velocity = Unicode(defaults.velocity, help='Observation shared key for velocity')
class-attribute
instance-attribute
weather = Unicode(None, allow_none=True, help="Name of built-in weather site (e.g. 'atacama', 'south_pole') or path to HDF5 file")
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/ops/sim_ground.py
405 406 |
|
_check_hwp_angle(proposal)
Source code in toast/ops/sim_ground.py
362 363 364 365 366 367 368 369 370 371 372 373 |
|
_check_hwp_rpm(proposal)
Source code in toast/ops/sim_ground.py
375 376 377 378 379 380 381 382 383 384 385 386 387 388 |
|
_check_hwp_step(proposal)
Source code in toast/ops/sim_ground.py
390 391 392 393 394 395 396 397 398 399 400 401 402 403 |
|
_check_schedule(proposal)
Source code in toast/ops/sim_ground.py
350 351 352 353 354 355 356 357 358 |
|
_check_telescope(proposal)
Source code in toast/ops/sim_ground.py
318 319 320 321 322 323 324 325 326 327 328 |
|
_check_use_ephem(proposal)
Source code in toast/ops/sim_ground.py
330 331 332 333 334 335 336 |
|
_check_use_qpoint(proposal)
Source code in toast/ops/sim_ground.py
338 339 340 341 342 343 344 345 346 347 348 |
|
_exec(data, detectors=None, **kwargs)
Source code in toast/ops/sim_ground.py
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 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 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 |
|
_finalize(data, **kwargs)
Source code in toast/ops/sim_ground.py
1142 1143 |
|
_obs_telescopes(data, det_ranks, detectors)
Split our session telescope by focalplane key.
Source code in toast/ops/sim_ground.py
1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 |
|
_provides()
Source code in toast/ops/sim_ground.py
1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 |
|
_requires()
Source code in toast/ops/sim_ground.py
1145 1146 |
|
_simulate_scanning(site, scan, n_samples, rate, comm, samp_ranks)
Simulate the boresight Az/El pointing for one session.
Source code in toast/ops/sim_ground.py
811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 |
|
toast.ops.SimSatellite
Bases: Operator
Simulate a generic satellite motion.
This simulates satellite pointing in regular intervals ("science scans") that may have some gaps in between for cooler cycles or other events. The precession axis (anti-sun direction) is continuously slewed.
To be consistent with the ground simulation facilities, the satellite pointing is expressed in the ICRS (equatorial) system by default. Detector pointing expansion can rotate the output pointing to any other reference frame.
Source code in toast/ops/sim_satellite.py
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 369 370 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 |
|
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
boresight = Unicode(defaults.boresight_radec, help='Observation shared key for boresight')
class-attribute
instance-attribute
coord = Unicode('C', help="Coordinate system to use for pointing. One of ('C', 'E', 'G')")
class-attribute
instance-attribute
det_data = Unicode(defaults.det_data, allow_none=True, help='Observation detdata key to initialize')
class-attribute
instance-attribute
det_data_units = Unit(defaults.det_data_units, help='Output units if creating detector data')
class-attribute
instance-attribute
det_flags = Unicode(defaults.det_flags, allow_none=True, help='Observation detdata key for flags to initialize')
class-attribute
instance-attribute
detset_key = Unicode(None, allow_none=True, help='If specified, use this column of the focalplane detector_data to group detectors')
class-attribute
instance-attribute
distribute_time = Bool(False, help='Distribute observation data along the time axis rather than detector axis')
class-attribute
instance-attribute
hwp_angle = Unicode(None, allow_none=True, help='Observation shared key for HWP angle')
class-attribute
instance-attribute
hwp_rpm = Float(None, allow_none=True, help='The rate (in RPM) of the HWP rotation')
class-attribute
instance-attribute
hwp_step = Quantity(None, allow_none=True, help='For stepped HWP, the angle of each step')
class-attribute
instance-attribute
hwp_step_time = Quantity(None, allow_none=True, help='For stepped HWP, the time between steps')
class-attribute
instance-attribute
position = Unicode(defaults.position, help='Observation shared key for position')
class-attribute
instance-attribute
prec_angle = Quantity(65.0 * u.degree, help='The opening angle of the spin axis from the precession axis')
class-attribute
instance-attribute
schedule = Instance(klass=SatelliteSchedule, allow_none=True, help='Instance of a SatelliteSchedule')
class-attribute
instance-attribute
shared_flags = Unicode(defaults.shared_flags, allow_none=True, help='Observation shared key for common flags')
class-attribute
instance-attribute
spin_angle = Quantity(30.0 * u.degree, help='The opening angle of the boresight from the spin axis')
class-attribute
instance-attribute
telescope = Instance(klass=Telescope, allow_none=True, help='This must be an instance of a Telescope')
class-attribute
instance-attribute
times = Unicode(defaults.times, help='Observation shared key for timestamps')
class-attribute
instance-attribute
velocity = Unicode(defaults.velocity, help='Observation shared key for velocity')
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/ops/sim_satellite.py
352 353 |
|
_check_coord(proposal)
Source code in toast/ops/sim_satellite.py
279 280 281 282 283 284 285 |
|
_check_hwp_angle(proposal)
Source code in toast/ops/sim_satellite.py
309 310 311 312 313 314 315 316 317 318 319 320 |
|
_check_hwp_rpm(proposal)
Source code in toast/ops/sim_satellite.py
322 323 324 325 326 327 328 329 330 331 332 333 334 335 |
|
_check_hwp_step(proposal)
Source code in toast/ops/sim_satellite.py
337 338 339 340 341 342 343 344 345 346 347 348 349 350 |
|
_check_schedule(proposal)
Source code in toast/ops/sim_satellite.py
299 300 301 302 303 304 305 306 307 |
|
_check_telescope(proposal)
Source code in toast/ops/sim_satellite.py
287 288 289 290 291 292 293 294 295 296 297 |
|
_exec(data, detectors=None, **kwargs)
Source code in toast/ops/sim_satellite.py
367 368 369 370 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 |
|
_finalize(data, **kwargs)
Source code in toast/ops/sim_satellite.py
606 607 |
|
_get_coord_rot()
Get an optional coordinate rotation quaternion to return satellite pointing and velocity in the user-specified frame
Source code in toast/ops/sim_satellite.py
355 356 357 358 359 360 361 362 363 364 365 |
|
_provides()
Source code in toast/ops/sim_satellite.py
612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 |
|
_requires()
Source code in toast/ops/sim_satellite.py
609 610 |
|
Sky Signals
These operators generate detector data containing sources of power from outside the Earth's atmosphere.
toast.ops.SimDipole
Bases: Operator
Operator which generates dipole signal for detectors.
This uses the detector pointing, the telescope velocity vectors, and the solar system motion with respect to the CMB rest frame to compute the observed CMB dipole signal. The dipole timestream is either added (default) or subtracted from the specified detector data.
The telescope velocity and detector quaternions are assumed to be in the same coordinate system.
The "mode" trait determines what components of the telescope motion are included in the observed dipole. Valid options are 'solar' for just the solar system motion, 'orbital' for just the motion of the telescope with respect to the solarsystem barycenter, and 'total' which is the sum of both (and the default).
Source code in toast/ops/sim_tod_dipole.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 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 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 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 |
|
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
boresight = Unicode(defaults.boresight_radec, help='Observation shared key for boresight')
class-attribute
instance-attribute
cmb = Quantity(2.72548 * u.Kelvin, help='CMB monopole value')
class-attribute
instance-attribute
coord = Unicode('E', help="Valid options are 'C' (Equatorial), 'E' (Ecliptic), and 'G' (Galactic)")
class-attribute
instance-attribute
det_data = Unicode(defaults.det_data, help='Observation detdata key for accumulating dipole timestreams')
class-attribute
instance-attribute
det_data_units = Unit(defaults.det_data_units, help='Output units if creating detector data')
class-attribute
instance-attribute
freq = Quantity(0 * u.Hz, help='Optional observing frequency')
class-attribute
instance-attribute
mode = Unicode('total', help='Valid options are solar, orbital, and total')
class-attribute
instance-attribute
shared_flag_mask = Int(defaults.shared_mask_invalid, help='Bit mask value for optional flagging')
class-attribute
instance-attribute
shared_flags = Unicode(defaults.shared_flags, allow_none=True, help='Observation shared key for telescope flags to use')
class-attribute
instance-attribute
solar_gal_lat = Quantity(48.26 * u.degree, help='Galactic latitude of direction of solarsystem motion')
class-attribute
instance-attribute
solar_gal_lon = Quantity(263.99 * u.degree, help='Galactic longitude of direction of solarsystem motion')
class-attribute
instance-attribute
solar_speed = Quantity(369.0 * u.kilometer / u.second, help='Amplitude of the solarsystem barycenter velocity with respect to the CMB')
class-attribute
instance-attribute
subtract = Bool(False, help='If True, subtract the dipole timestream instead of accumulating')
class-attribute
instance-attribute
velocity = Unicode(defaults.velocity, help='Observation shared key for velocity')
class-attribute
instance-attribute
view = Unicode(None, allow_none=True, help='Use this view of the data in all observations')
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/ops/sim_tod_dipole.py
123 124 |
|
_check_coord(proposal)
Source code in toast/ops/sim_tod_dipole.py
108 109 110 111 112 113 114 |
|
_check_mode(proposal)
Source code in toast/ops/sim_tod_dipole.py
99 100 101 102 103 104 105 106 |
|
_check_shared_flag_mask(proposal)
Source code in toast/ops/sim_tod_dipole.py
116 117 118 119 120 121 |
|
_exec(data, detectors=None, **kwargs)
Source code in toast/ops/sim_tod_dipole.py
126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 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 |
|
_finalize(data, **kwargs)
Source code in toast/ops/sim_tod_dipole.py
216 217 |
|
_provides()
Source code in toast/ops/sim_tod_dipole.py
233 234 235 236 237 238 239 240 241 |
|
_requires()
Source code in toast/ops/sim_tod_dipole.py
219 220 221 222 223 224 225 226 227 228 229 230 231 |
|
Beam-Convolved Sky
toast.ops.SimConviqt
Bases: Operator
Operator which uses libconviqt to generate beam-convolved timestreams.
Source code in toast/ops/conviqt.py
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 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 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 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 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 369 370 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 657 658 659 660 661 662 663 664 665 666 667 668 669 670 |
|
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
apply_flags = Bool(False, allow_none=False, help='Only synthesize signal for unflagged samples.')
class-attribute
instance-attribute
available
property
Return True if libconviqt is found in the library search path.
beam_file = Unicode(None, allow_none=True, help='File containing the beam a_lm expansion. Tag {detector} will be replaced with the detector name.')
class-attribute
instance-attribute
beam_file_dict = Dict({}, help='Dictionary of files containing the beam a_lm expansions. An entry for each detector name must be present. If provided, supersedes `beam_file`.')
class-attribute
instance-attribute
beammmax = Int(-1, allow_none=False, help='Beam maximum m. Actual resolution in the Healpix FITS file may differ. If not set, will use the maximum expansion order from file.')
class-attribute
instance-attribute
calibrate = Bool(True, allow_none=False, help='Calibrate intensity to 1.0, rather than (1 + epsilon) / 2. Calibrate has no effect if the beam is found to be normalized rather than scaled with the leakage factor.')
class-attribute
instance-attribute
comm = Instance(klass=MPI_Comm, allow_none=True, help='MPI communicator to use for the convolution. libConviqt does not work without MPI.')
class-attribute
instance-attribute
det_data = Unicode(defaults.det_data, allow_none=False, help='Observation detdata key for accumulating convolved timestreams')
class-attribute
instance-attribute
det_data_units = Unit(defaults.det_data_units, help='Output units if creating detector data')
class-attribute
instance-attribute
det_flag_mask = Int(defaults.det_mask_invalid, help='Bit mask value for detector sample flagging')
class-attribute
instance-attribute
det_flags = Unicode(defaults.det_flags, allow_none=True, help='Observation detdata key for flags to use')
class-attribute
instance-attribute
det_mask = Int(defaults.det_mask_invalid, help='Bit mask value for per-detector flagging')
class-attribute
instance-attribute
detector_pointing = Instance(klass=Operator, allow_none=True, help='Operator that translates boresight pointing into detector frame')
class-attribute
instance-attribute
dxx = Bool(True, allow_none=False, help='The beam frame is either Dxx or Pxx. Pxx includes the rotation to polarization sensitive basis, Dxx does not. When Dxx=True, detector orientation from attitude quaternions is corrected for the polarization angle.')
class-attribute
instance-attribute
fwhm = Quantity(4.0 * u.arcmin, allow_none=False, help='Width of a symmetric gaussian beam already present in the skyfile (will be deconvolved away).')
class-attribute
instance-attribute
hwp_angle = Unicode(None, allow_none=True, help='Observation shared key for HWP angle')
class-attribute
instance-attribute
lmax = Int(-1, allow_none=False, help='Maximum ell (and m). Actual resolution in the Healpix FITS file may differ. If not set, will use the maximum expansion order from file.')
class-attribute
instance-attribute
mc = Int(None, allow_none=True, help='Monte Carlo index used in synthesizing the input file names.')
class-attribute
instance-attribute
normalize_beam = Bool(False, allow_none=False, help='Normalize beam to have unit response to temperature monopole.')
class-attribute
instance-attribute
order = Int(13, allow_none=False, help='Conviqt order parameter (expert mode)')
class-attribute
instance-attribute
pol = Bool(True, allow_none=False, help='Toggle simulated signal polarization')
class-attribute
instance-attribute
remove_dipole = Bool(False, allow_none=False, help='Suppress the temperature dipole in sky_file.')
class-attribute
instance-attribute
remove_monopole = Bool(False, allow_none=False, help='Suppress the temperature monopole in sky_file.')
class-attribute
instance-attribute
shared_flag_mask = Int(defaults.shared_mask_invalid, help='Bit mask value for optional flagging')
class-attribute
instance-attribute
shared_flags = Unicode(defaults.shared_flags, allow_none=True, help='Observation shared key for telescope flags to use')
class-attribute
instance-attribute
sky_file = Unicode(None, allow_none=True, help='File containing the sky a_lm expansion. Tag {detector} will be replaced with the detector name')
class-attribute
instance-attribute
sky_file_dict = Dict({}, help='Dictionary of files containing the sky a_lm expansions. An entry for each detector name must be present. If provided, supersedes `sky_file`.')
class-attribute
instance-attribute
verbosity = Int(0, allow_none=False, help='')
class-attribute
instance-attribute
view = Unicode(None, allow_none=True, help='Use this view of the data in all observations')
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/ops/conviqt.py
237 238 239 |
|
_check_det_flag_mask(proposal)
Source code in toast/ops/conviqt.py
230 231 232 233 234 235 |
|
_check_det_mask(proposal)
Source code in toast/ops/conviqt.py
216 217 218 219 220 221 |
|
_check_mc(proposal)
Source code in toast/ops/conviqt.py
126 127 128 129 130 131 |
|
_check_shared_flag_mask(proposal)
Source code in toast/ops/conviqt.py
223 224 225 226 227 228 |
|
_exec(data, detectors=None, **kwargs)
Source code in toast/ops/conviqt.py
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 |
|
_finalize(data, **kwargs)
Source code in toast/ops/conviqt.py
648 649 |
|
_get_all_detectors(data, detectors)
Assemble a list of detectors across all processes and
observations in self._comm
.
Source code in toast/ops/conviqt.py
316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 |
|
_get_epsilon(focalplane, det)
Parse polarization leakage (epsilon) from the focalplane object or dictionary.
Source code in toast/ops/conviqt.py
382 383 384 385 386 387 388 389 390 391 392 393 394 |
|
_get_psi_pol(focalplane, det)
Parse polarization angle in radians from the focalplane dictionary. The angle is relative to the Pxx basis.
Source code in toast/ops/conviqt.py
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 |
|
_get_psi_uv(focalplane, det)
Parse Pxx basis angle in radians from the focalplane dictionary. The angle is measured from Dxx to Pxx basis.
Source code in toast/ops/conviqt.py
366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 |
|
_provides()
Source code in toast/ops/conviqt.py
667 668 669 670 |
|
_requires()
Source code in toast/ops/conviqt.py
651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 |
|
calibrate_signal(data, det, beam, convolved_data, verbose)
By default, libConviqt results returns a signal that conforms to TOD = (1 + epsilon) / 2 * intensity + (1 - epsilon) / 2 * polarization.
When calibrate = True, we rescale the TOD to TOD = intensity + (1 - epsilon) / (1 + epsilon) * polarization
Source code in toast/ops/conviqt.py
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 |
|
convolve(sky, beam, detector, pnt, det, verbose, pol=None)
Source code in toast/ops/conviqt.py
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 |
|
get_beam(beamfile, det, verbose, pol=None)
Source code in toast/ops/conviqt.py
416 417 418 419 420 421 422 423 424 425 426 |
|
get_buffer(theta, phi, psi, det, verbose)
Pack the pointing into the conviqt pointing array
Source code in toast/ops/conviqt.py
549 550 551 552 553 554 555 556 557 558 559 560 561 |
|
get_detector(det)
We always create the detector with zero leakage and scale the returned TOD ourselves
Source code in toast/ops/conviqt.py
428 429 430 431 432 433 |
|
get_pointing(data, det, verbose)
Return the detector pointing as ZYZ Euler angles without the polarization sensitive angle. These angles are to be compatible with Pxx or Dxx frame beam products
Source code in toast/ops/conviqt.py
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 |
|
get_sky(skyfile, det, verbose, pol=None)
Source code in toast/ops/conviqt.py
396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 |
|
save(data, det, convolved_data, verbose)
Store the convolved data.
Source code in toast/ops/conviqt.py
629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 |
|
toast.ops.SimTEBConviqt
Bases: SimConviqt
Operator that uses libconviqt to generate beam-convolved timestreams. This operator should be used in presence of a spinning HWP which makes the beam time-dependent, constantly mapping the co- and cross-polar responses on to each other. In the parent class OpSimConviqt we assume the beam to be static.
The convolution is performed by coupling each IQU component of the signal propertly as:
:math:skyT_lm * beamT_lm, skyE_lm * Re{P}, skyB_lm * Im{P}
.
FIXME : check above math
For extra details please refer to this note
Source code in toast/ops/conviqt.py
789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 |
|
_exec(data, detectors=None, **kwargs)
Source code in toast/ops/conviqt.py
804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 |
|
get_TEB_sky(skyfile, det, verbose)
Source code in toast/ops/conviqt.py
918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 |
|
get_TP_beam(beamfile, det, verbose)
Source code in toast/ops/conviqt.py
956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 |
|
toast.ops.SimWeightedConviqt
Bases: SimConviqt
Operator which uses libconviqt to generate beam-convolved timestreams. This operator should be used in presence of a spinning HWP which makes the beam time-dependent, constantly mapping the co- and cross polar responses on to each other. In OpSimConviqt we assume the beam to be static.
Source code in toast/ops/conviqt.py
673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 |
|
_exec(data, detectors=None, **kwargs)
Source code in toast/ops/conviqt.py
680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 |
|
get_beam(beamfile, det, verbose)
Source code in toast/ops/conviqt.py
768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 |
|
toast.ops.SimTotalconvolve
Bases: Operator
Operator which uses ducc0.totalconvolve to generate beam-convolved timestreams.
Source code in toast/ops/totalconvolve.py
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 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 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 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 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 369 370 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 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 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 |
|
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
apply_flags = Bool(False, allow_none=False, help='Only synthesize signal for unflagged samples.')
class-attribute
instance-attribute
available
property
Return True if ducc0.totalconvolve is found in the library search path.
beam_file = Unicode(None, allow_none=True, help='File containing the beam a_lm expansion. Tag {detector} will be replaced with the detector name.')
class-attribute
instance-attribute
beam_file_dict = Dict(None, allow_none=True, help='Dictionary of files containing the beam a_lm expansions. An entry for each detector name must be present. If provided, supersedes `beam_file`.')
class-attribute
instance-attribute
beammmax = Int(-1, allow_none=False, help='Beam maximum m. Actual resolution in the Healpix FITS file may differ. If not set, will use the maximum expansion order from file.')
class-attribute
instance-attribute
calibrate = Bool(True, allow_none=False, help='Calibrate intensity to 1.0, rather than (1 + epsilon) / 2. Calibrate has no effect if the beam is found to be normalized rather than scaled with the leakage factor.')
class-attribute
instance-attribute
comm = Instance(klass=MPI_Comm, allow_none=True, help='MPI communicator to use for the convolution.')
class-attribute
instance-attribute
det_data = Unicode(defaults.det_data, allow_none=False, help='Observation detdata key for accumulating convolved timestreams')
class-attribute
instance-attribute
det_data_units = Unit(defaults.det_data_units, help='Output units if creating detector data')
class-attribute
instance-attribute
det_flag_mask = Int(defaults.det_mask_invalid, help='Bit mask value for detector sample flagging')
class-attribute
instance-attribute
det_flags = Unicode(defaults.det_flags, allow_none=True, help='Observation detdata key for flags to use')
class-attribute
instance-attribute
det_mask = Int(defaults.det_mask_invalid, help='Bit mask value for per-detector flagging')
class-attribute
instance-attribute
detector_pointing = Instance(klass=Operator, allow_none=True, help='Operator that translates boresight pointing into detector frame')
class-attribute
instance-attribute
dxx = Bool(True, allow_none=False, help='The beam frame is either Dxx or Pxx. Pxx includes the rotation to polarization sensitive basis, Dxx does not. When Dxx=True, detector orientation from attitude quaternions is corrected for the polarization angle.')
class-attribute
instance-attribute
epsilon = Float(1e-05, allow_none=False, help='Relative accuracy of the interpolation step')
class-attribute
instance-attribute
fwhm = Quantity(4.0 * u.arcmin, allow_none=False, help='Width of a symmetric gaussian beam already present in the skyfile (will be deconvolved away).')
class-attribute
instance-attribute
hwp_angle = Unicode(None, allow_none=True, help='Observation shared key for HWP angle')
class-attribute
instance-attribute
lmax = Int(-1, allow_none=False, help='Maximum ell (and m). Actual resolution in the Healpix FITS file may differ. If not set, will use the maximum expansion order from file.')
class-attribute
instance-attribute
mc = Int(None, allow_none=True, help='Monte Carlo index used in synthesizing the input file names.')
class-attribute
instance-attribute
normalize_beam = Bool(False, allow_none=False, help='Normalize beam to have unit response to temperature monopole.')
class-attribute
instance-attribute
oversampling_factor = Float(1.8, allow_none=False, help='Oversampling factor for total convolution (useful range is 1.5-2.0)')
class-attribute
instance-attribute
pol = Bool(True, allow_none=False, help='Toggle simulated signal polarization')
class-attribute
instance-attribute
remove_dipole = Bool(False, allow_none=False, help='Suppress the temperature dipole in sky_file.')
class-attribute
instance-attribute
remove_monopole = Bool(False, allow_none=False, help='Suppress the temperature monopole in sky_file.')
class-attribute
instance-attribute
shared_flag_mask = Int(defaults.shared_mask_invalid, help='Bit mask value for optional flagging')
class-attribute
instance-attribute
shared_flags = Unicode(defaults.shared_flags, allow_none=True, help='Observation shared key for telescope flags to use')
class-attribute
instance-attribute
sky_file = Unicode(None, allow_none=True, help='File containing the sky a_lm expansion. Tag {detector} will be replaced with the detector name')
class-attribute
instance-attribute
sky_file_dict = Dict(None, allow_none=True, help='Dictionary of files containing the sky a_lm expansions. An entry for each detector name must be present. If provided, supersedes `sky_file`.')
class-attribute
instance-attribute
verbosity = Int(0, allow_none=False, help='')
class-attribute
instance-attribute
view = Unicode(None, allow_none=True, help='Use this view of the data in all observations')
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/ops/totalconvolve.py
252 253 254 |
|
_check_det_flag_mask(proposal)
Source code in toast/ops/totalconvolve.py
245 246 247 248 249 250 |
|
_check_det_mask(proposal)
Source code in toast/ops/totalconvolve.py
231 232 233 234 235 236 |
|
_check_mc(proposal)
Source code in toast/ops/totalconvolve.py
133 134 135 136 137 138 |
|
_check_shared_flag_mask(proposal)
Source code in toast/ops/totalconvolve.py
238 239 240 241 242 243 |
|
_exec(data, detectors=None, **kwargs)
Source code in toast/ops/totalconvolve.py
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 |
|
_finalize(data, **kwargs)
Source code in toast/ops/totalconvolve.py
839 840 |
|
_get_all_detectors(data, detectors)
Assemble a list of detectors across all processes and
observations in self._comm
.
Source code in toast/ops/totalconvolve.py
332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 |
|
_get_epsilon(focalplane, det)
Parse polarization leakage (epsilon) from the focalplane object or dictionary.
Source code in toast/ops/totalconvolve.py
388 389 390 391 392 393 394 395 396 397 398 399 400 |
|
_get_psi_pol(focalplane, det)
Parse polarization angle in radians from the focalplane dictionary. The angle is relative to the Pxx basis.
Source code in toast/ops/totalconvolve.py
357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 |
|
_get_psi_uv(focalplane, det)
Parse Pxx basis angle in radians from the focalplane dictionary. The angle is measured from Dxx to Pxx basis.
Source code in toast/ops/totalconvolve.py
375 376 377 378 379 380 381 382 383 384 385 386 |
|
_provides()
Source code in toast/ops/totalconvolve.py
855 856 857 858 |
|
_requires()
Source code in toast/ops/totalconvolve.py
842 843 844 845 846 847 848 849 850 851 852 853 |
|
calibrate_signal(data, det, beam, convolved_data, verbose)
By default, libConviqt results returns a signal that conforms to TOD = (1 + epsilon) / 2 * intensity + (1 - epsilon) / 2 * polarization.
When calibrate = True, we rescale the TOD to TOD = intensity + (1 - epsilon) / (1 + epsilon) * polarization
Source code in toast/ops/totalconvolve.py
789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 |
|
conv_and_interpol(skycomp, beamcomp, lmax, mmax, pnt, nthreads, t_conv, t_inter)
Source code in toast/ops/totalconvolve.py
729 730 731 732 733 734 735 736 737 738 739 |
|
conv_and_interpol_mpi(skycomp, beamcomp, lmax, mmax, pnt, nthreads, t_conv, t_inter)
Source code in toast/ops/totalconvolve.py
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 |
|
conv_and_interpol_mpi_shmem(skycomp, beamcomp, lmax, mmax, pnt, nthreads, t_conv, t_inter)
Source code in toast/ops/totalconvolve.py
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 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 |
|
conv_and_interpol_serial(skycomp, beamcomp, lmax, mmax, pnt, nthreads, t_conv, t_inter)
Source code in toast/ops/totalconvolve.py
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 |
|
convolve(sky, beam, lmax, mmax, pnt, psi_pol, det, nthreads, verbose)
Source code in toast/ops/totalconvolve.py
741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 |
|
get_beam(beamfile, lmax, mmax, det, verbose)
Source code in toast/ops/totalconvolve.py
474 475 476 477 478 479 480 481 482 |
|
get_buffer(theta, phi, psi, det, verbose)
Pack the pointing into the pointing array
Source code in toast/ops/totalconvolve.py
553 554 555 556 557 558 559 560 561 562 563 564 |
|
get_lmmax(skyfile, beamfile)
Determine the actual lmax and beammmax to use for the convolution from class parameters and values in the files.
Source code in toast/ops/totalconvolve.py
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 |
|
get_pointing(data, det, verbose)
Return the detector pointing as ZYZ Euler angles without the polarization sensitive angle. These angles are to be compatible with Pxx or Dxx frame beam products
Source code in toast/ops/totalconvolve.py
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 |
|
get_sky(skyfile, lmax, det, verbose)
Source code in toast/ops/totalconvolve.py
454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 |
|
load_alm(file, lmax, mmax)
Source code in toast/ops/totalconvolve.py
432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 |
|
save(data, det, convolved_data, verbose)
Store the convolved data.
Source code in toast/ops/totalconvolve.py
821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 |
|
Scanning a Healpix Map
toast.ops.ScanHealpixMap
Bases: Operator
Operator which reads a HEALPix format map from disk and scans it to a timestream.
The map file is loaded and distributed among the processes. For each observation, the pointing model is used to expand the pointing and scan the map values into detector data.
Source code in toast/ops/scan_healpix.py
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 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 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 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 |
|
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
det_data = Unicode(defaults.det_data, help="Observation detdata key for accumulating output. Use ';' if different files are applied to different flavors")
class-attribute
instance-attribute
det_data_units = Unit(defaults.det_data_units, help='Output units if creating detector data')
class-attribute
instance-attribute
det_mask = Int(defaults.det_mask_invalid, help='Bit mask value for per-detector flagging')
class-attribute
instance-attribute
file = Unicode(None, allow_none=True, help="Path to healpix FITS file. Use ';' if providing multiple files")
class-attribute
instance-attribute
map_names = []
instance-attribute
pixel_dist = Unicode('pixel_dist', help='The Data key where the PixelDistribution object is located')
class-attribute
instance-attribute
pixel_pointing = Instance(klass=Operator, allow_none=True, help='This must be an instance of a pixel pointing operator')
class-attribute
instance-attribute
save_map = Bool(False, help='If True, do not delete map during finalize')
class-attribute
instance-attribute
save_pointing = Bool(False, help='If True, do not clear detector pointing matrices if we generate the pixel distribution')
class-attribute
instance-attribute
stokes_weights = Instance(klass=Operator, allow_none=True, help='This must be an instance of a Stokes weights operator')
class-attribute
instance-attribute
subtract = Bool(False, help='If True, subtract the map timestream instead of accumulating')
class-attribute
instance-attribute
zero = Bool(False, help='If True, zero the data before accumulating / subtracting')
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/ops/scan_healpix.py
129 130 131 |
|
_check_det_mask(proposal)
Source code in toast/ops/scan_healpix.py
92 93 94 95 96 97 |
|
_check_pixel_pointing(proposal)
Source code in toast/ops/scan_healpix.py
99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
|
_check_stokes_weights(proposal)
Source code in toast/ops/scan_healpix.py
114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
|
_exec(data, detectors=None, **kwargs)
Source code in toast/ops/scan_healpix.py
133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 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 |
|
_finalize(data, **kwargs)
Source code in toast/ops/scan_healpix.py
256 257 |
|
_provides()
Source code in toast/ops/scan_healpix.py
264 265 266 267 268 |
|
_requires()
Source code in toast/ops/scan_healpix.py
259 260 261 262 |
|
toast.ops.ScanHealpixMask
Bases: Operator
Operator which reads a HEALPix format mask from disk and scans it to a timestream.
The mask file is loaded and distributed among the processes. For each observation, the pointing model is used to expand the pointing and scan the mask values into detector data.
Source code in toast/ops/scan_healpix.py
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 369 370 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 |
|
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
det_flags = Unicode(defaults.det_flags, allow_none=True, help='Observation detdata key for flags to use')
class-attribute
instance-attribute
det_flags_value = Int(defaults.det_mask_processing, help='The detector flag value to set where the mask result is non-zero')
class-attribute
instance-attribute
det_mask = Int(defaults.det_mask_invalid, help='Bit mask value for per-detector flagging')
class-attribute
instance-attribute
file = Unicode(None, allow_none=True, help='Path to healpix FITS file')
class-attribute
instance-attribute
mask_bits = Int(255, help='The number to bitwise-and with each mask value to form the result')
class-attribute
instance-attribute
mask_name = f'{self.name}_mask'
instance-attribute
pixel_dist = Unicode('pixel_dist', help='The Data key where the PixelDistribution object is located')
class-attribute
instance-attribute
pixel_pointing = Instance(klass=Operator, allow_none=True, help='This must be an instance of a pixel pointing operator')
class-attribute
instance-attribute
save_mask = Bool(False, help='If True, do not delete mask during finalize')
class-attribute
instance-attribute
save_pointing = Bool(False, help='If True, do not clear detector pointing matrices if we generate the pixel distribution')
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/ops/scan_healpix.py
348 349 350 |
|
_check_det_mask(proposal)
Source code in toast/ops/scan_healpix.py
326 327 328 329 330 331 |
|
_check_pixel_pointing(proposal)
Source code in toast/ops/scan_healpix.py
333 334 335 336 337 338 339 340 341 342 343 344 345 346 |
|
_exec(data, detectors=None, **kwargs)
Source code in toast/ops/scan_healpix.py
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 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 |
|
_finalize(data, **kwargs)
Source code in toast/ops/scan_healpix.py
426 427 428 429 430 431 |
|
_provides()
Source code in toast/ops/scan_healpix.py
438 439 440 441 442 |
|
_requires()
Source code in toast/ops/scan_healpix.py
433 434 435 436 |
|
toast.ops.InterpolateHealpixMap
Bases: Operator
Operator which reads a HEALPix format map from disk and interpolates it to a timestream.
The map file is loaded and placed in shared memory on every participating node. For each observation, the pointing model is used to expand the pointing and bilinearly interpolate the map values into detector data.
Source code in toast/ops/interpolate_healpix.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 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 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 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 |
|
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
det_data = Unicode(defaults.det_data, help="Observation detdata key for accumulating output. Use ';' if different files are applied to different flavors")
class-attribute
instance-attribute
det_data_units = Unit(defaults.det_data_units, help='Output units if creating detector data')
class-attribute
instance-attribute
det_mask = Int(defaults.det_mask_invalid, help='Bit mask value for per-detector flagging')
class-attribute
instance-attribute
detector_pointing = Instance(klass=Operator, allow_none=True, help='Operator that translates boresight pointing into detector frame')
class-attribute
instance-attribute
file = Unicode(None, allow_none=True, help="Path to healpix FITS file. Use ';' if providing multiple files")
class-attribute
instance-attribute
map_names = []
instance-attribute
maps = {}
instance-attribute
save_map = Bool(False, help='If True, do not delete map during finalize')
class-attribute
instance-attribute
stokes_weights = Instance(klass=Operator, allow_none=True, help='This must be an instance of a Stokes weights operator')
class-attribute
instance-attribute
subtract = Bool(False, help='If True, subtract the map timestream instead of accumulating')
class-attribute
instance-attribute
zero = Bool(False, help='If True, zero the data before accumulating / subtracting')
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/ops/interpolate_healpix.py
123 124 125 126 |
|
_check_det_mask(proposal)
Source code in toast/ops/interpolate_healpix.py
78 79 80 81 82 83 |
|
_check_detector_pointing(proposal)
Source code in toast/ops/interpolate_healpix.py
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
|
_check_stokes_weights(proposal)
Source code in toast/ops/interpolate_healpix.py
108 109 110 111 112 113 114 115 116 117 118 119 120 121 |
|
_exec(data, detectors=None, **kwargs)
Source code in toast/ops/interpolate_healpix.py
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 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 |
|
_finalize(data, **kwargs)
Source code in toast/ops/interpolate_healpix.py
240 241 |
|
_provides()
Source code in toast/ops/interpolate_healpix.py
248 249 250 251 252 |
|
_requires()
Source code in toast/ops/interpolate_healpix.py
243 244 245 246 |
|
Scanning a WCS Projected Map
toast.ops.ScanWCSMap
Bases: Operator
Operator which reads a WCS format map from disk and scans it to a timestream.
The map file is loaded and distributed among the processes. For each observation, the pointing model is used to expand the pointing and scan the map values into detector data.
Source code in toast/ops/scan_wcs.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 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 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 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 |
|
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
det_data = Unicode(defaults.det_data, help='Observation detdata key for accumulating output')
class-attribute
instance-attribute
det_data_units = Unit(defaults.det_data_units, help='Output units if creating detector data')
class-attribute
instance-attribute
det_mask = Int(defaults.det_mask_invalid, help='Bit mask value for per-detector flagging')
class-attribute
instance-attribute
file = Unicode(None, allow_none=True, help='Path to FITS file')
class-attribute
instance-attribute
map_name = '{}_map'.format(self.name)
instance-attribute
pixel_dist = Unicode('pixel_dist', help='The Data key where the PixelDistribution object is located')
class-attribute
instance-attribute
pixel_pointing = Instance(klass=Operator, allow_none=True, help='This must be an instance of a pixel pointing operator')
class-attribute
instance-attribute
save_map = Bool(False, help='If True, do not delete map during finalize')
class-attribute
instance-attribute
save_pointing = Bool(False, help='If True, do not clear detector pointing matrices if we generate the pixel distribution')
class-attribute
instance-attribute
stokes_weights = Instance(klass=Operator, allow_none=True, help='This must be an instance of a Stokes weights operator')
class-attribute
instance-attribute
subtract = Bool(False, help='If True, subtract the map timestream instead of accumulating')
class-attribute
instance-attribute
zero = Bool(False, help='If True, zero the data before accumulating / subtracting')
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/ops/scan_wcs.py
118 119 120 |
|
_check_det_mask(proposal)
Source code in toast/ops/scan_wcs.py
81 82 83 84 85 86 |
|
_check_pixel_pointing(proposal)
Source code in toast/ops/scan_wcs.py
88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
|
_check_stokes_weights(proposal)
Source code in toast/ops/scan_wcs.py
103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
|
_exec(data, detectors=None, **kwargs)
Source code in toast/ops/scan_wcs.py
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 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 |
|
_finalize(data, **kwargs)
Source code in toast/ops/scan_wcs.py
200 201 202 203 204 205 |
|
_provides()
Source code in toast/ops/scan_wcs.py
212 213 214 215 216 |
|
_requires()
Source code in toast/ops/scan_wcs.py
207 208 209 210 |
|
toast.ops.ScanWCSMask
Bases: Operator
Operator which reads a WCS mask from disk and scans it to a timestream.
The mask file is loaded and distributed among the processes. For each observation, the pointing model is used to expand the pointing and scan the mask values into detector data.
Source code in toast/ops/scan_wcs.py
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 369 370 371 372 373 374 375 376 377 378 379 |
|
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
det_flags = Unicode(defaults.det_flags, allow_none=True, help='Observation detdata key for flags to use')
class-attribute
instance-attribute
det_flags_value = Int(defaults.det_mask_processing, help='The detector flag value to set where the mask result is non-zero')
class-attribute
instance-attribute
det_mask = Int(defaults.det_mask_invalid, help='Bit mask value for per-detector flagging')
class-attribute
instance-attribute
file = Unicode(None, allow_none=True, help='Path to FITS file')
class-attribute
instance-attribute
mask_bits = Int(255, help='The number to bitwise-and with each mask value to form the result')
class-attribute
instance-attribute
mask_name = f'{self.name}_mask'
instance-attribute
pixel_dist = Unicode('pixel_dist', help='The Data key where the PixelDistribution object is located')
class-attribute
instance-attribute
pixel_pointing = Instance(klass=Operator, allow_none=True, help='This must be an instance of a pixel pointing operator')
class-attribute
instance-attribute
save_mask = Bool(False, help='If True, do not delete mask during finalize')
class-attribute
instance-attribute
save_pointing = Bool(False, help='If True, do not clear detector pointing matrices if we generate the pixel distribution')
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/ops/scan_wcs.py
296 297 298 |
|
_check_det_mask(proposal)
Source code in toast/ops/scan_wcs.py
274 275 276 277 278 279 |
|
_check_pixel_pointing(proposal)
Source code in toast/ops/scan_wcs.py
281 282 283 284 285 286 287 288 289 290 291 292 293 294 |
|
_exec(data, detectors=None, **kwargs)
Source code in toast/ops/scan_wcs.py
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 |
|
_finalize(data, **kwargs)
Source code in toast/ops/scan_wcs.py
363 364 365 366 367 368 |
|
_provides()
Source code in toast/ops/scan_wcs.py
375 376 377 378 379 |
|
_requires()
Source code in toast/ops/scan_wcs.py
370 371 372 373 |
|
Scanning an Arbitrary Map
toast.ops.ScanMap
Bases: Operator
Operator which uses the pointing matrix to scan timestream values from a map.
The map must be a PixelData instance with either float32 or float64 values. The values can either be accumulated or subtracted from the input timestream, and the input timestream can be optionally zeroed out beforehand.
Source code in toast/ops/scan_map/scan_map.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 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 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 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 |
|
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
det_data = Unicode(defaults.det_data, help='Observation detdata key for the timestream data')
class-attribute
instance-attribute
det_data_units = Unit(defaults.det_data_units, help='Output units if creating detector data')
class-attribute
instance-attribute
det_flag_mask = Int(defaults.det_mask_invalid, help='Bit mask value for detector sample flagging')
class-attribute
instance-attribute
det_mask = Int(defaults.det_mask_invalid, help='Bit mask value for per-detector flagging')
class-attribute
instance-attribute
map_key = Unicode(None, allow_none=True, help='The Data key where the map is located')
class-attribute
instance-attribute
pixels = Unicode(defaults.pixels, help='Observation detdata key for pixel indices')
class-attribute
instance-attribute
subtract = Bool(False, help='If True, subtract the map timestream instead of accumulating')
class-attribute
instance-attribute
view = Unicode(None, allow_none=True, help='Use this view of the data in all observations')
class-attribute
instance-attribute
weights = Unicode(defaults.weights, allow_none=True, help='Observation detdata key for Stokes weights')
class-attribute
instance-attribute
zero = Bool(False, help='If True, zero the data before accumulating / subtracting')
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/ops/scan_map/scan_map.py
89 90 |
|
_check_det_flag_mask(proposal)
Source code in toast/ops/scan_map/scan_map.py
82 83 84 85 86 87 |
|
_check_det_mask(proposal)
Source code in toast/ops/scan_map/scan_map.py
75 76 77 78 79 80 |
|
_exec(data, detectors=None, use_accel=None, **kwargs)
Source code in toast/ops/scan_map/scan_map.py
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 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 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 |
|
_finalize(data, **kwargs)
Source code in toast/ops/scan_map/scan_map.py
182 183 |
|
_implementations()
Source code in toast/ops/scan_map/scan_map.py
202 203 204 205 206 207 208 |
|
_provides()
Source code in toast/ops/scan_map/scan_map.py
199 200 |
|
_requires()
Source code in toast/ops/scan_map/scan_map.py
185 186 187 188 189 190 191 192 193 194 195 196 197 |
|
_supports_accel()
Source code in toast/ops/scan_map/scan_map.py
210 211 |
|
toast.ops.ScanMask
Bases: Operator
Operator which uses the pointing matrix to set timestream flags from a mask.
The mask must be a PixelData instance with an integer data type. The data for each pixel is bitwise-and combined with the mask_bits to form a result. For each detector sample crossing a pixel with a non-zero result, the detector flag is bitwise-or'd with the specified value.
Source code in toast/ops/scan_map/scan_map.py
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 |
|
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
det_flag_mask = Int(defaults.det_mask_invalid, help='Bit mask value for detector sample flagging')
class-attribute
instance-attribute
det_flags = Unicode(defaults.det_flags, allow_none=True, help='Observation detdata key for flags to use')
class-attribute
instance-attribute
det_flags_value = Int(defaults.det_mask_processing, help='The detector flag value to set where the mask result is non-zero')
class-attribute
instance-attribute
det_mask = Int(defaults.det_mask_invalid, help='Bit mask value for per-detector flagging')
class-attribute
instance-attribute
mask_bits = Int(255, help='The number to bitwise-and with each mask value to form the result')
class-attribute
instance-attribute
mask_key = Unicode(None, allow_none=True, help='The Data key where the mask is located')
class-attribute
instance-attribute
pixels = Unicode('pixels', help='Observation detdata key for pixel indices')
class-attribute
instance-attribute
view = Unicode(None, allow_none=True, help='Use this view of the data in all observations')
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/ops/scan_map/scan_map.py
280 281 |
|
_check_det_flag_mask(proposal)
Source code in toast/ops/scan_map/scan_map.py
273 274 275 276 277 278 |
|
_check_det_mask(proposal)
Source code in toast/ops/scan_map/scan_map.py
266 267 268 269 270 271 |
|
_exec(data, detectors=None, use_accel=None, **kwargs)
Source code in toast/ops/scan_map/scan_map.py
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 |
|
_finalize(data, **kwargs)
Source code in toast/ops/scan_map/scan_map.py
334 335 |
|
_provides()
Source code in toast/ops/scan_map/scan_map.py
349 350 351 |
|
_requires()
Source code in toast/ops/scan_map/scan_map.py
337 338 339 340 341 342 343 344 345 346 347 |
|
_supports_accel()
Source code in toast/ops/scan_map/scan_map.py
353 354 |
|
toast.ops.ScanScale
Bases: Operator
Operator which uses the pointing matrix to apply pixel weights to timestreams.
The map must be a PixelData instance with either float32 or float64 values and one value per pixel. The timestream samples are multiplied by their corresponding pixel values.
Source code in toast/ops/scan_map/scan_map.py
357 358 359 360 361 362 363 364 365 366 367 368 369 370 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 |
|
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
det_data = Unicode(None, allow_none=True, help='Observation detdata key for the timestream data')
class-attribute
instance-attribute
det_flag_mask = Int(defaults.det_mask_invalid, help='Bit mask value for detector sample flagging')
class-attribute
instance-attribute
det_mask = Int(defaults.det_mask_invalid, help='Bit mask value for per-detector flagging')
class-attribute
instance-attribute
map_key = Unicode(None, allow_none=True, help='The Data key where the weight map is located')
class-attribute
instance-attribute
pixels = Unicode(defaults.pixels, help='Observation detdata key for pixel indices')
class-attribute
instance-attribute
view = Unicode(None, allow_none=True, help='Use this view of the data in all observations')
class-attribute
instance-attribute
weights = Unicode(defaults.weights, help='Observation detdata key for Stokes weights')
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/ops/scan_map/scan_map.py
415 416 |
|
_check_det_flag_mask(proposal)
Source code in toast/ops/scan_map/scan_map.py
408 409 410 411 412 413 |
|
_check_det_mask(proposal)
Source code in toast/ops/scan_map/scan_map.py
401 402 403 404 405 406 |
|
_exec(data, detectors=None, use_accel=None, **kwargs)
Source code in toast/ops/scan_map/scan_map.py
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 |
|
_finalize(data, **kwargs)
Source code in toast/ops/scan_map/scan_map.py
494 495 |
|
_provides()
Source code in toast/ops/scan_map/scan_map.py
509 510 511 |
|
_requires()
Source code in toast/ops/scan_map/scan_map.py
497 498 499 500 501 502 503 504 505 506 507 |
|
_supports_accel()
Source code in toast/ops/scan_map/scan_map.py
513 514 |
|
Point Sources
toast.ops.SimCatalog
Bases: Operator
Operator that generates variable and static point source signal.
Signal is generated by sampling the provided beam map at appropriate locations and scaling the resulting signal to match the perceived intensity of the source.
Source SED is convolved with the detector bandpass recorded in the focalplane table.
Example catalog entries:
.. highlight:: toml .. code-block:: toml
[example_static_source]
# Celestial coordinate are always given in degrees
ra_deg = 30
dec_deg = -30
# the SED can be specified using an arbitrary number of
# frequency bins. The SED is interpolated in log-log space to
# convolve with the detector bandpass
# Use either `flux_density_mJy` or `flux_density_Jy` and adjust
# the values accordingly
freqs_ghz = [ 1.0, 1000.0,]
flux_density_mJy = [ 10.0, 1.0,]
# Omitting polarization fraction results in an
# unpolarized source
pol_frac = 0.1
pol_angle_deg = 0
[example_variable_source]
ra_deg = 30
dec_deg = -25
freqs_ghz = [ 1.0, 1000.0,]
# An arbitrary number of SED vectors can be provided but the
# location of the frequency bins is fixed. Effective SED is
# interpolated between the specified epochs.
flux_density_Jy = [ [ 10.0, 1.0,], [ 30.0, 10.0,], [ 10.0, 1.0,],]
# Omitting the times_mjd entry resuls in a static source
times_mjd = [ 59000.0, 60000.0, 61000.0,]
# The polarization properties can also vary
pol_frac = [ 0.05, 0.15, 0.05,]
pol_angle_deg = [ 45, 45, 45,]
[example_transient_source]
ra_deg = 30
dec_deg = -20
freqs_ghz = [ 1.0, 1000.0,]
flux_density_Jy = [ [ 10.0, 1.0,], [ 30.0, 10.0,],]
# Difference between a variable and transient source is
# simply that the specified epochs do not cover the entire
# simulation time span. The operator will not extrapolate
# outside the epochs.
times_mjd = [ 59410.0, 59411.0,]
Source code in toast/ops/sim_catalog.py
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 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 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 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 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 369 370 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 |
|
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
beam_file = Unicode(None, allow_none=True, help='HDF5 file that stores the simulated beam. If None, a symmetric Gaussian based on the instrument model will be used.')
class-attribute
instance-attribute
beam_props = dict()
instance-attribute
catalog_file = Unicode(None, allow_none=True, help='Name of the TOML catalog file')
class-attribute
instance-attribute
det_data = Unicode(defaults.det_data, help='Observation detdata key for simulated signal')
class-attribute
instance-attribute
det_data_units = Unit(defaults.det_data_units, help='Output units if creating detector data')
class-attribute
instance-attribute
det_mask = Int(defaults.det_mask_nonscience, help='Bit mask value for per-detector flagging')
class-attribute
instance-attribute
detector_pointing = Instance(klass=Operator, allow_none=True, help='Operator that translates boresight RA/Dec pointing into detector frame')
class-attribute
instance-attribute
hwp_angle = Unicode(defaults.hwp_angle, help='Observation shared key for HWP angle')
class-attribute
instance-attribute
times = Unicode(defaults.times, help='Observation shared key for timestamps')
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/ops/sim_catalog.py
238 239 240 241 242 243 244 |
|
_accelerators()
Source code in toast/ops/sim_catalog.py
561 562 |
|
_check_beam_file(proposal)
Source code in toast/ops/sim_catalog.py
161 162 163 164 165 166 |
|
_check_catalog_file(proposal)
Source code in toast/ops/sim_catalog.py
154 155 156 157 158 159 |
|
_check_det_mask(proposal)
Source code in toast/ops/sim_catalog.py
147 148 149 150 151 152 |
|
_check_detector_pointing(proposal)
Source code in toast/ops/sim_catalog.py
168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 |
|
_exec(data, detectors=None, **kwargs)
Source code in toast/ops/sim_catalog.py
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 |
|
_finalize(data, **kwargs)
Source code in toast/ops/sim_catalog.py
543 544 |
|
_get_beam_map(det, focalplane)
Construct a 2-dimensional interpolator for the beam
Source code in toast/ops/sim_catalog.py
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 |
|
_load_catalog()
Source code in toast/ops/sim_catalog.py
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 |
|
_observe_catalog(data, obs, prefix, dets, scale)
Observe the catalog with each detector in tod
Source code in toast/ops/sim_catalog.py
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 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 |
|
_provides()
Source code in toast/ops/sim_catalog.py
554 555 556 557 558 559 |
|
_requires()
Source code in toast/ops/sim_catalog.py
546 547 548 549 550 551 552 |
|
Terrestrial Signals
These operators generate detector signal from the Earth's atmosphere and other sources of power outside a ground-based telescope.
toast.ops.WeatherModel
Bases: Operator
Create a default weather model
The weather model is used to draw observing conditions such as temperature, wind and PWV.
Source code in toast/ops/weather_model.py
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 |
|
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
max_pwv = Quantity(None, allow_none=True, help='Maximum PWV for the simulated weather.')
class-attribute
instance-attribute
median_weather = Bool(False, help='Use median weather parameters instead of sampling from the distributions')
class-attribute
instance-attribute
realization = Int(0, help='The realization index')
class-attribute
instance-attribute
times = Unicode(defaults.times, help='Observation shared key for timestamps')
class-attribute
instance-attribute
weather = Unicode(None, allow_none=True, help="Name of built-in weather site (e.g. 'atacama', 'south_pole') or path to HDF5 file")
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/ops/weather_model.py
55 56 |
|
_exec(data, detectors=None, **kwargs)
Source code in toast/ops/weather_model.py
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
|
_finalize(data, **kwargs)
Source code in toast/ops/weather_model.py
100 101 |
|
_provides()
Source code in toast/ops/weather_model.py
107 108 109 |
|
_requires()
Source code in toast/ops/weather_model.py
103 104 105 |
|
toast.ops.SimAtmosphere
Bases: Operator
Operator which generates atmosphere timestreams for detectors.
All processes collectively generate the atmospheric realization. Then each process passes through its local data and observes the atmosphere.
Source code in toast/ops/sim_tod_atm.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 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 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 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 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 369 370 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 |
|
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
add_loading = Bool(True, help='Add elevation-dependent loading.')
class-attribute
instance-attribute
cache_dir = Unicode(None, allow_none=True, help='Directory to use for loading / saving atmosphere realizations')
class-attribute
instance-attribute
cache_only = Bool(False, help='If True, only cache the atmosphere, do not observe it.')
class-attribute
instance-attribute
component = Int(123456, help='The component index to use for this atmosphere simulation')
class-attribute
instance-attribute
corr_lim = Float(0.001, help='Correlation limit is used to measure the correlation length of the simulation. Elements further than correlation length apart have their covariance set to zero.')
class-attribute
instance-attribute
debug_plots = Bool(False, help='If True, make plots of the debug snapshots')
class-attribute
instance-attribute
debug_snapshots = Bool(False, help='If True, dump snapshots of the atmosphere slabs to pickle files')
class-attribute
instance-attribute
debug_spectrum = Bool(False, help='If True, dump out Kolmogorov debug files')
class-attribute
instance-attribute
debug_tod = Bool(False, help='If True, dump TOD to pickle files')
class-attribute
instance-attribute
det_data = Unicode(defaults.det_data, help='Observation detdata key for accumulating atmosphere timestreams')
class-attribute
instance-attribute
det_data_units = Unit(defaults.det_data_units, help='Output units if creating detector data')
class-attribute
instance-attribute
det_flag_mask = Int(defaults.det_mask_invalid, help='Bit mask value for detector sample flagging')
class-attribute
instance-attribute
det_flags = Unicode(defaults.det_flags, allow_none=True, help='Observation detdata key for flags to use')
class-attribute
instance-attribute
det_mask = Int(defaults.det_mask_invalid, help='Bit mask value for per-detector flagging')
class-attribute
instance-attribute
detector_pointing = Instance(klass=Operator, allow_none=True, help='Operator that translates boresight Az/El pointing into detector frame')
class-attribute
instance-attribute
detector_weights = Instance(klass=Operator, allow_none=True, help='Operator that translates boresight Az/El pointing into detector weights')
class-attribute
instance-attribute
fade_time = Quantity(60.0 * u.s, help='Fade in/out time to avoid a step at wind break.')
class-attribute
instance-attribute
field_of_view = Quantity(None, allow_none=True, help='Override the focalplane field of view')
class-attribute
instance-attribute
gain = Float(1e-05, help='Scaling applied to the simulated TOD')
class-attribute
instance-attribute
lmax_center = Quantity(10.0 * u.meter, help='Kolmogorov turbulence injection scale center')
class-attribute
instance-attribute
lmax_sigma = Quantity(10.0 * u.meter, help='Kolmogorov turbulence injection scale sigma')
class-attribute
instance-attribute
lmin_center = Quantity(0.01 * u.meter, help='Kolmogorov turbulence dissipation scale center')
class-attribute
instance-attribute
lmin_sigma = Quantity(0.001 * u.meter, help='Kolmogorov turbulence dissipation scale sigma')
class-attribute
instance-attribute
n_bandpass_freqs = Int(100, help='The number of sampling frequencies used when convolving the bandpass with atmosphere absorption and loading')
class-attribute
instance-attribute
nelem_sim_max = Int(10000, help='Controls the size of the simulation slices')
class-attribute
instance-attribute
overwrite_cache = Bool(False, help='If True, redo and overwrite any cached atmospheric realizations.')
class-attribute
instance-attribute
polarization_fraction = Float(0, help='Polarization fraction (only Q polarization).')
class-attribute
instance-attribute
realization = Int(0, help='If simulating multiple realizations, the realization index')
class-attribute
instance-attribute
sample_rate = Quantity(None, allow_none=True, help='Rate at which to sample atmospheric TOD before interpolation. Default is no interpolation.')
class-attribute
instance-attribute
shared_flag_mask = Int(defaults.shared_mask_invalid, help='Bit mask value for optional flagging')
class-attribute
instance-attribute
shared_flags = Unicode(defaults.shared_flags, allow_none=True, help='Observation shared key for telescope flags to use')
class-attribute
instance-attribute
times = Unicode(defaults.times, help='Observation shared key for timestamps')
class-attribute
instance-attribute
turnaround_interval = Unicode('turnaround', allow_none=True, help='Interval name for turnarounds')
class-attribute
instance-attribute
view = Unicode(None, allow_none=True, help='Use this view of the data in all observations')
class-attribute
instance-attribute
wind_dist = Quantity(3000.0 * u.meter, help='Maximum wind drift before discarding the volume and creating a new one')
class-attribute
instance-attribute
xstep = Quantity(100.0 * u.meter, help='Size of volume elements in X direction')
class-attribute
instance-attribute
ystep = Quantity(100.0 * u.meter, help='Size of volume elements in Y direction')
class-attribute
instance-attribute
z0_center = Quantity(2000.0 * u.meter, help='Central value of the water vapor distribution')
class-attribute
instance-attribute
z0_sigma = Quantity(0.0 * u.meter, help='Sigma of the water vapor distribution')
class-attribute
instance-attribute
zatm = Quantity(40000.0 * u.meter, help='Atmosphere extent for temperature profile')
class-attribute
instance-attribute
zmax = Quantity(2000.0 * u.meter, help='Atmosphere extent for water vapor integration')
class-attribute
instance-attribute
zstep = Quantity(100.0 * u.meter, help='Size of volume elements in Z direction')
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/ops/sim_tod_atm.py
273 274 275 276 277 278 279 280 281 282 283 284 285 286 |
|
_check_det_flag_mask(proposal)
Source code in toast/ops/sim_tod_atm.py
217 218 219 220 221 222 |
|
_check_det_mask(proposal)
Source code in toast/ops/sim_tod_atm.py
210 211 212 213 214 215 |
|
_check_detector_pointing(proposal)
Source code in toast/ops/sim_tod_atm.py
231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 |
|
_check_detector_weights(proposal)
Source code in toast/ops/sim_tod_atm.py
254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 |
|
_check_shared_flag_mask(proposal)
Source code in toast/ops/sim_tod_atm.py
224 225 226 227 228 229 |
|
_common_absorption_and_loading(obs, dets, absorption_key, loading_key, comm)
Compute the (common) absorption and loading prior to bandpass convolution.
Source code in toast/ops/sim_tod_atm.py
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 |
|
_exec(data, detectors=None, **kwargs)
Source code in toast/ops/sim_tod_atm.py
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 369 370 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 |
|
_finalize(data, **kwargs)
Source code in toast/ops/sim_tod_atm.py
619 620 |
|
_provides()
Source code in toast/ops/sim_tod_atm.py
635 636 637 638 639 640 641 642 643 |
|
_requires()
Source code in toast/ops/sim_tod_atm.py
622 623 624 625 626 627 628 629 630 631 632 633 |
|
toast.ops.SimScanSynchronousSignal
Bases: Operator
Operator which generates scan-synchronous signal timestreams.
Source code in toast/ops/sss.py
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 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 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 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 |
|
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
component = Int(663056, help='The simulation component index')
class-attribute
instance-attribute
det_data = Unicode(defaults.det_data, help='Observation detdata key for accumulating simulated timestreams')
class-attribute
instance-attribute
det_data_units = Unit(defaults.det_data_units, help='Output units if creating detector data')
class-attribute
instance-attribute
detector_pointing = Instance(klass=Operator, allow_none=True, help='Operator that translates boresight Az/El pointing into detector frame')
class-attribute
instance-attribute
fwhm = Quantity(10 * u.arcmin, help='Ground map smoothing scale')
class-attribute
instance-attribute
lmax = Int(256, help='Ground map expansion order')
class-attribute
instance-attribute
nside = Int(128, help='Ground map healpix resolution')
class-attribute
instance-attribute
path = Unicode(None, allow_none=True, help='Path to a horizontal Healpix map to sample for the SSS *instead* of synthesizing Gaussian maps')
class-attribute
instance-attribute
pol = Bool(False, help='Ground map is polarized')
class-attribute
instance-attribute
power = Float(-1, help='Exponential for suppressing ground pickup at higher observing elevation')
class-attribute
instance-attribute
realization = Int(0, help='The simulation realization index')
class-attribute
instance-attribute
scale = Quantity(1 * u.mK, help='RMS of the ground signal fluctuations at el=45deg')
class-attribute
instance-attribute
sss_map = 'sss_map'
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/ops/sss.py
91 92 |
|
_check_component(proposal)
Source code in toast/ops/sss.py
84 85 86 87 88 89 |
|
_check_realization(proposal)
Source code in toast/ops/sss.py
77 78 79 80 81 82 |
|
_exec(data, detectors=None, **kwargs)
Source code in toast/ops/sss.py
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
|
_get_rng_keys(obs)
The random number generator accepts a key and a counter, each made of two 64bit integers. Following tod_math.py we set key1 = realization * 2^32 + telescope * 2^16 + component key2 = sindx * 2^32 counter1 = hierarchical cone counter counter2 = sample in stream
Source code in toast/ops/sss.py
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 |
|
_observe_sss(data, obs, dets)
Use healpy bilinear interpolation to observe the ground signal map
Source code in toast/ops/sss.py
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 |
|
_provides()
Source code in toast/ops/sss.py
260 261 262 263 264 265 266 |
|
_requires()
Source code in toast/ops/sss.py
251 252 253 254 255 256 257 258 |
|
_simulate_sss(obs, key1, key2, counter1, counter2, weather, comm)
Create a map of the ground signal to observe with all detectors
Source code in toast/ops/sss.py
149 150 151 152 153 154 155 156 157 158 159 160 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 |
|
finalize(data, **kwargs)
Source code in toast/ops/sss.py
246 247 248 249 |
|
Instrument Signals
These operators simulate instrumental effects from sources of power inside the telescope and receiver.
toast.ops.DefaultNoiseModel
Bases: Operator
Create a default noise model from focalplane parameters.
A noise model is used by other operations such as simulating noise timestreams and also map making. This operator uses the detector properties from the focalplane in each observation to create a simple AnalyticNoise model.
Source code in toast/ops/noise_model.py
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
|
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
noise_model = Unicode('noise_model', help='The observation key for storing the noise model')
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/ops/noise_model.py
40 41 |
|
_exec(data, detectors=None, **kwargs)
Source code in toast/ops/noise_model.py
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
|
_finalize(data, **kwargs)
Source code in toast/ops/noise_model.py
96 97 |
|
_provides()
Source code in toast/ops/noise_model.py
102 103 104 |
|
_requires()
Source code in toast/ops/noise_model.py
99 100 |
|
toast.ops.ElevationNoise
Bases: Operator
Modify detector noise model based on elevation. Optionally include PWV modulation.
This adjusts the detector PSDs in a noise model based on the median elevation of each detector in each observation.
The PSD value scaled by:
.. math:: PSD_{new} = PSD_{old} * (a / sin(el) + c)^2
NOTE: since this operator generates a new noise model for all detectors, you should specify all detectors you intend to use downstream when calling exec().
If the view trait is not specified, then this operator will use the same data view as the detector pointing operator when computing the pointing matrix pixels and weights.
If the output model is not specified, then the input is modified in place.
Source code in toast/ops/elevation_noise.py
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 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 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 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 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 369 370 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 |
|
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
detector_pointing = Instance(klass=Operator, allow_none=True, help='Operator that translates boresight Az / El pointing into detector frame')
class-attribute
instance-attribute
extra_factor = Float(None, allow_none=True, help='Extra multiplier to the NET scaling')
class-attribute
instance-attribute
modulate_pwv = Bool(False, help='If True, modulate the NET based on PWV')
class-attribute
instance-attribute
net_factors = []
instance-attribute
noise_a = Float(None, allow_none=True, help="Parameter 'a' in (a / sin(el) + c). If not set, look for one in the Focalplane.")
class-attribute
instance-attribute
noise_c = Float(None, allow_none=True, help="Parameter 'c' in (a / sin(el) + c). If not set, look for one in the Focalplane.")
class-attribute
instance-attribute
noise_model = Unicode('noise_model', help='The observation key containing the input noise model')
class-attribute
instance-attribute
out_model = Unicode(None, allow_none=True, help='Create a new noise model with this name')
class-attribute
instance-attribute
pwv_a0 = Float(None, allow_none=True, help="Parameter 'a0' in (a0 + pwv * a1 + pwv ** 2 * a2). If not set, look for one in the Focalplane.")
class-attribute
instance-attribute
pwv_a1 = Float(None, allow_none=True, help="Parameter 'a1' in (a0 + pwv * a1 + pwv ** 2 * a2). If not set, look for one in the Focalplane.")
class-attribute
instance-attribute
pwv_a2 = Float(None, allow_none=True, help="Parameter 'a2' in (a0 + pwv * a1 + pwv ** 2 * a2). If not set, look for one in the Focalplane.")
class-attribute
instance-attribute
rates = []
instance-attribute
times = Unicode(defaults.times, help='Observation shared key for timestamps')
class-attribute
instance-attribute
total_factors = []
instance-attribute
view = Unicode(None, allow_none=True, help="Use this view of the data in all observations. Use 'middle' if the middle 10 seconds of each observation is enough to determine the effective observing elevation")
class-attribute
instance-attribute
weights_in = []
instance-attribute
weights_out = []
instance-attribute
__init__(**kwargs)
Source code in toast/ops/elevation_noise.py
141 142 143 144 145 146 147 |
|
_check_detector_pointing(proposal)
Source code in toast/ops/elevation_noise.py
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 |
|
_exec(data, detectors=None, **kwargs)
Source code in toast/ops/elevation_noise.py
149 150 151 152 153 154 155 156 157 158 159 160 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 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 369 370 371 372 373 374 375 376 377 378 |
|
_finalize(data, **kwargs)
Source code in toast/ops/elevation_noise.py
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 |
|
_provides()
Source code in toast/ops/elevation_noise.py
435 436 437 438 439 440 441 442 443 444 |
|
_requires()
Source code in toast/ops/elevation_noise.py
428 429 430 431 432 433 |
|
toast.ops.SimNoise
Bases: Operator
Operator which generates noise timestreams.
This passes through each observation and every process generates data for its assigned samples. The observation unique ID is used in the random number generation.
This operator intentionally does not provide a "view" trait. To avoid discontinuities, the full observation must be simulated regardless of any data views that will be used for subsequent analysis.
Source code in toast/ops/sim_tod_noise.py
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 369 370 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 |
|
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
_oversample = 2
instance-attribute
component = Int(0, help='The noise component index')
class-attribute
instance-attribute
det_data = Unicode(defaults.det_data, help='Observation detdata key for accumulating noise timestreams')
class-attribute
instance-attribute
det_data_units = Unit(defaults.det_data_units, help='Output units if creating detector data')
class-attribute
instance-attribute
noise_model = Unicode('noise_model', help='Observation key containing the noise model')
class-attribute
instance-attribute
realization = Int(0, help='The noise realization index')
class-attribute
instance-attribute
serial = Bool(True, help='Use legacy serial implementation instead of batched')
class-attribute
instance-attribute
times = Unicode(defaults.times, help='Observation shared key for timestamps')
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/ops/sim_tod_noise.py
244 245 246 |
|
_check_component(proposal)
Source code in toast/ops/sim_tod_noise.py
237 238 239 240 241 242 |
|
_check_realization(proposal)
Source code in toast/ops/sim_tod_noise.py
230 231 232 233 234 235 |
|
_exec(data, detectors=None, **kwargs)
Source code in toast/ops/sim_tod_noise.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 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 369 370 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 |
|
_finalize(data, **kwargs)
Source code in toast/ops/sim_tod_noise.py
409 410 |
|
_provides()
Source code in toast/ops/sim_tod_noise.py
425 426 427 428 429 430 |
|
_requires()
Source code in toast/ops/sim_tod_noise.py
412 413 414 415 416 417 418 419 420 421 422 423 |
|
toast.ops.CommonModeNoise
Bases: Operator
Modify noise model to include common modes
If the output model is not specified, then the input is modified in place.
Source code in toast/ops/common_mode_noise.py
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 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 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 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 |
|
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
NET = Quantity(None, allow_none=True, help='')
class-attribute
instance-attribute
alpha = Float(None, allow_none=True, help='')
class-attribute
instance-attribute
component = Int(0, help='The noise component index')
class-attribute
instance-attribute
coupling_strength_center = Float(1, help='Mean coupling strength between the detectors and the common mode')
class-attribute
instance-attribute
coupling_strength_width = Float(0, help='Width of the coupling strength distribution about `coupling_strength_center`')
class-attribute
instance-attribute
detset = List([], help='List of detectors to add the common mode to. Only used if `focalplane_key` is None')
class-attribute
instance-attribute
fknee = Quantity(None, allow_none=True, help='')
class-attribute
instance-attribute
fmin = Quantity(None, allow_none=True, help='')
class-attribute
instance-attribute
focalplane_key = Unicode(None, allow_none=True, help='Detectors sharing the focalplane key will have the same common mode')
class-attribute
instance-attribute
noise_model = Unicode('noise_model', help='The observation key containing the input noise model')
class-attribute
instance-attribute
out_model = Unicode(None, allow_none=True, help='Create a new noise model with this name')
class-attribute
instance-attribute
realization = Int(0, help='The noise component index')
class-attribute
instance-attribute
static_coupling = Bool(False, help='If True, coupling to the common mode is not randomized over observations and realizations')
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/ops/common_mode_noise.py
99 100 |
|
_exec(data, detectors=None, **kwargs)
Source code in toast/ops/common_mode_noise.py
102 103 104 105 106 107 108 109 110 111 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 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 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 |
|
_finalize(data, **kwargs)
Source code in toast/ops/common_mode_noise.py
229 230 231 |
|
_provides()
Source code in toast/ops/common_mode_noise.py
237 238 239 240 241 242 243 244 245 246 |
|
_requires()
Source code in toast/ops/common_mode_noise.py
233 234 235 |
|
toast.ops.TimeConstant
Bases: Operator
Simple time constant filtering without flag checks.
Source code in toast/ops/time_constant.py
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 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 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 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 |
|
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
batch = Bool(False, help='If True, batch all detectors and process at once')
class-attribute
instance-attribute
debug = Unicode(None, allow_none=True, help='Path to directory for generating debug plots')
class-attribute
instance-attribute
deconvolve = Bool(False, help='Deconvolve the time constant instead.')
class-attribute
instance-attribute
det_data = Unicode(defaults.det_data, help='Observation detdata key apply filtering to')
class-attribute
instance-attribute
det_flags = Unicode(defaults.det_flags, allow_none=True, help='Observation detdata key for flags to use')
class-attribute
instance-attribute
edge_flag_mask = Int(defaults.det_mask_invalid, help='Sample flag mask for cutting samples at the ends due to filter effects.')
class-attribute
instance-attribute
realization = Int(0, help='Realization ID, only used if tau_sigma is nonzero')
class-attribute
instance-attribute
tau = Quantity(None, allow_none=True, help='Time constant to apply to all detectors. Overrides `tau_name`')
class-attribute
instance-attribute
tau_flag_mask = Int(defaults.det_mask_invalid, help='Detector flag mask for cutting detectors with invalid Tau values.')
class-attribute
instance-attribute
tau_name = Unicode(None, allow_none=True, help='Key to use to find time constants in the Focalplane.')
class-attribute
instance-attribute
tau_sigma = Float(None, allow_none=True, help='Randomized fractional error to add to each time constant.')
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/ops/time_constant.py
79 80 |
|
_exec(data, detectors=None, **kwargs)
Source code in toast/ops/time_constant.py
109 110 111 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 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 |
|
_finalize(data, **kwargs)
Source code in toast/ops/time_constant.py
178 179 |
|
_get_tau(obs, det)
Source code in toast/ops/time_constant.py
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
|
_provides()
Source code in toast/ops/time_constant.py
188 189 |
|
_requires()
Source code in toast/ops/time_constant.py
181 182 183 184 185 186 |
|
toast.ops.InjectCosmicRays
Bases: Operator
Inject the cosmic rays signal into the TOD. So far we inject two kinds of cosmic ray noise:
Wafer noise, due to ~400 impacts per second in the wafer undistinguishable individually. For each observation and for each detector we inject low noise component as a white noise signal, i.e. noraml distributed random samples following the observed properties from simulations and read from disc. This component is then coadded to the sky signal (as if it were a noise term) .
Common mode noise
A common mode noise within each detector pair can be simulated given the properties of the wafer noise. Will use the informations of correlations can be found in the file provided as an input to the simulations, if present, otherwise 50% detector correlation is assumed.
Direct hits (or Glitches)
Given the size of the detector we can derive the cosmic ray event rate and simulate the profile of a cosmic ray glitch. We assume the glitch to be described as
.. math:: \gamma (t) = C_1 +C_2 e^{-t/ au }
where :math:C_1 and :math:C_2 and the time constant :math: au are drawn from a distribution of estimated values
from simulations. For each observation and each detector, we estimate the number of hits expected
theroretically and draw a random integer, N
, with a Poissonian distribution given the expected number
of events, Nexp
. We then select randomly N
timestamps where the hits will be injected into the tod simulated in TOAST.
Evaluate the function :math:\gamma at a higher sampling rate (~150 Hz), decimate it to the TOD sample rate and coadd it.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
crfile
|
string
|
A |
required |
signal_name
|
string
|
the cache reference of the TOD data where the cosmic ray will be stored |
required |
realization
|
int
|
to run several Monte-Carlo realizations of cosmic ray noise |
required |
eventrate
|
float)
|
the expected event rate of hits in a detector |
required |
inject_direct_hits
|
bool
|
will include also direct hits if set to True |
required |
conversion_factor
|
float
|
factor to convert the cosmic ray units to temperature units |
required |
common_mode
|
bool)
|
will include also common mode per pixel pair if set to True |
required |
Source code in toast/ops/sim_cosmic_rays.py
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 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 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 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 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 |
|
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
conversion_factor = Quantity(1 * u.K / u.W, help='factor to convert the cosmic ray signal (usually Watts) into temperature units')
class-attribute
instance-attribute
crdata_units = Unit(u.W, help='The units of the input amplitudes')
class-attribute
instance-attribute
crfile = Unicode(None, help='Path to the *.npz file encoding cosmic ray infos')
class-attribute
instance-attribute
det_data = Unicode(defaults.det_data, help='Observation detdata key to inject the gain drift')
class-attribute
instance-attribute
det_data_units = Unit(defaults.det_data_units, help='Output units if creating detector data')
class-attribute
instance-attribute
eventrate = Float(0.0015, help='the expected event rate of hits in a detector')
class-attribute
instance-attribute
include_common_mode = Bool(False, help='will include also common mode per pixel pair if set to True')
class-attribute
instance-attribute
inject_direct_hits = Bool(False, help='inject direct hits as glitches in the TODs')
class-attribute
instance-attribute
realization = Int(0, help='integer to set a different random seed ')
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/ops/sim_cosmic_rays.py
94 95 |
|
_exec(data, detectors=None, **kwargs)
Source code in toast/ops/sim_cosmic_rays.py
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 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 277 |
|
_finalize(data, **kwargs)
Source code in toast/ops/sim_cosmic_rays.py
279 280 |
|
_provides()
Source code in toast/ops/sim_cosmic_rays.py
295 296 297 298 299 300 301 302 303 |
|
_requires()
Source code in toast/ops/sim_cosmic_rays.py
282 283 284 285 286 287 288 289 290 291 292 293 |
|
load_cosmic_ray_data(filename)
Source code in toast/ops/sim_cosmic_rays.py
97 98 99 100 |
|
resample_cosmic_ray_statistics(arr, Nresamples, key, counter)
Source code in toast/ops/sim_cosmic_rays.py
102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 |
|
toast.ops.GainDrifter
Bases: Operator
Operator which injects gain drifts to the signal.
The drift can be injected into 3 different ways:
- linear_drift
: inject a linear drift with a random slope for each detector
- slow_drift
: inject a drift signal with a 1/f
PSD, simulated up to
the frequencies<cutoff_freq
, in case cutoff_freq< (1/t_obs)
, cutoff_freq=1/t_obs
.
- thermal_drift
: inject a drift encoding frequencies up to the sampling rate, to simulate
the thermal fluctuations in the focalplane.
Both slow_drift
and thermal_drift
modes encode the possibility to inject a common mode drifts
to all the detectors belonging to a group of detectors identified the string focalplane_group
( can
be any string set by the user used to identify the groups in the detector table).
The amount of common mode contribution is set by setting detector_mismatch to a value <1
, (with
0 being the case with only injecting common mode signal).
Source code in toast/ops/sim_gaindrifts.py
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 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 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 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 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 |
|
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
alpha_drift = Float(1.0, help='spectral index of the drift signal spectrum')
class-attribute
instance-attribute
component = Int(0, allow_none=False, help='Component index for this simulation')
class-attribute
instance-attribute
cutoff_freq = Quantity(0.2 * u.mHz, help='cutoff frequency to simulate a slow drift (assumed < sampling rate)')
class-attribute
instance-attribute
det_data = Unicode(defaults.det_data, help='Observation detdata key to inject the gain drift')
class-attribute
instance-attribute
det_data_units = Unit(defaults.det_data_units, help='Output units if creating detector data')
class-attribute
instance-attribute
detector_mismatch = Float(1.0, help='mismatch between detectors for `thermal_drift` and `slow_drift` ranging from 0 to 1. Default value implies no common mode injected')
class-attribute
instance-attribute
drift_mode = Unicode('linear', help='a string from [linear_drift, thermal_drift, slow_drift] to set the way the drift is modelled')
class-attribute
instance-attribute
fknee_drift = Quantity(20.0 * u.mHz, help='fknee of the drift signal')
class-attribute
instance-attribute
focalplane_Tbath = Quantity(100 * u.mK, help='temperature of the focalplane for `thermal_drift` ')
class-attribute
instance-attribute
focalplane_group = Unicode('wafer', help='focalplane table column to use for grouping detectors: can be any string like "wafer", "pixel"')
class-attribute
instance-attribute
include_common_mode = Bool(False, help='If True, inject a common drift to all the local detector group ')
class-attribute
instance-attribute
realization = Int(0, help='integer to set a different random seed ')
class-attribute
instance-attribute
responsivity_function = Callable(lambda dT: dT, help='Responsivity function takes as input the thermal fluctuations,`dT` defined as `dT=Tdrift/Tbath + 1 `. Default we assume the identity function ')
class-attribute
instance-attribute
sigma_drift = Float(0.001, help='dimensionless amplitude of the drift signal, (for `thermal_drift` corresponds to the thermal fluctuation level in K units)')
class-attribute
instance-attribute
thermal_fluctuation_amplitude = Quantity(1 * u.K, help='Amplitude of thermal fluctuation for `thermal_drift` in Kelvin units ')
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/ops/sim_gaindrifts.py
103 104 |
|
_exec(data, detectors=None, **kwargs)
Generate gain timestreams.
This iterates over all observations and detectors, simulates a gain drift across the observation time and multiplies it to the signal TOD of the detectors in each detector pair.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data
|
Data
|
The distributed data. |
required |
Source code in toast/ops/sim_gaindrifts.py
106 107 108 109 110 111 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 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 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 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 |
|
_finalize(data, **kwargs)
Source code in toast/ops/sim_gaindrifts.py
301 302 |
|
_provides()
Source code in toast/ops/sim_gaindrifts.py
317 318 319 320 321 322 323 324 325 |
|
_requires()
Source code in toast/ops/sim_gaindrifts.py
304 305 306 307 308 309 310 311 312 313 314 315 |
|
get_psd(f)
Source code in toast/ops/sim_gaindrifts.py
97 98 99 100 101 |
|
toast.ops.GainScrambler
Bases: Operator
Apply random gain errors to detector data.
This operator draws random gain errors from a given distribution and applies them to the specified detectors.
Source code in toast/ops/gainscrambler.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 |
|
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
center = Float(1, allow_none=False, help='Gain distribution center')
class-attribute
instance-attribute
component = Int(0, allow_none=False, help='Component index for this simulation')
class-attribute
instance-attribute
det_data = Unicode(defaults.det_data, help='Observation detdata key to apply the gain error to')
class-attribute
instance-attribute
pattern = Unicode(f'.*', allow_none=True, help='Regex pattern to match against detector names. Only detectors that match the pattern are scrambled.')
class-attribute
instance-attribute
realization = Int(0, allow_none=False, help='Realization index')
class-attribute
instance-attribute
sigma = Float(0.001, allow_none=False, help='Gain distribution width')
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/ops/gainscrambler.py
47 48 |
|
_exec(data, detectors=None, **kwargs)
Source code in toast/ops/gainscrambler.py
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
|
_finalize(data, **kwargs)
Source code in toast/ops/gainscrambler.py
103 104 |
|
_provides()
Source code in toast/ops/gainscrambler.py
115 116 117 118 119 120 121 |
|
_requires()
Source code in toast/ops/gainscrambler.py
106 107 108 109 110 111 112 113 |
|
toast.ops.PerturbHWP
Bases: Operator
Operator that adds irregularities to HWP rotation
Source code in toast/ops/sim_hwp.py
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 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 277 278 279 280 281 282 |
|
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
drift_sigma = Quantity(None, allow_none=True, help='1-sigma relative change in spin rate, such as 0.01 / hour')
class-attribute
instance-attribute
hwp_angle = Unicode(defaults.hwp_angle, allow_none=True, help='Observation shared key for HWP angle')
class-attribute
instance-attribute
realization = Int(0, allow_none=False, help='Realization index')
class-attribute
instance-attribute
time_sigma = Quantity(None, allow_none=True, help='1-sigma difference between real and nominal time stamps')
class-attribute
instance-attribute
times = Unicode(defaults.times, help='Observation shared key for timestamps')
class-attribute
instance-attribute
_exec(data, detectors=None, **kwargs)
Source code in toast/ops/sim_hwp.py
158 159 160 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 |
|
_finalize(data, **kwargs)
Source code in toast/ops/sim_hwp.py
270 271 |
|
_provides()
Source code in toast/ops/sim_hwp.py
281 282 |
|
_requires()
Source code in toast/ops/sim_hwp.py
273 274 275 276 277 278 279 |
|
toast.ops.CrossTalk
Bases: Operator
Simulate readout crosstalk between channels.
-
The cross talk matrix can just be a dictionary of dictionaries of values (i.e. a sparse matrix) on every process. It does not need to be a dense matrix loaded from an HDF5 file. The calling code can create this however it likes.
-
Each process has a DetectorData object representing the local data for some detectors and some timespan (e.g. obs.detdata["signal"]). It can make a copy of this and pass it to the next rank in the grid column. Each process receives a copy from the previous process in the column, accumulates to its local detectors, and passes it along. This continues until every process has accumulated the data from the other processes in the column.
Source code in toast/ops/sim_crosstalk.py
126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 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 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 |
|
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
det_data = Unicode(defaults.det_data, allow_none=True, help='Observation detdata key for the timestream data')
class-attribute
instance-attribute
det_data_units = Unit(defaults.det_data_units, help='Output units if creating detector data')
class-attribute
instance-attribute
detector_ordering = Unicode('random', help='Initialize Crosstalk matrix with detector ordering: `random, gap,constant` default `random` ')
class-attribute
instance-attribute
realization = Int(0, help='integer to set a different random seed ')
class-attribute
instance-attribute
view = Unicode(None, allow_none=True, help='Use this view of the data in all observations')
class-attribute
instance-attribute
xtalk_mat_file = Unicode(None, allow_none=True, help='CrossTalk matrix dictionary of dictionaries')
class-attribute
instance-attribute
__init__(**kwargs)
Source code in toast/ops/sim_crosstalk.py
174 175 |
|
_exec(data, **kwargs)
Source code in toast/ops/sim_crosstalk.py
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 |
|
_finalize(data, **kwargs)
Source code in toast/ops/sim_crosstalk.py
323 324 |
|
_provides()
Source code in toast/ops/sim_crosstalk.py
339 340 341 342 343 344 345 346 347 |
|
_requires()
Source code in toast/ops/sim_crosstalk.py
326 327 328 329 330 331 332 333 334 335 336 337 |
|
exec_roundrobin(data, detectors=None, **kwargs)
Source code in toast/ops/sim_crosstalk.py
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 |
|
toast.ops.YieldCut
Bases: Operator
Operator that simulates non-perfect yield.
When TES detectors have their bias tuned, not all detectors have sufficient responsivity to be useful for science. This can be a temporary problem. This operator simulates a random loss in detector yield.
The det_mask
trait is used to select incoming "good" detectors. This selection
of good detectors then has the yield cut applied.
Source code in toast/ops/yield_cut.py
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 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 142 143 144 |
|
API = Int(0, help='Internal interface version for this operator')
class-attribute
instance-attribute
det_flag_mask = Int(defaults.det_mask_invalid, help='Bit mask value for flagging cut detectors')
class-attribute
instance-attribute
det_flags = Unicode(defaults.det_flags, allow_none=True, help='Observation detdata key for flags to use')
class-attribute
instance-attribute
det_mask = Int(defaults.det_mask_invalid, help='Bit mask value for input per-detector flagging')
class-attribute
instance-attribute
fixed = Bool(False, help='If True, detector cuts do not change between observations and realizations')
class-attribute
instance-attribute
focalplane_key = Unicode('pixel', help='Which focalplane key to use for randomization. Detectors that share the key value are flagged together')
class-attribute
instance-attribute
keep_frac = Float(0.9, help='Fraction of detectors to keep')
class-attribute
instance-attribute
realization = Int(0, help='The realization index')
class-attribute
instance-attribute
_check_det_flag_mask(proposal)
Source code in toast/ops/yield_cut.py
78 79 80 81 82 83 |
|
_check_det_mask(proposal)
Source code in toast/ops/yield_cut.py
71 72 73 74 75 76 |
|
_exec(data, detectors=None, **kwargs)
Source code in toast/ops/yield_cut.py
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
|
_finalize(data, **kwargs)
Source code in toast/ops/yield_cut.py
127 128 |
|
_provides()
Source code in toast/ops/yield_cut.py
138 139 140 141 142 143 144 |
|
_requires()
Source code in toast/ops/yield_cut.py
130 131 132 133 134 135 136 |
|