dingo-gw / dingo

Dingo: Deep inference for gravitational-wave observations
MIT License
51 stars 16 forks source link

Fixed bug in NotImplementedError message #235

Closed annalena-k closed 5 months ago

annalena-k commented 5 months ago

This PR fixes a bug in a NotImplementedError message.

When running importance sampling without phase marginalization and a waveform model other than IMRPhenomXPHM, a NotImplementedError should be hit in generate_FD_modes_LO() of dingo/gw/waveform_generator/waveform_generator.py .

However, the error message itself throws the error TypeError: in method 'GetApproximantFromString', argument 1 of type 'char const *'* in line https://github.com/dingo-gw/dingo/blob/fa032dbfb3494118868fa9ac5efd88992fbd1416/dingo/gw/waveform_generator/waveform_generator.py#L694

This error occurs because self.approximant is an integer while the function LS.GetApproximantFromString(self.approximant) only takes strings/char-type inputs.

The command is replaced by self.approximant_str and the error message now prints correctly.