Commit 645eeb8
authored
API Support spectrumPlot(..., by=None|"max") (#457)
* STY Apply some black formatting to spectrumPlot
* BUG Use logy in Detector.spectrumPlot
* DEV Use broadcasting to improve spectrum normalization
Avoids for loops and lets numpy handle division at once
* API Support spectrumPlot(..., by={None, "max"})
Default is "max" which will scale tallied data by the max value
in each column (plotted data). Passing by=None will not perform
any additional modifications. Neither options changes the division
by lethargy.
Closes #455
* TST Test spectrumPlot(..., by=None)1 parent c4b8ee6 commit 645eeb8
File tree
3 files changed
+50
-12
lines changed- serpentTools
- tests/plots
- result_images
3 files changed
+50
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
495 | 495 | | |
496 | 496 | | |
497 | 497 | | |
498 | | - | |
499 | | - | |
500 | | - | |
501 | | - | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
502 | 517 | | |
503 | 518 | | |
504 | 519 | | |
| |||
508 | 523 | | |
509 | 524 | | |
510 | 525 | | |
511 | | - | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
512 | 532 | | |
513 | 533 | | |
514 | 534 | | |
| |||
546 | 566 | | |
547 | 567 | | |
548 | 568 | | |
| 569 | + | |
549 | 570 | | |
550 | 571 | | |
551 | 572 | | |
552 | 573 | | |
553 | | - | |
554 | | - | |
555 | | - | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
556 | 580 | | |
557 | 581 | | |
558 | 582 | | |
| |||
576 | 600 | | |
577 | 601 | | |
578 | 602 | | |
579 | | - | |
580 | | - | |
581 | | - | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
582 | 614 | | |
583 | 615 | | |
584 | 616 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
0 commit comments