Skip to content

Conversation

@GarethCabournDavies
Copy link
Contributor

This is my attempt to remove the DeprecationWarning in setup_marginalization.

Ive added a marginalise_polarization kwarg which is True by default, and does some of the needed stuff that causes a crash later.

Standard information about the request

This is a deprecation
This change affects inference

This change: has appropriate unit tests, follows style guidelines (See e.g. PEP8), has been proposed using the contribution guidelines

This change might warrant a new release, but I'm not sure

Motivation

Deprecate the thing that's had a DeprecationWarning for a while

Contents

Remove the if statement that had the warning, add a True-by-default kwarg, and add in the stuff that was needed.

I may need to rethink this as it could break when using False, but I'm not sure. We could just do the marginalisation as default without any kwarg? This was already broken if polarization_samples wasn't in the kwargs before anyway so that could be a future fix

Links to any issues or associated PRs

#5179 #4093

Testing performed

Passes the automated tests

Additional notes

🗒️

  • The author of this pull request confirms they will adhere to the code of conduct

@GarethCabournDavies GarethCabournDavies added inference code of conduct agreed The author of this PR agrees to the code of conduct labels Oct 14, 2025
marginalize_vector_params=None,
marginalize_vector_samples=1e3,
marginalize_sky_initial_samples=1e6,
marginalize_polarization=True,
Copy link
Member

Choose a reason for hiding this comment

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

See below

self.marginalize_sky_initial_samples = \
int(float(marginalize_sky_initial_samples))

if marginalize_polarization:
Copy link
Member

Choose a reason for hiding this comment

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

I don't think you want this section at all. The point was to just use the more general marginalize_vector setup. I think this change should just be removing options, not renaming them.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was added in as self.marginalize_vector_params must have 'polarization' as a key later. I'm happy to simply put this in as a no-if-statement thing if that is better?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code of conduct agreed The author of this PR agrees to the code of conduct inference

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants