Tabulated UVB/cooling needs refactoring #128
Labels
enhancement
New feature or request
refactor
internal reorganization or code simplification with no behavior changes
Milestone
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:
initialize_cloudy_data.c
to use theread_dataset
function implemented ininitialize_UVbackground_data.c
initialize_UVbackground_data.c
like the cooling tables. This would prevent having to do this every time inupdate_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.The text was updated successfully, but these errors were encountered: