Skip to content

Imr phenom xhm support#263

Open
sclyne623 wants to merge 7 commits into
dingo-gw:mainfrom
sclyne623:IMRPhenomXHM_support
Open

Imr phenom xhm support#263
sclyne623 wants to merge 7 commits into
dingo-gw:mainfrom
sclyne623:IMRPhenomXHM_support

Conversation

@sclyne623

Copy link
Copy Markdown
Collaborator

adds the IMRPhenomXHM approximant to the list of valid approximants in the generate_FD_modes_LO function and added a conditional check before convert_J_to_L0_frame as IMRPhenomXHM is not generated in the J frame.

Added IMRPhenomXHM to approximants in generate_FD_modes_LO  and set convert_J_to_L0_frame to run for IMRPhenomXPHM only
@sclyne623 sclyne623 requested a review from mpuerrer October 18, 2024 15:34

@mpuerrer mpuerrer left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It would be good to add a comment which explains why IMRPhenomXHM behaves differently from IMRPhenomXPHM. In the code we see that both approximants are supported in the if statement in line 664, but in line 679 the check is only for IMRPhenomXPHM. Don't leave the reader guessing, but give a clear and concise statement about why they need to be treated differently.

@mpuerrer mpuerrer left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

You deleted the comment about "approximants that are implemented in J frame"; rather than just deleting it would be better to explain that some waveforms are in the J frame, but others are not, and listing the ones considered here.

Added line to say tested approximants can be in either L0 or J frame.

@mpuerrer mpuerrer left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for updating line 661. If you read through the comments in the entire function, you'll see that there are other places where the comments should be updated: in line 674 it would be good to specify that "For some waveform models considered here ... the modes are returned in the J-frame".

And it would be good to add near the beginning of the function -- line 662 which frame each of the waveform model's modes are give in, perhaps like this:

# IMRPhenomXPHM: modes in J-frame
# IMRPhenomXHM: modes in L-frame

It also isn't necessary to list the numbers 101, 97 anymore because we have the names and the numbers come from a C enum in LALSimulation which would change if someone were to insert a waveform before a particular approximant.

updated more comments in `generate_FD_modes_LO` to make it more clear what waveforms are returned in J frame and which are returned in the L frame.

@mpuerrer mpuerrer left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks, this looks good to me.

@mpuerrer mpuerrer requested a review from stephengreen October 22, 2024 20:26
@mpuerrer

Copy link
Copy Markdown
Collaborator

@stephengreen please have a look as well if you are happy with this change.

@stephengreen stephengreen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @sclyne623. To be sure that this works properly, please extend the test

def test_generate_hplus_hcross_m(intrinsic_prior, wfg, num_evaluations, tolerances):

to include IMRPhenomXHM.

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.

3 participants