moble / scri

Python/numba code for manipulating time-dependent functions of spin-weighted spherical harmonics on future null infinity
MIT License
18 stars 20 forks source link

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

Closed keefemitman closed 11 months ago

keefemitman commented 1 year ago

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:

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.

keefemitman commented 1 year ago

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?

keefemitman commented 1 year ago

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