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

Tabulated UVB/cooling needs refactoring #128

Open
brittonsmith opened this issue Dec 13, 2022 · 0 comments
Open

Tabulated UVB/cooling needs refactoring #128

brittonsmith opened this issue Dec 13, 2022 · 0 comments
Labels
enhancement New feature or request refactor internal reorganization or code simplification with no behavior changes
Milestone

Comments

@brittonsmith
Copy link
Contributor

There is so low hanging refactoring fruit in the tabulated UV background and cooling code that yield some minor optimizations, cut down on duplicate code, and standardize a few things. The list I can think of so far includes:

  • refactor initialize_cloudy_data.c to use the read_dataset function implemented in initialize_UVbackground_data.c
  • UVB rates should be converted to code units and logspace upon read in initialize_UVbackground_data.c like the cooling tables. This would prevent having to do this every time in update_UVbackground_rates.c
  • update_UVbackground_rates.c could use a more efficient of calculating the interpolation index than the brute force for loop. For tables evenly spaced in log(1 + z), we can do this with algebra. Otherwise, bisection would also be an improvement.
@brittonsmith brittonsmith added enhancement New feature or request refactor internal reorganization or code simplification with no behavior changes labels Dec 13, 2022
@brittonsmith brittonsmith added this to the 3.3 milestone Dec 13, 2022
@brittonsmith brittonsmith modified the milestones: 3.3, 3.4 Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request refactor internal reorganization or code simplification with no behavior changes
Projects
None yet
Development

No branches or pull requests

1 participant