Skip to content

SWIG wrap method that converts orientation angles from LAL->NR frame

Description

There is a useful function XLALSimInspiralNRWaveformGetRotationAnglesFromH5File that calculates the rotation angles from the NR frame to the radiation frame, which is the frame in which we typically want our waveform models to provide waveform modes in. In order to use it from Python, we need it to be swig wrapped. This MR does that in three steps:

  1. Rename XLALSimInspiralNRWaveformGetRotationAnglesFromH5File to XLALSimInspiralNRWaveformGetRotationAnglesFromHDF5FilePointer as it really takes in a file pointer as input, not a string file path.
  2. Write a new XLALSimInspiralNRWaveformGetRotationAnglesFromHDF5File that opens a given HDF5 file, and calls the above XLALSimInspiralNRWaveformGetRotationAnglesFromHDF5FilePointer with it.
  3. Add a declaration of XLALSimInspiralNRWaveformGetRotationAnglesFromHDF5File to LALSimIMR.h in order to SWIG wrap it.

Note that step 1 is where an existing function is changed (only its name is changed actually), and that is why I have checked "This change modifies an existing class/function/struct/type definition in a public C header file or Python module" below. This is well justified as we don't really want to SWIG wrap a function that takes in an HDF5 file pointer, but we want a function that can use a filepath. Since no such function existed, I had to refactor through steps 1-3 above.

UPDATE: We are no longer doing step 1 above, and this is no longer backwards incompatible

API Changes and Justification

Backwards Compatible Changes

  • This change does not modify any class/function/struct/type definitions in a public C header file or any Python class/function definitions
  • This change adds new classes/functions/structs/types to a public C header file or Python module

Backwards Incompatible Changes

  • This change modifies an existing class/function/struct/type definition in a public C header file or Python module
  • This change removes an existing class/function/struct/type from a public C header file or Python module

Justification: see above.

Review Status

Please provide details on any reviews related to this change and and the associated reviewers.

Edited by Prayush Kumar

Merge request reports