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

Added DPZ extractor to pargen #558

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

SamuelBorden
Copy link
Collaborator

The function get_dpz_decay_constants works to get the constants needed for the double pole zero filter in three steps:

  1. A guess for the long and short time constants are obtained by taking linear fits to the logarithm of a superpulse
  2. These guesses are used to seed a least squares fit
  3. The least squares values are then used in a dsp chain that optimizes the flatness of the decaying tails of waveforms

This is a first pass at the routine, so we should think maybe a bit more about where to put this in the dataflow. Right now this quickly interfaces with the single pole-zero dataflow script; to do that, the superpulse is created inside the function get_dpz_decay_constants. But we might want to make get_dpz_decay_constants a bit more general and instead create the superpulse in the dataflow.

There are other issues currently with the double pole zero filter, see legend-exp/dspeed#52. So I am going to mark this as a draft PR

Copy link

codecov bot commented Feb 15, 2024

Codecov Report

Attention: Patch coverage is 62.98343% with 67 lines in your changes are missing coverage. Please review.

Project coverage is 25.51%. Comparing base (ae3752a) to head (7fdd904).
Report is 50 commits behind head on main.

Files Patch % Lines
src/pygama/pargen/extract_tau.py 62.98% 67 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #558      +/-   ##
==========================================
+ Coverage   22.82%   25.51%   +2.68%     
==========================================
  Files          42       42              
  Lines        8110     8220     +110     
==========================================
+ Hits         1851     2097     +246     
+ Misses       6259     6123     -136     

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

@gipert gipert requested a review from ggmarshall April 25, 2024 08:50
@gipert gipert added the pargen Generation of analysis parameters (calibrations etc.) label Apr 25, 2024
@gipert
Copy link
Member

gipert commented Apr 25, 2024

@ggmarshall @SamuelBorden can this be merged to main or will mess up with the refactor?

@SamuelBorden
Copy link
Collaborator Author

I need to change some imports from the energy cal routines, but then it should be good to go. I'll work on synergizing this with the pargen refactor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pargen Generation of analysis parameters (calibrations etc.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants