Repository navigation
Conversation
GCArullo
marked this pull request as draft
June 24, 2026 20:21
Owner
|
Yesterday I went through the calibration. I merged the changes and I have a pp run for this. But, your implementation might be better. Maybe have a call and compare? |
minaskar
added a commit
to minaskar/HyperWave
that referenced
this pull request
Jun 25, 2026
get_clean_chain sized samples_in from column 0's NaN mask and then filled each column d with givenparam[~isnan(givenparam)] -- a per-column mask. When NaNs were uneven across parameters the columns ended up with different lengths and either raised ValueError on assignment or silently misaligned samples across parameters. Extract the shared chain-loading/cleaning into _ErynSamplesMixin (inherited by LVKinference and DataInference), delegating the NaN cleaning to clean_eryn_chain in a new numpy-only hyperwave.inference.chains module. The new helper applies a single ~isnan(...).any(axis=1) valid-row mask to every dimension, so columns are guaranteed equal length and NaN-free. Also drops the stray print(np.sum(naninds)) debug line. Adds tests/test_chains.py covering no-NaN passthrough, whole-walker NaN dropping, the per-dimension NaN regression, temperature selection, and a mixin-delegation check (skipped without the full GW stack). Task asasli#2 of the correctness/latent-bug list.
# Conflicts: # src/hyperwave/inference/__init__.py # src/hyperwave/inference/priors.py # src/hyperwave/likelihoods/gwparallel.py
…ertainties # Conflicts: # docs/index.md # src/hyperwave/__init__.py # src/hyperwave/detectors/__init__.py # src/hyperwave/validation.py
Owner
|
@GCArullo what is the status for this? |
Collaborator
Author
I haven't had a chance to test it yet, so tests listed above are still pending. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add calibration uncertainties similarly to bilby. Before merging we should at least:
[I initially tried to use bilby functions, so that if in the future they upgrade them we don't need to separately propagate these changes, but this was breaking hyperwave parallelisation. So what I do currently is to call bilby in tests and check there that outputs are equivalent.]
Warning: I have not yet tested it properly.