Skip to content

add create & copy functions for MultiNoiseWeights

Description

This adds two simple helper functions for this lalpulsar struct type, which we'd like to be able to use from PyFstat to avoid the need for repeated SFT reading after other functions modify the weights in-place.

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

If any of the Backwards Incompatible check boxes are ticked please provide a justification why this change is necessary and why it needs to be done in a backwards incompatible way.

Review Status

@karl-wette do these look ok? Notes:

  • I found two different idioms for "copy" functions in lalpulsar: int XLALCopySFT ( SFTtype *dest, const SFTtype *src ) vs. SuperskyMetrics* XLALCopySuperskyMetrics ( const SuperskyMetrics *metrics ). The int-returning version is easier to use for our case and also matches most copy functions for basic lal types, so I went with that style.
  • I also wasn't entirely sure about the correct placement in the .h file groups: does copying fall under modify functions or should it be rather considered a special case of create...?

cc @luana.modafferi @rodrigo.tenorio

Merge request reports