-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add netcdf support for troposphere * reformat for pre-commit * remove unnecessary lines * avoid internal `opera_utils` function * add xarray for atmosphere test reqs * review suggestions for optional dependencies * remove comment --------- Co-authored-by: mirzaees <[email protected]> Co-authored-by: Scott Staniewicz <[email protected]> Co-authored-by: Scott Staniewicz <[email protected]>
- Loading branch information
1 parent
d8cddda
commit 8dd0149
Showing
13 changed files
with
3,046 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,33 @@ | ||
"""Atmospheric corrections.""" | ||
from typing import Any | ||
|
||
from .ionosphere import * | ||
from .troposphere import * | ||
from .ionosphere import estimate_ionospheric_delay | ||
from .troposphere import estimate_tropospheric_delay | ||
|
||
__all__ = [ | ||
"estimate_ionospheric_delay", | ||
"estimate_tropospheric_delay", | ||
] | ||
|
||
|
||
def __getattr__(name: str) -> Any: | ||
if name == "delay_from_netcdf": | ||
# let's load this module lazily to avoid an ImportError | ||
# for when we don't use netcdf | ||
from ._netcdf import delay_from_netcdf | ||
|
||
return delay_from_netcdf | ||
|
||
if name in __all__: | ||
return globals()[name] | ||
|
||
errmsg = f"module {__name__!r} has no attribute {name!r}" | ||
raise AttributeError(errmsg) | ||
|
||
|
||
def __dir__() -> list[str]: | ||
try: | ||
from ._netcdf import delay_from_netcdf | ||
except ModuleNotFoundError: | ||
return __all__ | ||
else: | ||
return sorted([*__all__, "delay_from_netcdf"]) |
Oops, something went wrong.