legend-exp / pygama

Python package for data processing and analysis
https://pygama.readthedocs.io
GNU General Public License v3.0
18 stars 56 forks source link

Created a temporary table for `buffer_processor()` to write to file during `build_raw()` #443

Closed SamuelBorden closed 1 year ago

SamuelBorden commented 1 year ago

This update fixes the unwanted behavior of the buffer_processor dropping fields in a buffer before build_raw is done writing to the buffer. The major change is that buffer_processor.py now returns a temporary lgdo.Table that shares columns with an rb.lgdo, and all processing is done on this temporary table instead of directly on the rb.lgdo.

codecov-commenter commented 1 year ago

Codecov Report

Base: 45.81% // Head: 45.85% // Increases project coverage by +0.03% :tada:

Coverage data is based on head (f0e15de) compared to base (59882c9). Patch coverage: 90.00% of modified lines in pull request are covered.

:exclamation: Current head f0e15de differs from pull request most recent head 685c6ba. Consider uploading reports for the commit 685c6ba to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #443 +/- ## ========================================== + Coverage 45.81% 45.85% +0.03% ========================================== Files 92 92 Lines 10849 10855 +6 ========================================== + Hits 4971 4978 +7 + Misses 5878 5877 -1 ``` | [Impacted Files](https://codecov.io/gh/legend-exp/pygama/pull/443?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=legend-exp) | Coverage Δ | | |---|---|---| | [...rc/pygama/raw/buffer\_processor/buffer\_processor.py](https://codecov.io/gh/legend-exp/pygama/pull/443?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=legend-exp#diff-c3JjL3B5Z2FtYS9yYXcvYnVmZmVyX3Byb2Nlc3Nvci9idWZmZXJfcHJvY2Vzc29yLnB5) | `88.42% <87.50%> (+0.64%)` | :arrow_up: | | [...ygama/raw/buffer\_processor/lh5\_buffer\_processor.py](https://codecov.io/gh/legend-exp/pygama/pull/443?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=legend-exp#diff-c3JjL3B5Z2FtYS9yYXcvYnVmZmVyX3Byb2Nlc3Nvci9saDVfYnVmZmVyX3Byb2Nlc3Nvci5weQ==) | `88.31% <100.00%> (ø)` | | | [src/pygama/raw/raw\_buffer.py](https://codecov.io/gh/legend-exp/pygama/pull/443?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=legend-exp#diff-c3JjL3B5Z2FtYS9yYXcvcmF3X2J1ZmZlci5weQ==) | `92.02% <100.00%> (+0.05%)` | :arrow_up: | | [src/pygama/lgdo/table.py](https://codecov.io/gh/legend-exp/pygama/pull/443?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=legend-exp#diff-c3JjL3B5Z2FtYS9sZ2RvL3RhYmxlLnB5) | `93.16% <0.00%> (+0.85%)` | :arrow_up: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=legend-exp). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=legend-exp)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

jasondet commented 1 year ago

looks perfect.