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

Overcompensating for binning? #209

Open
mmalenta opened this issue Aug 14, 2019 · 0 comments
Open

Overcompensating for binning? #209

mmalenta opened this issue Aug 14, 2019 · 0 comments

Comments

@mmalenta
Copy link
Collaborator

Issue Summary
In the the GPU binning kernel in aa_device_binning_kernel.cu, line 42, the added values are divided by a factor of 2, meaning we get the mean of whatever we have.
Later, at the dedispersion stage, in both dedispersion kernels in aa_device_dedispersion_kernel.cu in line 75 in the standard shared kernel for example, the dedispersed value is divided again, this time by the full binning factor. This causes the dedispersed values to decreased by a factor of 2 between ranges with different binning factors, which is most clearly visible in the MSD values:

Range 1, binning of 1:
MSD:[127.002228; 0.780149; 26580716.000000]
Range 2, binning of 2:
MSD:[63.335045; 0.354628; 6323154.000000]
Range 3, binning of 4:
MSD:[31.626286; 0.098126; 3215454.000000]

This should not have any effect on scientific results, as the data is essentially just scaled differently, but it might become problematic when higher DMs and larger scrunching factors are used due to squashing the data and introducing some precision issues, aspecially in the case of standard deviation.

Steps to Reproduce
Any data with multiple ranges and different binning factors per range.

Expected Outcome
Mean for each range to be similar, dedispersed values for different ranges to be similar.

Actual Outcome
Dedispersed values and means for different ranges decrease by a factor of 2 between ranges.

Configuration

Notes

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

No branches or pull requests

1 participant