pyIntensityFeatures 0.1.0__tar.gz → 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pyintensityfeatures-0.2.0/.zenodo.json +39 -0
- pyintensityfeatures-0.2.0/CHANGELOG.md +31 -0
- {pyintensityfeatures-0.1.0 → pyintensityfeatures-0.2.0}/CODE_OF_CONDUCT.md +1 -1
- {pyintensityfeatures-0.1.0 → pyintensityfeatures-0.2.0}/PKG-INFO +6 -5
- {pyintensityfeatures-0.1.0 → pyintensityfeatures-0.2.0}/README.md +2 -2
- {pyintensityfeatures-0.1.0 → pyintensityfeatures-0.2.0}/pyIntensityFeatures/__init__.py +2 -5
- {pyintensityfeatures-0.1.0 → pyintensityfeatures-0.2.0}/pyIntensityFeatures/_main.py +3 -1
- {pyintensityfeatures-0.1.0 → pyintensityfeatures-0.2.0}/pyIntensityFeatures/instruments/__init__.py +2 -0
- {pyintensityfeatures-0.1.0 → pyintensityfeatures-0.2.0}/pyIntensityFeatures/instruments/satellites.py +2 -4
- {pyintensityfeatures-0.1.0 → pyintensityfeatures-0.2.0}/pyIntensityFeatures/proc/__init__.py +2 -0
- {pyintensityfeatures-0.1.0 → pyintensityfeatures-0.2.0}/pyIntensityFeatures/proc/boundaries.py +2 -0
- {pyintensityfeatures-0.1.0 → pyintensityfeatures-0.2.0}/pyIntensityFeatures/proc/fitting.py +5 -7
- {pyintensityfeatures-0.1.0 → pyintensityfeatures-0.2.0}/pyIntensityFeatures/proc/intensity.py +3 -1
- pyintensityfeatures-0.2.0/pyIntensityFeatures/tests/__init__.py +6 -0
- {pyintensityfeatures-0.1.0 → pyintensityfeatures-0.2.0}/pyIntensityFeatures/tests/test_instruments_satellites.py +1 -0
- {pyintensityfeatures-0.1.0 → pyintensityfeatures-0.2.0}/pyIntensityFeatures/tests/test_main.py +5 -4
- {pyintensityfeatures-0.1.0 → pyintensityfeatures-0.2.0}/pyIntensityFeatures/tests/test_proc_boundaries.py +1 -0
- {pyintensityfeatures-0.1.0 → pyintensityfeatures-0.2.0}/pyIntensityFeatures/tests/test_proc_fitting.py +1 -0
- {pyintensityfeatures-0.1.0 → pyintensityfeatures-0.2.0}/pyIntensityFeatures/tests/test_proc_intensity.py +51 -0
- {pyintensityfeatures-0.1.0 → pyintensityfeatures-0.2.0}/pyIntensityFeatures/tests/test_utils_checks.py +3 -1
- {pyintensityfeatures-0.1.0 → pyintensityfeatures-0.2.0}/pyIntensityFeatures/tests/test_utils_coords.py +1 -0
- {pyintensityfeatures-0.1.0 → pyintensityfeatures-0.2.0}/pyIntensityFeatures/tests/test_utils_distributions.py +1 -0
- {pyintensityfeatures-0.1.0 → pyintensityfeatures-0.2.0}/pyIntensityFeatures/tests/test_utils_grids.py +1 -0
- {pyintensityfeatures-0.1.0 → pyintensityfeatures-0.2.0}/pyIntensityFeatures/tests/test_utils_output.py +3 -2
- {pyintensityfeatures-0.1.0 → pyintensityfeatures-0.2.0}/pyIntensityFeatures/utils/__init__.py +2 -0
- {pyintensityfeatures-0.1.0 → pyintensityfeatures-0.2.0}/pyIntensityFeatures/utils/checks.py +3 -1
- {pyintensityfeatures-0.1.0 → pyintensityfeatures-0.2.0}/pyIntensityFeatures/utils/coords.py +2 -0
- {pyintensityfeatures-0.1.0 → pyintensityfeatures-0.2.0}/pyIntensityFeatures/utils/distributions.py +6 -1
- {pyintensityfeatures-0.1.0 → pyintensityfeatures-0.2.0}/pyIntensityFeatures/utils/grids.py +2 -0
- {pyintensityfeatures-0.1.0 → pyintensityfeatures-0.2.0}/pyIntensityFeatures/utils/output.py +2 -0
- {pyintensityfeatures-0.1.0 → pyintensityfeatures-0.2.0}/pyIntensityFeatures.egg-info/PKG-INFO +6 -5
- {pyintensityfeatures-0.1.0 → pyintensityfeatures-0.2.0}/pyIntensityFeatures.egg-info/requires.txt +1 -1
- {pyintensityfeatures-0.1.0 → pyintensityfeatures-0.2.0}/pyproject.toml +4 -3
- {pyintensityfeatures-0.1.0 → pyintensityfeatures-0.2.0}/setup.cfg +1 -1
- pyintensityfeatures-0.1.0/.zenodo.json +0 -35
- pyintensityfeatures-0.1.0/CHANGELOG.md +0 -17
- pyintensityfeatures-0.1.0/pyIntensityFeatures/tests/__init__.py +0 -1
- {pyintensityfeatures-0.1.0 → pyintensityfeatures-0.2.0}/.readthedocs.yml +0 -0
- {pyintensityfeatures-0.1.0 → pyintensityfeatures-0.2.0}/ACKNOWLEDGEMENTS.rst +0 -0
- {pyintensityfeatures-0.1.0 → pyintensityfeatures-0.2.0}/CONTRIBUTING.md +0 -0
- {pyintensityfeatures-0.1.0 → pyintensityfeatures-0.2.0}/LICENSE +0 -0
- {pyintensityfeatures-0.1.0 → pyintensityfeatures-0.2.0}/MANIFEST.in +0 -0
- {pyintensityfeatures-0.1.0 → pyintensityfeatures-0.2.0}/pyIntensityFeatures.egg-info/SOURCES.txt +0 -0
- {pyintensityfeatures-0.1.0 → pyintensityfeatures-0.2.0}/pyIntensityFeatures.egg-info/dependency_links.txt +0 -0
- {pyintensityfeatures-0.1.0 → pyintensityfeatures-0.2.0}/pyIntensityFeatures.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"license": {
|
|
3
|
+
"id": "bsd-license"
|
|
4
|
+
},
|
|
5
|
+
"notes": "When referencing this package, please cite both the package DOI and the pyIntensityFeatures journal article: Burrell, A. G., Chisham, G., Longden, N., Fritz, B., & Zawdie, K. A. (2025). Automated identification of auroral luminosity boundaries using pyIntensityFeatures. Journal of Geophysical Research: Space Physics, 130, e2025JA034230. doi:10.1029/2025JA034230.",
|
|
6
|
+
"references": [
|
|
7
|
+
"Burrell, A. G., Chisham, G., Longden, N., Fritz, B., & Zawdie, K. A. (2025). Automated identification of auroral luminosity boundaries using pyIntensityFeatures. Journal of Geophysical Research: Space Physics, 130, e2025JA034230. doi:10.1029/2025JA034230."
|
|
8
|
+
],
|
|
9
|
+
"keywords": [
|
|
10
|
+
"aurora",
|
|
11
|
+
"aurora australis",
|
|
12
|
+
"aurora borealis",
|
|
13
|
+
"boundaries",
|
|
14
|
+
"imager",
|
|
15
|
+
"ionosphere",
|
|
16
|
+
"heliophysics",
|
|
17
|
+
"magnetosphere",
|
|
18
|
+
"northern lights",
|
|
19
|
+
"intensity",
|
|
20
|
+
"southern lights",
|
|
21
|
+
"features"
|
|
22
|
+
],
|
|
23
|
+
"creators": [
|
|
24
|
+
{
|
|
25
|
+
"orcid": "0000-0001-8875-9326",
|
|
26
|
+
"affiliation": "Naval Research Laboratory",
|
|
27
|
+
"name": "Angeline G. Burrell"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"affiliation": "KPMG",
|
|
31
|
+
"name": "Nicola S. Longden"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"orcid": "0000-0003-1151-5934",
|
|
35
|
+
"affiliation": "British Antarctic Survey",
|
|
36
|
+
"name": "Gareth Chisham"
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
Changelog
|
|
2
|
+
=========
|
|
3
|
+
|
|
4
|
+
Summary of all changes made since the first release
|
|
5
|
+
|
|
6
|
+
0.2.0 (2026-03-20)
|
|
7
|
+
------------------
|
|
8
|
+
* Fixed bug in the CI apexpy installation
|
|
9
|
+
* Cycled Python version support and updated NEP 29 test
|
|
10
|
+
* Expanded unit tests
|
|
11
|
+
* Removed support for older SciPy versions
|
|
12
|
+
* Added journal article citation to the documents and .zenodo.json
|
|
13
|
+
* Added missing badges to the README
|
|
14
|
+
* Added DOI to file headers
|
|
15
|
+
* Updated documentation by fixing incorrect description of keywords,
|
|
16
|
+
updating hyperlinks, and fixing a typo in the fitting example
|
|
17
|
+
* Updated xarray objects to use `sizes` attribute instead of `dims`
|
|
18
|
+
* Added an error catch to remove RuntimeWarning in `gauss` function
|
|
19
|
+
|
|
20
|
+
0.1.0 (2025-03-28)
|
|
21
|
+
------------------
|
|
22
|
+
* Added option to specify maximum dayglow
|
|
23
|
+
* Updated `as_datetime` to remove timezone information
|
|
24
|
+
* Added a unique function that rounds to a specified significance level
|
|
25
|
+
* Extracted code that identified the parameters for Gaussian fitting into a
|
|
26
|
+
separate function
|
|
27
|
+
* Added publication release statements
|
|
28
|
+
|
|
29
|
+
0.0.1 (2024-03-01)
|
|
30
|
+
------------------
|
|
31
|
+
* Alpha Release
|
|
@@ -72,4 +72,4 @@ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
|
|
72
72
|
version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
|
|
73
73
|
|
|
74
74
|
[homepage]: https://contributor-covenant.org
|
|
75
|
-
[version]: https://contributor-covenant.org/version/1/4/
|
|
75
|
+
[version]: https://www.contributor-covenant.org/version/1/4/code-of-conduct/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pyIntensityFeatures
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2.0
|
|
4
4
|
Summary: Identify features, such as auroral luminosity boundaries, in imager data
|
|
5
5
|
Home-page: https://github.com/aburrell/pyIntensityFeatures
|
|
6
6
|
Author-email: Angeline Burrell <angeline.g.burrell.civ@us.navy.mil>
|
|
@@ -49,16 +49,17 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
49
49
|
Classifier: Programming Language :: Python :: 3.11
|
|
50
50
|
Classifier: Programming Language :: Python :: 3.12
|
|
51
51
|
Classifier: Programming Language :: Python :: 3.13
|
|
52
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
52
53
|
Classifier: Operating System :: POSIX :: Linux
|
|
53
54
|
Classifier: Operating System :: MacOS :: MacOS X
|
|
54
55
|
Classifier: Operating System :: Microsoft :: Windows
|
|
55
|
-
Requires-Python: >=3.
|
|
56
|
+
Requires-Python: >=3.10
|
|
56
57
|
Description-Content-Type: text/markdown
|
|
57
58
|
License-File: LICENSE
|
|
58
59
|
Requires-Dist: aacgmv2
|
|
59
60
|
Requires-Dist: numpy
|
|
60
61
|
Requires-Dist: pandas
|
|
61
|
-
Requires-Dist: scipy
|
|
62
|
+
Requires-Dist: scipy>=1.9.0
|
|
62
63
|
Requires-Dist: xarray
|
|
63
64
|
Provides-Extra: apex
|
|
64
65
|
Requires-Dist: apexpy; extra == "apex"
|
|
@@ -76,8 +77,8 @@ Requires-Dist: sphinx_rtd_theme; extra == "doc"
|
|
|
76
77
|
Dynamic: license-file
|
|
77
78
|
|
|
78
79
|
[](http://pyIntensityFeatures.readthedocs.io/en/latest/?badge=latest)
|
|
79
|
-
[DOI]
|
|
80
|
-
[PyPI version]
|
|
80
|
+
[](https://doi.org/10.5281/zenodo.15102100)
|
|
81
|
+
[](https://badge.fury.io/py/pyIntensityFeatures)
|
|
81
82
|
[](https://github.com/aburrell/pyIntensityFeatures/actions/workflows/main.yml)
|
|
82
83
|
[](https://coveralls.io/github/aburrell/pyIntensityFeatures?branch=main)
|
|
83
84
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[](http://pyIntensityFeatures.readthedocs.io/en/latest/?badge=latest)
|
|
2
|
-
[DOI]
|
|
3
|
-
[PyPI version]
|
|
2
|
+
[](https://doi.org/10.5281/zenodo.15102100)
|
|
3
|
+
[](https://badge.fury.io/py/pyIntensityFeatures)
|
|
4
4
|
[](https://github.com/aburrell/pyIntensityFeatures/actions/workflows/main.yml)
|
|
5
5
|
[](https://coveralls.io/github/aburrell/pyIntensityFeatures?branch=main)
|
|
6
6
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env python
|
|
2
2
|
# -*- coding: utf-8 -*-
|
|
3
|
+
# DOI: 10.5281/zenodo.15102100
|
|
3
4
|
# Full license can be found in License.md
|
|
4
5
|
#
|
|
5
6
|
# DISTRIBUTION STATEMENT A: Approved for public release. Distribution is
|
|
@@ -8,11 +9,7 @@
|
|
|
8
9
|
"""Package to identify intensity features in imager data."""
|
|
9
10
|
|
|
10
11
|
import logging
|
|
11
|
-
|
|
12
|
-
try:
|
|
13
|
-
from importlib import metadata
|
|
14
|
-
except ImportError:
|
|
15
|
-
import importlib_metadata as metadata
|
|
12
|
+
from importlib import metadata
|
|
16
13
|
|
|
17
14
|
# Define a logger object to allow easier log handling
|
|
18
15
|
logging.raiseExceptions = False
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env python
|
|
2
2
|
# -*- coding: utf-8 -*-
|
|
3
|
+
# DOI: 10.5281/zenodo.15102100
|
|
4
|
+
# Full license can be found in License.md
|
|
3
5
|
#
|
|
4
6
|
# DISTRIBUTION STATEMENT A: Approved for public release. Distribution is
|
|
5
7
|
# unlimited.
|
|
@@ -374,7 +376,7 @@ class AuroralBounds(object):
|
|
|
374
376
|
un_threshold : float
|
|
375
377
|
Maximum acceptable uncertainty value in degrees (default=1.25)
|
|
376
378
|
dayglow_threshold : float
|
|
377
|
-
|
|
379
|
+
Maximum allowable background intensity value in Rayleighs
|
|
378
380
|
(default=300.0)
|
|
379
381
|
strict_fit : bool
|
|
380
382
|
Enforce positive values for the x-offsets in quadratic-Gaussian fits
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env python
|
|
2
2
|
# -*- coding: utf-8 -*-
|
|
3
|
+
# DOI: 10.5281/zenodo.15102100
|
|
4
|
+
# Full license can be found in License.md
|
|
3
5
|
#
|
|
4
6
|
# DISTRIBUTION STATEMENT A: Approved for public release. Distribution is
|
|
5
7
|
# unlimited.
|
|
@@ -117,10 +119,6 @@ def get_auroral_slice(time_data, glat_data, glon_data, int_data,
|
|
|
117
119
|
if itime >= len(time_data):
|
|
118
120
|
itime = -1
|
|
119
121
|
|
|
120
|
-
if len(sweep_times) == 0:
|
|
121
|
-
# If no times were found, insert the start time
|
|
122
|
-
sweep_times.append(start_time)
|
|
123
|
-
|
|
124
122
|
sweep_times.append(time_data[itime])
|
|
125
123
|
|
|
126
124
|
# The sweep has ended, select the desired time indices
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env python
|
|
2
2
|
# -*- coding: utf-8 -*-
|
|
3
|
+
# DOI: 10.5281/zenodo.15102100
|
|
4
|
+
# Full license can be found in License.md
|
|
3
5
|
#
|
|
4
6
|
# DISTRIBUTION STATEMENT A: Approved for public release. Distribution is
|
|
5
7
|
# unlimited.
|
|
@@ -315,13 +317,9 @@ def get_gaussian_func_fit(mlat_bins, mlt_bins, mean_intensity, std_intensity,
|
|
|
315
317
|
gauss_out[fmask])
|
|
316
318
|
func_params.append(lsq_result[0])
|
|
317
319
|
|
|
318
|
-
#
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
fit_pearsonp.append(pres.pvalue)
|
|
322
|
-
else:
|
|
323
|
-
fit_pearsonr.append(pres[0])
|
|
324
|
-
fit_pearsonp.append(pres[1])
|
|
320
|
+
# SciPy versions below 1.9.0 will not work
|
|
321
|
+
fit_pearsonr.append(pres.statistic)
|
|
322
|
+
fit_pearsonp.append(pres.pvalue)
|
|
325
323
|
|
|
326
324
|
fit_cov.append(lsq_result[1])
|
|
327
325
|
found_fit = True
|
{pyintensityfeatures-0.1.0 → pyintensityfeatures-0.2.0}/pyIntensityFeatures/proc/intensity.py
RENAMED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env python
|
|
2
2
|
# -*- coding: utf-8 -*-
|
|
3
|
+
# DOI: 10.5281/zenodo.15102100
|
|
4
|
+
# Full license can be found in License.md
|
|
3
5
|
#
|
|
4
6
|
# DISTRIBUTION STATEMENT A: Approved for public release. Distribution is
|
|
5
7
|
# unlimited.
|
|
@@ -49,7 +51,7 @@ def find_intensity_boundaries(intensity, glat, glon, sweep_times, alt,
|
|
|
49
51
|
un_threshold : float
|
|
50
52
|
Maximum acceptable uncertainty value in degrees (default=1.25)
|
|
51
53
|
dayglow_threshold : float
|
|
52
|
-
|
|
54
|
+
Maximum allowable background intensity value in Rayleighs (default=300)
|
|
53
55
|
strict_fit : bool
|
|
54
56
|
Enforce positive values for the x-offsets in quadratic-Gaussian fits
|
|
55
57
|
(default=False)
|
{pyintensityfeatures-0.1.0 → pyintensityfeatures-0.2.0}/pyIntensityFeatures/tests/test_main.py
RENAMED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env python
|
|
2
2
|
# -*- coding: utf-8 -*-
|
|
3
|
+
# DOI: 10.5281/zenodo.15102100
|
|
3
4
|
# Full license can be found in License.md
|
|
4
5
|
#
|
|
5
6
|
# DISTRIBUTION STATEMENT A: Approved for public release. Distribution is
|
|
@@ -215,8 +216,8 @@ class TestAuroralBounds(unittest.TestCase):
|
|
|
215
216
|
end = pyIntensityFeatures.utils.coords.as_datetime(
|
|
216
217
|
self.inst_data[self.time_var].values[-1])
|
|
217
218
|
else:
|
|
218
|
-
start = self.inst_data[self.time_var][0]
|
|
219
|
-
end = self.inst_data[self.time_var][-1]
|
|
219
|
+
start = list(self.inst_data[self.time_var])[0]
|
|
220
|
+
end = list(self.inst_data[self.time_var])[-1]
|
|
220
221
|
|
|
221
222
|
# Evaluate the times
|
|
222
223
|
self.assertTrue(self.alb.stime == start,
|
|
@@ -273,7 +274,7 @@ class TestAuroralBounds(unittest.TestCase):
|
|
|
273
274
|
msg="unexpected default attributes")
|
|
274
275
|
self.assertDictEqual({'sweep_start': 1, 'mlt': 48, 'coeff': 6,
|
|
275
276
|
'lat': 31, 'sweep_end': 1},
|
|
276
|
-
dict(self.alb.boundaries.
|
|
277
|
+
dict(self.alb.boundaries.sizes),
|
|
277
278
|
msg="unexpected default dimensions")
|
|
278
279
|
self.assertListEqual(["sweep_start", "sweep_end", "mlt", "hemisphere",
|
|
279
280
|
"lat"],
|
|
@@ -552,7 +553,7 @@ class TestAuroralBounds(unittest.TestCase):
|
|
|
552
553
|
self.inst_data = self.inst_data[:-10]
|
|
553
554
|
else:
|
|
554
555
|
self.inst_data = xr.Dataset({
|
|
555
|
-
var: (self.inst_data[var].
|
|
556
|
+
var: (self.inst_data[var].sizes,
|
|
556
557
|
self.inst_data[var].values[:-10])
|
|
557
558
|
for var in [self.time_var, self.glat_var, self.glon_var,
|
|
558
559
|
self.intensity_var, 'clean_flag']})
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env python
|
|
2
2
|
# -*- coding: utf-8 -*-
|
|
3
|
+
# DOI: 10.5281/zenodo.15102100
|
|
3
4
|
# Full license can be found in License.md
|
|
4
5
|
#
|
|
5
6
|
# DISTRIBUTION STATEMENT A: Approved for public release. Distribution is
|
|
@@ -203,3 +204,53 @@ class TestIntensityFuncs(unittest.TestCase):
|
|
|
203
204
|
intensity.find_intensity_boundaries,
|
|
204
205
|
*args)
|
|
205
206
|
return
|
|
207
|
+
|
|
208
|
+
def test_find_intensity_bad_eq_boundaries(self):
|
|
209
|
+
"""Test boundary ID in an equatorial boundary failure."""
|
|
210
|
+
# Change intensity to have a peak where the equatorial boundary will
|
|
211
|
+
# not be defined
|
|
212
|
+
self.intensity = mult_gauss_quad(self.glat, *[
|
|
213
|
+
1.0, 0.01, 0.001, 500.0, 60.0, 3.0])
|
|
214
|
+
|
|
215
|
+
for hemi in [-1, 1]:
|
|
216
|
+
with self.subTest(hemi=hemi):
|
|
217
|
+
# Get the boundary outputs
|
|
218
|
+
(self.sweep_end, self.out_data,
|
|
219
|
+
self.out_coeff) = intensity.find_intensity_boundaries(
|
|
220
|
+
self.intensity, hemi * self.glat, self.glon,
|
|
221
|
+
self.sweep_times, self.alt, self.min_mlat_base,
|
|
222
|
+
self.max_coeff, mlat_inc=self.mlat_inc,
|
|
223
|
+
mlt_inc=self.mlt_inc, strict_fit=self.strict_fit)
|
|
224
|
+
|
|
225
|
+
# Evaluate the outputs
|
|
226
|
+
self.assertEqual(self.sweep_end, self.sweep_times[-1])
|
|
227
|
+
self.assertLessEqual(self.out_coeff, 12)
|
|
228
|
+
self.assertGreater(self.out_coeff, 0)
|
|
229
|
+
self.assertTrue(np.isnan(self.out_data['eq_bounds']).all())
|
|
230
|
+
self.assertFalse(np.isnan(self.out_data['po_bounds']).all())
|
|
231
|
+
|
|
232
|
+
return
|
|
233
|
+
|
|
234
|
+
def test_find_intensity_bad_po_boundaries(self):
|
|
235
|
+
"""Test boundary ID in a polar boundary failure."""
|
|
236
|
+
# Change intensity to have a peak where the polar boundary will not
|
|
237
|
+
# be defined in the southern hemisphere
|
|
238
|
+
self.intensity = mult_gauss_quad(self.glat, *[
|
|
239
|
+
-1.0, -0.1, 0.01, 40.0, 77.0, 5.0])
|
|
240
|
+
|
|
241
|
+
# Get the boundary outputs
|
|
242
|
+
(self.sweep_end, self.out_data,
|
|
243
|
+
self.out_coeff) = intensity.find_intensity_boundaries(
|
|
244
|
+
self.intensity, -1 * self.glat, self.glon,
|
|
245
|
+
self.sweep_times, self.alt, self.min_mlat_base,
|
|
246
|
+
self.max_coeff, mlat_inc=self.mlat_inc,
|
|
247
|
+
mlt_inc=self.mlt_inc, strict_fit=self.strict_fit)
|
|
248
|
+
|
|
249
|
+
# Evaluate the outputs
|
|
250
|
+
self.assertEqual(self.sweep_end, self.sweep_times[-1])
|
|
251
|
+
self.assertLessEqual(self.out_coeff, 12)
|
|
252
|
+
self.assertGreater(self.out_coeff, 0)
|
|
253
|
+
self.assertFalse(np.isnan(self.out_data['eq_bounds']).all())
|
|
254
|
+
self.assertTrue(np.isnan(self.out_data['po_bounds']).all())
|
|
255
|
+
|
|
256
|
+
return
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env python
|
|
2
2
|
# -*- coding: utf-8 -*-
|
|
3
|
+
# DOI: 10.5281/zenodo.15102100
|
|
3
4
|
# Full license can be found in License.md
|
|
4
5
|
#
|
|
5
6
|
# DISTRIBUTION STATEMENT A: Approved for public release. Distribution is
|
|
@@ -892,13 +893,14 @@ class TestEvalBoundariesMLT(unittest.TestCase):
|
|
|
892
893
|
"""Test raises ValueError with bad MLT coordinates."""
|
|
893
894
|
# Update the MLT coordinates
|
|
894
895
|
self.mlt[0] += 0.01
|
|
895
|
-
self.bound_data.assign({self.lt_key: self.mlt})
|
|
896
|
+
self.bound_data = self.bound_data.assign({self.lt_key: self.mlt})
|
|
896
897
|
|
|
897
898
|
# Run and check the error
|
|
898
899
|
self.assertRaisesRegex(ValueError, "not have a fixed frequency",
|
|
899
900
|
checks.evaluate_boundary_in_mlt,
|
|
900
901
|
*[self.bound_data, self.eq_key, self.po_key,
|
|
901
902
|
self.lt_key, self.ut_key])
|
|
903
|
+
|
|
902
904
|
return
|
|
903
905
|
|
|
904
906
|
def test_eval_success_no_removal(self):
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env python
|
|
2
2
|
# -*- coding: utf-8 -*-
|
|
3
|
+
# DOI: 10.5281/zenodo.15102100
|
|
3
4
|
# Full license can be found in License.md
|
|
4
5
|
#
|
|
5
6
|
# DISTRIBUTION STATEMENT A: Approved for public release. Distribution is
|
|
@@ -121,7 +122,7 @@ class TestBoundaryDictFuncs(unittest.TestCase):
|
|
|
121
122
|
for coord in self.coord_dict.keys():
|
|
122
123
|
self.assertIn(coord, self.dataset.coords)
|
|
123
124
|
|
|
124
|
-
if coord in self.dataset.
|
|
125
|
+
if coord in self.dataset.sizes:
|
|
125
126
|
if coord.find('sweep') < 0:
|
|
126
127
|
self.assertTrue(
|
|
127
128
|
np.all(self.dataset.coords[coord].values
|
|
@@ -399,7 +400,7 @@ class TestBoundaryDictFuncs(unittest.TestCase):
|
|
|
399
400
|
self.data_dict, 0)
|
|
400
401
|
|
|
401
402
|
# Evalute the empty dataset
|
|
402
|
-
self.assertEqual(len(self.dataset.
|
|
403
|
+
self.assertEqual(len(self.dataset.sizes), 0)
|
|
403
404
|
self.assertEqual(len(self.dataset.data_vars), 0)
|
|
404
405
|
return
|
|
405
406
|
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env python
|
|
2
2
|
# -*- coding: utf-8 -*-
|
|
3
|
+
# DOI: 10.5281/zenodo.15102100
|
|
4
|
+
# Full license can be found in License.md
|
|
3
5
|
#
|
|
4
6
|
# DISTRIBUTION STATEMENT A: Approved for public release. Distribution is
|
|
5
7
|
# unlimited.
|
|
@@ -194,7 +196,7 @@ def evaluate_dayglow(fit_coeff, locations, thresh=300.0):
|
|
|
194
196
|
locations : array-like
|
|
195
197
|
Locations at which the dayglow level will be evaluated.
|
|
196
198
|
thresh : float
|
|
197
|
-
|
|
199
|
+
Maximum allowable background intensity value in Rayleighs (default=300)
|
|
198
200
|
|
|
199
201
|
Returns
|
|
200
202
|
-------
|
{pyintensityfeatures-0.1.0 → pyintensityfeatures-0.2.0}/pyIntensityFeatures/utils/distributions.py
RENAMED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env python
|
|
2
2
|
# -*- coding: utf-8 -*-
|
|
3
|
+
# DOI: 10.5281/zenodo.15102100
|
|
4
|
+
# Full license can be found in License.md
|
|
3
5
|
#
|
|
4
6
|
# DISTRIBUTION STATEMENT A: Approved for public release. Distribution is
|
|
5
7
|
# unlimited.
|
|
@@ -57,7 +59,10 @@ def gauss(x, amp, mu, sigma, const):
|
|
|
57
59
|
Normal value at `x`
|
|
58
60
|
|
|
59
61
|
"""
|
|
60
|
-
|
|
62
|
+
if abs(sigma) > 0.0:
|
|
63
|
+
y = amp * np.exp(-np.power((x - mu), 2.0) / (2.0 * sigma**2)) + const
|
|
64
|
+
else:
|
|
65
|
+
y = np.zeros(shape=x.shape, dtype=float)
|
|
61
66
|
|
|
62
67
|
return y
|
|
63
68
|
|
{pyintensityfeatures-0.1.0 → pyintensityfeatures-0.2.0}/pyIntensityFeatures.egg-info/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pyIntensityFeatures
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2.0
|
|
4
4
|
Summary: Identify features, such as auroral luminosity boundaries, in imager data
|
|
5
5
|
Home-page: https://github.com/aburrell/pyIntensityFeatures
|
|
6
6
|
Author-email: Angeline Burrell <angeline.g.burrell.civ@us.navy.mil>
|
|
@@ -49,16 +49,17 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
49
49
|
Classifier: Programming Language :: Python :: 3.11
|
|
50
50
|
Classifier: Programming Language :: Python :: 3.12
|
|
51
51
|
Classifier: Programming Language :: Python :: 3.13
|
|
52
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
52
53
|
Classifier: Operating System :: POSIX :: Linux
|
|
53
54
|
Classifier: Operating System :: MacOS :: MacOS X
|
|
54
55
|
Classifier: Operating System :: Microsoft :: Windows
|
|
55
|
-
Requires-Python: >=3.
|
|
56
|
+
Requires-Python: >=3.10
|
|
56
57
|
Description-Content-Type: text/markdown
|
|
57
58
|
License-File: LICENSE
|
|
58
59
|
Requires-Dist: aacgmv2
|
|
59
60
|
Requires-Dist: numpy
|
|
60
61
|
Requires-Dist: pandas
|
|
61
|
-
Requires-Dist: scipy
|
|
62
|
+
Requires-Dist: scipy>=1.9.0
|
|
62
63
|
Requires-Dist: xarray
|
|
63
64
|
Provides-Extra: apex
|
|
64
65
|
Requires-Dist: apexpy; extra == "apex"
|
|
@@ -76,8 +77,8 @@ Requires-Dist: sphinx_rtd_theme; extra == "doc"
|
|
|
76
77
|
Dynamic: license-file
|
|
77
78
|
|
|
78
79
|
[](http://pyIntensityFeatures.readthedocs.io/en/latest/?badge=latest)
|
|
79
|
-
[DOI]
|
|
80
|
-
[PyPI version]
|
|
80
|
+
[](https://doi.org/10.5281/zenodo.15102100)
|
|
81
|
+
[](https://badge.fury.io/py/pyIntensityFeatures)
|
|
81
82
|
[](https://github.com/aburrell/pyIntensityFeatures/actions/workflows/main.yml)
|
|
82
83
|
[](https://coveralls.io/github/aburrell/pyIntensityFeatures?branch=main)
|
|
83
84
|
|
|
@@ -4,10 +4,10 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "pyIntensityFeatures"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.2.0"
|
|
8
8
|
description = 'Identify features, such as auroral luminosity boundaries, in imager data'
|
|
9
9
|
readme = "README.md"
|
|
10
|
-
requires-python = ">=3.
|
|
10
|
+
requires-python = ">=3.10"
|
|
11
11
|
license = {file = "LICENSE"}
|
|
12
12
|
authors = [
|
|
13
13
|
{name = "Angeline Burrell", email = "angeline.g.burrell.civ@us.navy.mil"}
|
|
@@ -24,6 +24,7 @@ classifiers = [
|
|
|
24
24
|
"Programming Language :: Python :: 3.11",
|
|
25
25
|
"Programming Language :: Python :: 3.12",
|
|
26
26
|
"Programming Language :: Python :: 3.13",
|
|
27
|
+
"Programming Language :: Python :: 3.14",
|
|
27
28
|
"Operating System :: POSIX :: Linux",
|
|
28
29
|
"Operating System :: MacOS :: MacOS X",
|
|
29
30
|
"Operating System :: Microsoft :: Windows"
|
|
@@ -46,7 +47,7 @@ dependencies = [
|
|
|
46
47
|
"aacgmv2",
|
|
47
48
|
"numpy",
|
|
48
49
|
"pandas",
|
|
49
|
-
"scipy",
|
|
50
|
+
"scipy>=1.9.0",
|
|
50
51
|
"xarray"]
|
|
51
52
|
|
|
52
53
|
[project.optional-dependencies]
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"license": {
|
|
3
|
-
"id": "bsd-license"
|
|
4
|
-
},
|
|
5
|
-
"keywords": [
|
|
6
|
-
"aurora",
|
|
7
|
-
"aurora australis",
|
|
8
|
-
"aurora borealis",
|
|
9
|
-
"boundaries",
|
|
10
|
-
"imager",
|
|
11
|
-
"ionosphere",
|
|
12
|
-
"heliophysics",
|
|
13
|
-
"magnetosphere",
|
|
14
|
-
"northern lights",
|
|
15
|
-
"intensity",
|
|
16
|
-
"southern lights",
|
|
17
|
-
"features"
|
|
18
|
-
],
|
|
19
|
-
"creators": [
|
|
20
|
-
{
|
|
21
|
-
"orcid": "0000-0001-8875-9326",
|
|
22
|
-
"affiliation": "Naval Research Laboratory",
|
|
23
|
-
"name": "Angeline G. Burrell"
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
"affiliation": "KPMG",
|
|
27
|
-
"name": "Nicola S. Longden"
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
"orcid": "0000-0003-1151-5934",
|
|
31
|
-
"affiliation": "British Antarctic Survey",
|
|
32
|
-
"name": "Gareth Chisham"
|
|
33
|
-
}
|
|
34
|
-
]
|
|
35
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
Changelog
|
|
2
|
-
=========
|
|
3
|
-
|
|
4
|
-
Summary of all changes made since the first release
|
|
5
|
-
|
|
6
|
-
0.1.0 (2025-03-28)
|
|
7
|
-
------------------
|
|
8
|
-
* Added option to specify maximum dayglow
|
|
9
|
-
* Updated `as_datetime` to remove timezone information
|
|
10
|
-
* Added a unique function that rounds to a specified significance level
|
|
11
|
-
* Extracted code that identified the parameters for Gaussian fitting into a
|
|
12
|
-
separate function
|
|
13
|
-
* Added publication release statements
|
|
14
|
-
|
|
15
|
-
0.0.1 (2024-03-01)
|
|
16
|
-
------------------
|
|
17
|
-
* Alpha Release
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"""Initialization file for the unit and integration tests."""
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyintensityfeatures-0.1.0 → pyintensityfeatures-0.2.0}/pyIntensityFeatures.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{pyintensityfeatures-0.1.0 → pyintensityfeatures-0.2.0}/pyIntensityFeatures.egg-info/top_level.txt
RENAMED
|
File without changes
|