Skip to content

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

Open
kkacanja wants to merge 3 commits into
ahnitz:firinspiral2from
kkacanja:firinspiral2-srpatch
Open

adding support for running the search at different sample rates compa…#18
kkacanja wants to merge 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.

Copy link
Copy Markdown
Owner

@ahnitz ahnitz left a comment

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

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