Skip to content

Conversation

@yi-fan-wang
Copy link
Member

@yi-fan-wang yi-fan-wang commented Oct 14, 2025

Adding options for high frequency cutoff in pybc_insiral. The motivation here is that: when downsampling, the antialising filter would only work well until ~0.85 Nyquist Frequency. This is not a problem when the gravitational wave frequency doesn't approach to that high, but may be an issue if so.

Also fix a typo in the pycbc_insiral: args.require_valid_checkpoint --> opt.require_valid_checkpoint, because args doesn't exist.

Tested with the default search example:

@yi-fan-wang yi-fan-wang changed the title [WIP] add high frequency cutoff for pycbc_inspiral Add option for high frequency cutoff in pycbc_inspiral Oct 14, 2025
@yi-fan-wang yi-fan-wang requested review from ahnitz and tdent October 17, 2025 11:51
@tdent tdent requested a review from spxiwh October 17, 2025 11:52
@yi-fan-wang
Copy link
Member Author

yi-fan-wang commented Oct 17, 2025

Hi @ahnitz @tdent I'll add more descriptions, more test runs are ongoing, but let me tag you here to let you know this.

@tdent
Copy link
Contributor

tdent commented Oct 17, 2025

Concerning the example test search, there are very small changes in the single detector triggers, see the binned triggers and binned histogram plots.

add default none
# This will override any existing approximants with the same name
# (ex. IMRPhenomXX)
cpu_td[approximant] = get_td_waveform_from_fd
if approximant not in td_apx:
Copy link
Member

Choose a reason for hiding this comment

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

@yi-fan-wang I don't think we can approve this. In particular, the lalsim internal conversions don't preserve phase / timing in as exact a way. This has caused several problems in the past with inconsistencies between templates and injections. If you want to be able to select between the path, I think having a way to do that would be fine, but please do not change the default here.

Copy link
Member Author

Choose a reason for hiding this comment

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

@ahnitz Got it. I'll revert to remove this. (BTW I haven't understood the purpose of this. It's cherry-picked from v23_RELEASE_BRANCH and may be useful for some runs in some specific settings, though it's never in the main branch probably for the reasons you mentioned).

Copy link
Member

Choose a reason for hiding this comment

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

@yi-fan-wang Yeah, I think addresses if you want to allow either path is probably outside the scope of this PR, so if needed consider what to do separately.

Copy link
Member

@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.

@yi-fan-wang One thing broadly here, is how does this compare to setting the f_final in the template bank? That should be similar, no? If not, you may want to check to see if there are places where the high_frequency_cutoff is not currently getting supplied that it would need to be. Naively I think setting f_final is more guaranteed to affect all the right places (think all the signal consistency tests, etc, not just MF).

@spxiwh
Copy link
Contributor

spxiwh commented Oct 23, 2025

@yi-fan-wang The discussion of the purpose of the lalsimulation change (and why it musn't be included on the main branch) is had on the PR that the commit links to #4530

@tdent
Copy link
Contributor

tdent commented Oct 26, 2025

@ahnitz considering your question: In the FilterBank code, it looks like there is no way to specify a high frequency cutoff directly. So if the MatchedFilterControl can take f_upper, why can't FilterBank as well? (Or vice versa, why does MatchedFilterControl advertise an option if setting it doesn't consistently affect the template?)

I'll also note that power_chisq_bins() has a kwarg high_frequency_cutoff=None ... but this isn't set by any of the other functions in vetoes that call it.

So at present it looks like neither the bank f_final nor MatchedFilterControl can influence the actual setup of power chisq ... A bit of a mess no?

@tdent
Copy link
Contributor

tdent commented Oct 26, 2025

I just added a commit to pass through a template end_frequency value to the power chisq bins calculation.
However, it seems like nontrivial extra work is needed in bank.py to make the template end_frequency settable in a nicely controlled way analogous to f_lower (see ensure_standard_filter_columns()). Well, the actual code may be straightforward but several extra lines will be needed.
@ahnitz would you agree with that?

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.

4 participants