Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modified scaling.bins_pairs_by_distance to fix error thrown by narrow distance ranges. #152

Merged
merged 2 commits into from
Nov 8, 2022

Conversation

itsameerkat
Copy link
Member

Proposed fix for this issue.

When compared to the changes proposed, there two differences: 1) I added np.iinfo(np.int64).max to the end of dist_bins instead of np.inf and 2) I added two additional conditions to this mask to filter out entries in the pairs_reduced_df dataframe that fall outside the min and max of dist_bins.

Tested the changes on HFF Micro-C and everything seems to be in order:

Screen Shot 2022-11-07 at 11 19 31 PM

The final dataframe that is returned still contains entries with min_dist and max_dist values outside of the inputted distance range but that is because of make_empty_scaling function called on line 243 reintroduces them into the dataframe. I'm assuming that this is by design and so I didn't change that behavior.

Apologies for the strange documentation in the commits. Something went wrong with the formatting.

Copy link
Member

@agalitsyna agalitsyna left a comment

Choose a reason for hiding this comment

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

Looks good to me! Thanks for the extensive explanations.

@agalitsyna agalitsyna merged commit 63db477 into open2c:master Nov 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants