Skip to content

Commit 425450c

Browse files
committed
atm updates
1 parent 8ed3973 commit 425450c

15 files changed

Lines changed: 327 additions & 1310 deletions

File tree

RELEASE_NOTES.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
Version 1.26.0
2+
-------------------
3+
- ATM model changes
4+
- removed support for use of ATM model version 1.0. To use this version of the model, please use a previous version of this library.
5+
- forward function
6+
- renamed `height_integrated_rayleighs_lbh` output flag to `height_integrated_rayleighs_smile_uvi_lbh`
7+
- renamed `emission_lbh` output flag to `emission_smile_uvi_lbh`
8+
- renamed `plasma_pederson_conductivity` output flag to `plasma_pedersen_conductivity`
9+
- inversion function
10+
- removed the `atmospheric_attenuation_correction` parameter (was deprecated in v1.23.0)
11+
12+
113
Version 1.25.0
214
-------------------
315
- deprecated support for Python 3.9
@@ -7,8 +19,8 @@ Version 1.25.0
719
Version 1.24.0
820
-------------------
921
- ATM inversion changes
10-
- changed `characteristic_energy` output flag and data to `mean_energy`.
11-
- added `special_logic_keyword` parameter to help handle specific non-standard use cases on the backend ATM API.
22+
- renamed `characteristic_energy` output flag and data to `mean_energy`
23+
- added `special_logic_keyword` parameter to help handle specific non-standard use cases on the backend ATM API
1224

1325

1426
Version 1.23.3

docs/generated/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/generated/pyucalgarysrs/models/atm/classes_forward.html

Lines changed: 47 additions & 43 deletions
Large diffs are not rendered by default.

docs/generated/pyucalgarysrs/models/atm/classes_inverse.html

Lines changed: 8 additions & 567 deletions
Large diffs are not rendered by default.

docs/generated/pyucalgarysrs/models/atm/index.html

Lines changed: 42 additions & 63 deletions
Large diffs are not rendered by default.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
44

55
[tool.poetry]
66
name = "pyucalgarysrs"
7-
version = "1.25.0"
7+
version = "1.26.0"
88
description = "Tools for interacting with UCalgary Space Remote Sensing data"
99
readme = "README.md"
1010
homepage = "https://github.com/ucalgary-srs/pyUCalgarySRS"

