Skip to content

adding support for running the search at different sample rates compa…#18

Merged
ahnitz merged 3 commits into
ahnitz:firinspiral2from
kkacanja:firinspiral2-srpatch
Jun 1, 2026
Merged

adding support for running the search at different sample rates compa…#18
ahnitz merged 3 commits into
ahnitz:firinspiral2from
kkacanja:firinspiral2-srpatch

Conversation

@kkacanja

Copy link
Copy Markdown

The logic of the function remains the same the main difference is utilizing a larger buffer to perform the fft and the reslicing back into desired sample rate done at the end.
This only works for sample rates of the engine that is less than the rate of the tap construction.

Comment thread pycbc/filter/matched_ratio.py Outdated
bank_sample_rate = self.tap_sr
engine_sample_rate = self.engine_sr
# Alternatively, determine the downsampling factor directly:
decimation_factor = int(bank_sample_rate / engine_sample_rate) # e.g., 2048 / 512 = 4

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might want round here and potentially cause an error if it's not very close to an integer decimation with a warning to explain to the user that they do need to use a power of 2 or at least something that evenly divides.

@ahnitz ahnitz left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made one minor comment, but otherwise, I think this looks good.

@kkacanja

Copy link
Copy Markdown
Author

I made one minor comment, but otherwise, I think this looks good.

Are you fine with how I named the variables or is there something more intuitive

@kkacanja kkacanja requested a review from ahnitz June 1, 2026 17:41
@kkacanja

kkacanja commented Jun 1, 2026

Copy link
Copy Markdown
Author
Screenshot 2026-06-01 at 1 41 40 PM This is tested with the base inspiral code, It is not perfectly matching all of the triggers but it is in the ballpark

@kkacanja

kkacanja commented Jun 1, 2026

Copy link
Copy Markdown
Author

For reference the base 2048 inspiral and fir code produce consistent results
Screenshot 2026-06-01 at 1 44 57 PM

@ahnitz ahnitz merged commit 06cca98 into ahnitz:firinspiral2 Jun 1, 2026
18 of 29 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.

2 participants