Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated behavior of round operator in ProcessingChain #23

Merged
merged 8 commits into from
Nov 15, 2023

Conversation

iguinn
Copy link
Collaborator

@iguinn iguinn commented Nov 15, 2023

round now takes two optional arguments

  • to_nearest: instead of rounding to nearest integer, round to nearest arbitrary value (including units and coordinate systems). This enables the use of unitted quantities in rounding (if to_nearest has the same unit).
  • dtype: control dtype of output

round is now also capable of working on processing chain variables. For coordinate-like variables (like timepoints) the recommended usage is round(tp, wf.grid), which will make the internal buffer for the timepoint fall on integer multiples of the coordinate space; this is optimal for any processor that expects integer values.

Copy link

codecov bot commented Nov 15, 2023

Codecov Report

Attention: 8 lines in your changes are missing coverage. Please review.

Comparison is base (c11ee13) 61.69% compared to head (976aeca) 61.81%.

Files Patch % Lines
src/dspeed/processing_chain.py 69.23% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #23      +/-   ##
==========================================
+ Coverage   61.69%   61.81%   +0.11%     
==========================================
  Files          40       40              
  Lines        2684     2705      +21     
==========================================
+ Hits         1656     1672      +16     
- Misses       1028     1033       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@iguinn iguinn merged commit 1ec686f into legend-exp:main Nov 15, 2023
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant