Cleaning up codebase and restructuring OpticalThickness calculation #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 fixes a couple of the issues in #16 related to unused code and global instances.
Changes:
use_numba
option deprecated. I think it might be possible to fix it in future, but for now the numba functionality certainly is not robust.Lots of tidying in
Absorption_Crosssections_HITRAN2016
:ClimateUtilities
import, addedimport numpy
insteadQGenericLin
andQGenericNonLin
have been replaced with one function which takes the power law exponent as an input. I've made this exponent part of themolecules
dictionary which is defined near the top.global
instances removed! This makes the code much more readable and easy to debug, and also is one step towards restoring thenumba
functionality, although not quite there yet...loadSpectralLines()
BEFORE the main loops inOpticalThickness.py
ClimateGraphics.py
,ClimateGraphics_MPL.py
,DummyGraphics.py
andClimateUtilities.py
phys.py
object_helpers.py
The tests all run okay, I'd recommend running them yourself on your platform first though and checking that you get the same numbers compared to the base version before merging, just as a sanity check! :)
Also, as far as the user is concerned there aren't any changes to the API either, it's just cleaner behind the scenes!