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 create_abd_from_h5 to include other post-processing options; update documentation #92

Merged
merged 5 commits into from
May 29, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions docs/tutorial_abd.rst
Original file line number Diff line number Diff line change
Expand Up @@ -277,3 +277,76 @@ These components of a BMS transformation can also all be stored in the
:meth:`scri.bms_transformations.BMSTransformation` class, which allows for things like
reording the components of the BMS transformation, inverting BMS transformations, and
composing BMS transformations. For more, see :ref:`bms_transformations`.

==========
BMS Frames
==========

All waveforms at future null infinity (and all waveforms more generally) are functions or coordinates.
keefemitman marked this conversation as resolved.
Show resolved Hide resolved
Therefore, there are certain "frames" which may be more useful than others, like that of a rest frame.
For waveforms at future null infinity, the number of coordinates freedoms, i.e., the symmetries, that they
keefemitman marked this conversation as resolved.
Show resolved Hide resolved
exhibit is infinite and is summarized by a group known as the BMS group. This controls the types of frames
that one may map waveforms to. Because GR is covariant, there is no preferred frame. However, for performing
analysis on waveforms or building waveform models, it turns out that there are certain frames that are
more useful than others. In particular, within GR one can extend the notion of a rest frame to something called
a "superrest frame" (see arXiv:2405.08868 or arXiv:2208.04356 for more details), which typically yields waveforms
that are easier to understand/analyze. Effectively, mapping to this frame amounts to mapping the system to be
in the center-of-mass frame, with no instananeous memory, and it's angular velocity in the z-direction. For example,
keefemitman marked this conversation as resolved.
Show resolved Hide resolved
for a remnant black hole, this corresponds to making the coordinates match those of the usual Kerr metric and is
therefore incredibly useful (and necessary) for fitting QNMs to NR waveforms.

The function ``scri.asymptotic_bondi_data.map_to_superrest_frame`` maps to this exact frame.
In particular, it takes as input:

* ``t_0``, the time at which to map to the superrest frame;

* ``target_PsiM_input``, the target Moreschi supermomentum; this should be ``None`` to map to the superrest frame,
but to map to the PN BMS frame one should input the PN Moreschi supermomentum (see arXiv:2208.04356).

* ``target_strain_input``, the target strain; this should be ``None`` to map to the superrest frame,
but to map to the PN BMS frame one should input the PN strain (see arXiv:2208.04356).

* ``padding_time``, the time window about ``t_0`` to be used when finding the BMS transformation to the superrest frame.

========================================================
Creating an AsymptoticBondiData Object from a CCE Output
========================================================

For processing the output of SpECTRE CCE, one may use the function ``scri.SpEC.file_io.create_abd_from_h5``.
keefemitman marked this conversation as resolved.
Show resolved Hide resolved
This function takes as input the path to SpECTRE CCE's output file (via the option ``file_name``) and
creates an ``abd`` object from said file.
It also can perform a number of other important post-processing steps, such as:

* time translate the time array of the waveforms by the radius of the worldtube; this ensures that the CCE waveforms
are more closely aligned (in time) with extrapolated waveform. This is performed via the ``radius`` option.

* scale out the total Christoudoulou mass of the system from each waveform. This is performed via the ``ch_mass`` option.

* interpolate to a coarser time array, such as the time array of the worldtube. This is performed via the ``t_interpolate`` option.

* map to the superrest BMS frame at some time. This is performed via the ``t_0_superrest`` and ``padding_time`` options.
E.g., to make reasonable-looking waveforms, one should map to the superrest frame at some time after junk;
keefemitman marked this conversation as resolved.
Show resolved Hide resolved
``t_0_superrest`` is the time at which to map to this frame, and ``padding_time`` is the window around ``t_0_superrest``
that is used when computing this BMS transformation. ``t_0_superrest - padding_time`` should be after junk radiation.
``padding_time`` should be a few hundred :math:`h=2\overline{\sigma}`, e.g., two orbital periods.
keefemitman marked this conversation as resolved.
Show resolved Hide resolved
The function used to do this is ``abd.map_to_superrest_frame`` (see the "BMS Frames" section).

We recommend including all of these post-processing steps when processing a SpECTRE CCE output.
keefemitman marked this conversation as resolved.
Show resolved Hide resolved

To obtain the strain :math:`h` from the ``abd`` object, one can use the function ``scri.asymptotic_bondi_data.map_to_superrest_frame.MT_to_WM`` via ``h = MT_to_WM(2.0*abd.sigma.bar)``.
This is because the strain :math:`h` is related to the shear :math:`\sigma` via :math:`h=2\overline{\sigma}`.
keefemitman marked this conversation as resolved.
Show resolved Hide resolved

Example usage of this function could be:

.. code-block:: python

>>> import scri
>>> abd = scri.SpEC.file_io.create_abd_from_h5(
file_name='CharacteristicExtractVolume_R0292.h5',
file_format="spectrecce",
ch_mass=1.0,
t_interpolate=t_worldtube,
t_0_superrest=1600,
padding_time=200
)
>>> h = scri.asymptotic_bondi_data.map_to_superrest_frame.MT_to_WM(2.0*abd.sigma.bar)

Choose a reason for hiding this comment

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

So this call was non-intuitive to me, even after reading the entire ABD tutorial, including what you added here. Here are a few thoughts to consider for making this easier to understand:

  1. Having a section in this ABD tutorial on how to get the strain from an ABD object. This would state that h=2\bar{\sigma} (though currently the ABD tutorial states it's without a factor of 2?), that we need to convert from the ABD representation to a WaveformModes (which my understanding is what MT_to_WM does, maybe linking to the tutorial for that?), and then also linking again to the WM tutorial section "Working with WaveformModes".
  2. Having somewhere, either here or in the "Working with WaveformModes" an explanation of how to plot the (2,2) of the strain. I expect this is something that someone will want to do as a first sanity check (that's what I was trying to do as a first sanity check) and so we should essentially spoon feed this :)
  3. Adding a code comment or a description after this code block that just points folks to where they can find the details on this last line. Again, the "Working with WaveformModes" seems like the right place, but I don't know :)

Copy link

Choose a reason for hiding this comment

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

I think 2. of Nils' suggestions is probably the most important, because yeah I agree that people will just want to see a waveform when they are first trying this out. If they want to do more complicated things they'll have to read the papers and such.

I also agree there should be links to the docs on what a WaveformModes object is and does

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Loading