pyucalgarysrs/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"""
3434

3535
# versioning info
36-
__version__ = "1.25.0"
36+
__version__ = "1.26.0"
3737

3838
# documentation
3939
__pdoc__ = {"pyucalgarysrs": False}
@@ -75,7 +75,6 @@
7575
ATMForwardResultRequestInfo,
7676
)
7777
from .models.atm.classes_inverse import (
78-
ATMInverseForwardParams,
7978
ATMInverseOutputFlags,
8079
ATMInverseRequest,
8180
ATMInverseResult,

pyucalgarysrs/models/atm/__init__.py

Lines changed: 17 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def forward(self,
7878
oxygen_correction_factor: float = ATM_DEFAULT_OXYGEN_CORRECTION_FACTOR,
7979
timescale_auroral: int = ATM_DEFAULT_TIMESCALE_AURORAL,
8080
timescale_transport: int = ATM_DEFAULT_TIMESCALE_TRANSPORT,
81-
atm_model_version: Literal["1.0", "2.0"] = ATM_DEFAULT_MODEL_VERSION,
81+
atm_model_version: Literal["2.0"] = ATM_DEFAULT_MODEL_VERSION,
8282
custom_spectrum: Optional[ndarray] = None,
8383
custom_neutral_profile: Optional[ndarray] = None,
8484
no_cache: bool = False,
@@ -96,9 +96,8 @@ def forward(self,
9696
square input (with time duration T0 and spatial width L) input of precipitation. The initial/boundary
9797
conditions are given by IRI. The output yields the mean density/VER over [0-L] at time T0.
9898
99-
Please note that some of the inputs and outputs are only supported by ATM version 2.0. The following
100-
inputs are only supported by version 2.0: `kappa_*`, `exponential_*`, `proton_*`, `d_region`, and
101-
`custom_neutral_profile`. The following outputs are only supported by version 2.0: `production_rate_*`.
99+
**NOTE**: As of PyUCalgarySRS version 1.26.0, support for model version '1.0' was removed. To
100+
use this version of the model, please use a prior release of PyUCalgarySRS.
102101
103102
**NOTE**: All spectral shapes are super-imposable except exponential (maxwellian, gaussian, kappa). The
104103
exponential spectrum should be only be used for high-energy tail and, starting from E0 (proton_starting_energy),
@@ -218,11 +217,8 @@ def forward(self,
218217
speed. Represented in seconds. Default is 600 (10 minutes). This parameter is optional.
219218
220219
atm_model_version (str):
221-
ATM model version number. Possible values are presently "1.0" or "2.0". The default is "2.0".
220+
ATM model version number. The default is "2.0". This parameter is optional.
222221
223-
**IMPORTANT**: Please note that certain inputs and outputs are only available in version "2.0". See above for
224-
more details. This parameter is optional.
225-
226222
no_cache (bool):
227223
The UCalgary Space Remote Sensing API utilizes a caching layer for performing ATM
228224
calculations. If this variation of input parameters has been run before (and the
@@ -242,6 +238,11 @@ def forward(self,
242238
Raises:
243239
pyucalgarysrs.exceptions.SRSAPIError: An API error was encountered
244240
"""
241+
if (atm_model_version == "1.0"):
242+
show_warning("Using ATM version 1.0 is no longer supported in this library. To use it, please interact " +
243+
"with the API directly (more information at https://api.phys.ucalgary.ca). Defaulting to using version 2.0.")
244+
atm_model_version = 2.0
245+
245246
return func_forward(
246247
self.__srs_obj,
247248
timestamp,
@@ -284,18 +285,17 @@ def inverse(self,
284285
output: ATMInverseOutputFlags,
285286
precipitation_flux_spectral_type: Literal["gaussian", "maxwellian"] = ATM_DEFAULT_PRECIPITATION_SPECTRAL_FLUX_TYPE,
286287
nrlmsis_model_version: Literal["00", "2.0"] = ATM_DEFAULT_NRLMSIS_MODEL_VERSION,
287-
atmospheric_attenuation_correction: bool = False,
288288
special_logic_keyword: str = ATM_DEFAULT_SPECIAL_LOGIC_KEYWORD,
289-
atm_model_version: Literal["1.0", "2.0"] = ATM_DEFAULT_MODEL_VERSION,
289+
atm_model_version: Literal["2.0"] = ATM_DEFAULT_MODEL_VERSION,
290290
no_cache: bool = False,
291291
timeout: Optional[int] = None) -> ATMInverseResult:
292292
"""
293293
Perform an inverse calculation using the TREx Auroral Transport Model and the supplied input
294294
parameters. Note that this function utilizes the UCalgary Space Remote Sensing API to perform
295295
the calculation.
296296
297-
**NOTE**: The 'atmospheric_attenuation_correction' parameter from ATM model version 1.0 was deprecated
298-
in v1.23.0. Please ensure you perform this conversion yourself on the results, if desired.
297+
**NOTE**: As of PyUCalgarySRS version 1.26.0, support for model version '1.0' was removed. To
298+
use this version of the model, please use a prior release of PyUCalgarySRS.
299299
300300
**NOTE**: As of PyUCalgarySRS version 1.24.0, the `characteristic_energy` output flag was deprecated.
301301
Please use `mean_energy` instead.
@@ -346,18 +346,12 @@ def inverse(self,
346346
optional. More details about this empirical model can be found [here](https://ccmc.gsfc.nasa.gov/models/NRLMSIS~00/),
347347
and [here](https://ccmc.gsfc.nasa.gov/models/NRLMSIS~2.0/).
348348
349-
atmospheric_attenuation_correction (bool):
350-
Apply an atmospheric attenuation correction factor. Default is `False`.
351-
352-
This parameter was deprecated in v1.23.0, and will be removed in a future release.
353-
354349
special_logic_keyword (str):
355350
Use a special keyword provided by UCalgary staff to apply alternative logic during an ATM inversion
356351
request. This parameter is optional.
357352
358353
atm_model_version (str):
359-
ATM model version number. Possible values are only '1.0' at this time, but will have
360-
additional possible values in the future. This parameter is optional.
354+
ATM model version number. The default is "2.0". This parameter is optional.
361355
362356
no_cache (bool):
363357
The UCalgary Space Remote Sensing API utilizes a caching layer for performing ATM
@@ -378,9 +372,10 @@ def inverse(self,
378372
Raises:
379373
pyucalgarysrs.exceptions.SRSAPIError: An API error was encountered
380374
"""
381-
if (atmospheric_attenuation_correction is True):
382-
show_warning("The atmospheric_attenuation_correction parameter was deprecated in v1.23.0. If you want this correction, " +
383-
"please perform it yourself on the result.")
375+
if (atm_model_version == "1.0"):
376+
show_warning("Using ATM version 1.0 is no longer supported in this library. To use it, please interact " +
377+
"with the API directly (more information at https://api.phys.ucalgary.ca). Defaulting to using version 2.0.")
378+
atm_model_version = 2.0
384379

385380
return func_inverse(
386381
self.__srs_obj,

0 commit comments

Comments
 (0)