New slice function of Histdd to support binning fragment #17
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.
This PR modifies the function
Histdd.slice
, to let it support binning fragment when thestart
orstop
are not exactly at the bin edges. The fragments are calculated by multiplying the original histogram by the bin volume inclusion fraction.For example,
![Screenshot 2024-10-29 at 9 12 24 PM](https://private-user-images.githubusercontent.com/39773361/381351739-de0f1ba6-76ce-4ad0-9ab6-49b8d83817d0.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxNzcyNTYsIm5iZiI6MTczOTE3Njk1NiwicGF0aCI6Ii8zOTc3MzM2MS8zODEzNTE3MzktZGUwZjFiYTYtNzZjZS00YWQwLTlhYjYtNDliOGQ4MzgxN2QwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEwVDA4NDIzNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTQwNDU3M2NkNzZhYTk1M2M0YmE3OGQ5MjY3OGUwOGFkMmI3MTcyOWE5ODNmZGJiYzFhZmQzMmNmZDQyMTZmM2UmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.ue03Ls1dQ-vDiKeBOqD7x6tdI0vh6r544uCWt8iwEk0)
is from the the following code