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

Adding log binning option for source density #679

Merged
merged 9 commits into from
Dec 10, 2020

Conversation

cmurray-astro
Copy link
Member

Addressing #651, I am working on enabling log binning in source density. This involves including an additional source density parameter in the beast_settings file (will update the beast-examples/ files as well), called "sd_binmode" which can be "linear" or "log". I also added raised errors for the linear case if both the number of bins and the bin width are set, and errors for the log case if the number of bins is not set.

Currently, the way it works is to find the min and max source densities in the field, and then use the sd_Nbins (number of bins) parameter to determine logarithmically-spaced bins. The minimum is the first value in the image greater than zero (as the sd image contains a lot of zeros on the edges which aren't actually from the data). Looking forward to thoughts!

@codecov-io
Copy link

Codecov Report

Merging #679 (571037a) into master (ac10317) will decrease coverage by 0.04%.
The diff coverage is 3.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #679      +/-   ##
==========================================
- Coverage   42.85%   42.80%   -0.05%     
==========================================
  Files          98       98              
  Lines        9443     9454      +11     
==========================================
  Hits         4047     4047              
- Misses       5396     5407      +11     
Impacted Files Coverage Δ
beast/observationmodel/ast/make_ast_input_list.py 7.27% <ø> (+0.08%) ⬆️
beast/observationmodel/ast/make_ast_xy_list.py 5.19% <ø> (ø)
beast/tools/cut_catalogs.py 14.75% <ø> (ø)
beast/tools/run/make_ast_inputs.py 14.75% <ø> (ø)
beast/tools/split_catalog_using_map.py 14.54% <ø> (ø)
beast/tools/density_map.py 21.87% <3.33%> (-3.43%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ac10317...571037a. Read the comment docs.

Copy link
Member

@karllark karllark left a comment

Choose a reason for hiding this comment

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

Looks great. I feel some documentation would be good to advertise to users that there is the option of linear/log source density spacings. Would this be possible/"easy"?

@cmurray-astro
Copy link
Member Author

sure! can do this morning.

Copy link
Member

@karllark karllark left a comment

Choose a reason for hiding this comment

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

Great to have docs!

@karllark
Copy link
Member

Link test failed due to a timeout - checked manually and this link is fine. Will merge.

@karllark karllark merged commit b1950c6 into BEAST-Fitting:master Dec 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants