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

Update code to use BMSTransformation class and add function to map ABD object to the frame of another #85

Merged
merged 14 commits into from
Nov 8, 2023
Merged

Conversation

keefemitman
Copy link
Contributor

@keefemitman keefemitman commented Feb 10, 2023

This PR updates the map_to_superrest_frame.py code to use the class scri.bms_transformations.BMSTransformation to keep track of the BMS transformations that we're applying. By doing so, this enables us to only ever transform the original ABD object (since we can compose transformations), which, in theory, should help reduce numerical noise.

Apart from updating the map_to_superrest_frame.py code, this also adds a new file, map_to_abd_frame.py, which includes the function map_to_abd_frame. This function maps one ABD object to the frame of another.

This is achieved by doing the following:

  • find the transformation that maps target_ABD to the superrest frame; call it T1
  • find the transformation that maps self to the superrest frame; call it T2
  • find the transformation that time/phase aligns the strains in the superrest frame; call it T_time_phase
  • construct the map from self to target_ABD via T1.inverse() * T_time_phase * T2
  • perform another time/phase optimization by aligning the strains
  • iterate this as many times as desired

To ensure this function works as expected, the test file test_abd_frame.py has also been added.

One thing I'm unsure of is how to define the error between the two ABD objects. If the user chooses to do an optimization over the time/phase freedom, then the error is simply the relative error between the strain waveforms. If not, then the error is defined to be the average of the relative error of the Weyl scalars and strain. I don't think this should matter too much, but if people have ideas that are better than what I've implemented, I'd be happy to change the code accordingly.

@moble @duetosymmetry might find this of interest.

github-actions and others added 2 commits January 18, 2023 21:20
…ption to map abd objects to the frame of another abd object via map_to_abd_frame.py
@keefemitman
Copy link
Contributor Author

keefemitman commented Feb 11, 2023

Oh I've also noticed that the tolerances in the transformation code regarding supertranslations are a bit stringent.

@moble how did you come up with these? Can we relax them?

pyproject.toml Outdated Show resolved Hide resolved
CITATION.cff Outdated Show resolved Hide resolved
scri/waveform_base.py Outdated Show resolved Hide resolved
scri/asymptotic_bondi_data/transformations.py Outdated Show resolved Hide resolved
scri/asymptotic_bondi_data/map_to_abd_frame.py Outdated Show resolved Hide resolved
@keefemitman
Copy link
Contributor Author

keefemitman commented Apr 22, 2023

Looks like there are some sxs/scri compatibility issues. Working on a fix and will push sometime next week.

"""
ell_max = 1 # Compute only the parts we need, ell<=1
supertranslation_potential_data = scri.asymptotic_bondi_data.map_to_superrest_frame.𝔇inverse(
np.array(self.sigma.ethbar_GHP.ethbar_GHP + self.sigma.bar.eth_GHP.eth_GHP), self.ell_max
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it faster to just compute self.sigma.ethbar_GHP.ethbar_GHP and take twice the real part?

@moble moble merged commit 8a3c524 into moble:main Nov 8, 2023
5 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.

3 participants