pyeuvac 0.0.1b0__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.
@@ -0,0 +1,13 @@
1
+ Copyright (с) 2024 Tatarnikov Anton, Zolotov Oleg
2
+
3
+ pyeuvac package is licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+
7
+ http://www.apache.org/licenses/LICENSE-2.0
8
+
9
+ Unless required by applicable law or agreed to in writing, software
10
+ distributed under the License is distributed on an "AS IS" BASIS,
11
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ See the License for the specific language governing permissions and
13
+ limitations under the License.
@@ -0,0 +1,53 @@
1
+ Metadata-Version: 2.1
2
+ Name: pyeuvac
3
+ Version: 0.0.1b0
4
+ Summary: Python implementation of models of the ultraviolet radiation spectrum of the Sun
5
+ Author-email: Anton Tatarnikov <tatarnikoffanton@yandex.ru>, Oleg Zolotov <ovz.office@gmail.com>
6
+ Project-URL: Homepage, https://github.com/klklklo/pynusinov
7
+ Keywords: Solar radiation model,EUV
8
+ Classifier: Development Status :: 3 - Alpha
9
+ Classifier: Intended Audience :: Science/Research
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Programming Language :: Python :: 3.7
12
+ Classifier: Programming Language :: Python :: 3.8
13
+ Classifier: Programming Language :: Python :: 3.9
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: License :: OSI Approved :: Apache Software License
17
+ Classifier: Topic :: Scientific/Engineering :: Physics
18
+ Requires-Python: >=3.7
19
+ Description-Content-Type: text/markdown
20
+ License-File: LICENSE.txt
21
+ Requires-Dist: importlib-resources
22
+ Requires-Dist: netcdf4
23
+ Requires-Dist: numpy
24
+ Requires-Dist: pandas
25
+ Requires-Dist: xarray
26
+
27
+ # pyeuvac
28
+ <!--Basic information-->
29
+ pyeuvac is a Python3 implementation of models of the ultraviolet radiation spectra of the Sun described by P. G. Richards,
30
+ J. A. Fennelly, D. G. Torr. The EUV model describes variations in the 5–105 nm spectral region.
31
+
32
+
33
+ If you use pynusinov or Nusinov's EUV/FUV models directly or indirectly, please, cite in your research the following paper:
34
+
35
+ 1. Richards, P. G., J. A. Fennelly, and D. G. Torr (1994), EUVAC: A solar EUV Flux Model for aeronomic calculations,
36
+ J. Geophys. Res., 99(A5), 8981-8992. https://doi.org/10.1029/94JA00518
37
+
38
+ # User's guide
39
+
40
+ <!--Users guide-->
41
+
42
+ ## Installation
43
+
44
+ The following command is used to install the package:
45
+
46
+ ```
47
+ python -m pip install pyeuvac
48
+ ```
49
+
50
+ pyeuvac is the name of the package.
51
+
52
+
53
+
@@ -0,0 +1,27 @@
1
+ # pyeuvac
2
+ <!--Basic information-->
3
+ pyeuvac is a Python3 implementation of models of the ultraviolet radiation spectra of the Sun described by P. G. Richards,
4
+ J. A. Fennelly, D. G. Torr. The EUV model describes variations in the 5–105 nm spectral region.
5
+
6
+
7
+ If you use pynusinov or Nusinov's EUV/FUV models directly or indirectly, please, cite in your research the following paper:
8
+
9
+ 1. Richards, P. G., J. A. Fennelly, and D. G. Torr (1994), EUVAC: A solar EUV Flux Model for aeronomic calculations,
10
+ J. Geophys. Res., 99(A5), 8981-8992. https://doi.org/10.1029/94JA00518
11
+
12
+ # User's guide
13
+
14
+ <!--Users guide-->
15
+
16
+ ## Installation
17
+
18
+ The following command is used to install the package:
19
+
20
+ ```
21
+ python -m pip install pyeuvac
22
+ ```
23
+
24
+ pyeuvac is the name of the package.
25
+
26
+
27
+
@@ -0,0 +1,48 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "pyeuvac"
7
+ version = "0.0.1b"
8
+ authors = [
9
+ { name="Anton Tatarnikov", email="tatarnikoffanton@yandex.ru" },
10
+ { name="Oleg Zolotov", email="ovz.office@gmail.com" },
11
+ ]
12
+ description = "Python implementation of models of the ultraviolet radiation spectrum of the Sun"
13
+
14
+ readme = "README.md"
15
+ license = {file = "LICENSE"}
16
+
17
+ keywords = ["Solar radiation model", "EUV"]
18
+
19
+
20
+ requires-python = ">=3.7"
21
+ classifiers = [
22
+ "Development Status :: 3 - Alpha",
23
+ "Intended Audience :: Science/Research",
24
+ "Programming Language :: Python :: 3",
25
+ "Programming Language :: Python :: 3.7",
26
+ "Programming Language :: Python :: 3.8",
27
+ "Programming Language :: Python :: 3.9",
28
+ "Programming Language :: Python :: 3.10",
29
+ "Programming Language :: Python :: 3.11",
30
+ "License :: OSI Approved :: Apache Software License",
31
+ "Topic :: Scientific/Engineering :: Physics"
32
+ ]
33
+ dependencies=[
34
+ "importlib-resources",
35
+ "netcdf4",
36
+ "numpy",
37
+ "pandas",
38
+ "xarray"
39
+ ]
40
+
41
+ [project.urls]
42
+ Homepage = "https://github.com/klklklo/pynusinov"
43
+
44
+ [tool.setuptools]
45
+ include-package-data=true
46
+
47
+ [tool.setuptools.package-data]
48
+ "pynusinov._coeffs" = [ "*.nc"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1 @@
1
+ # from pyeuvac._euvac import EUVAC
@@ -0,0 +1,45 @@
1
+ import numpy as np
2
+ import pandas as pd
3
+ import xarray as xr
4
+ import pyeuvac._misc as _m
5
+
6
+ class EUVAC:
7
+ def __init__(self):
8
+ self._bands_dataset, self._lines_dataset = _m.get_euvac()
9
+ self._bands_coeffs = np.vstack((np.array(self._bands_dataset['F74113'], dtype=np.float64),
10
+ np.array(self._bands_dataset['F74113']) * np.array(self._bands_dataset['Ai'], dtype=np.float64))).transpose()
11
+
12
+ self._lines_coeffs = np.vstack((np.array(self._lines_dataset['F74113'], dtype=np.float64),
13
+ np.array(self._lines_dataset['F74113']) * np.array(self._lines_dataset['Ai'], dtype=np.float64))).transpose()
14
+
15
+ def _get_P(self, list_of_F):
16
+ if isinstance(list_of_F, tuple):
17
+ array = np.array([1., sum(list_of_F)/2. - 80], dtype=np.float64)
18
+ return array.reshape((1, 2))
19
+
20
+
21
+ tmp = np.array([sum(i) / 2. for i in list_of_F], dtype=np.float64)
22
+ tmp = tmp.reshape((tmp.size, 1))
23
+ array = np.ones((tmp.size, 1), dtype=np.float64)
24
+ return tmp, np.hstack([array, tmp-80])
25
+
26
+ def get_spectra_bands(self, P):
27
+ p, x = self._get_P(P)
28
+ res = np.dot(self._bands_coeffs, x.T)
29
+ return xr.Dataset(data_vars={'euv_flux_spectra': (('band_center', 'P'), res),
30
+ 'lband': ('band_number', self._bands_dataset['lband'].values),
31
+ 'uband': ('band_number', self._bands_dataset['uband'].values),
32
+ 'center': ('band_number', self._bands_dataset['center'].values)},
33
+ coords={'band_center': self._bands_dataset['center'].values,
34
+ 'P': p[:, 0],
35
+ 'band_number': np.arange(20)})
36
+
37
+ def get_spectra_lines(self, P):
38
+ p, x = self._get_P(P)
39
+ res = np.dot(self._lines_coeffs, p.T)
40
+ return xr.Dataset(data_vars={'euv_flux_spectra': (('lambda', 'P'), res)},
41
+ coords={'lambda': self._lines_dataset['lambda'].values,
42
+ 'P': p[:, 0],})
43
+
44
+ def get_spectra(self, P):
45
+ return self.get_spectra_bands(P), self.get_spectra_lines(P)
@@ -0,0 +1,11 @@
1
+ import functools
2
+ import xarray as xr
3
+ from importlib_resources import files
4
+
5
+
6
+ @functools.cache
7
+ def read_coeffs(file):
8
+ return xr.open_dataset(files('pyeuvac._coeffs').joinpath(file))
9
+
10
+ def get_euvac():
11
+ return read_coeffs('euvac_model_bands.nc').copy(), read_coeffs('euvac_model_lines.nc').copy(),
@@ -0,0 +1,53 @@
1
+ Metadata-Version: 2.1
2
+ Name: pyeuvac
3
+ Version: 0.0.1b0
4
+ Summary: Python implementation of models of the ultraviolet radiation spectrum of the Sun
5
+ Author-email: Anton Tatarnikov <tatarnikoffanton@yandex.ru>, Oleg Zolotov <ovz.office@gmail.com>
6
+ Project-URL: Homepage, https://github.com/klklklo/pynusinov
7
+ Keywords: Solar radiation model,EUV
8
+ Classifier: Development Status :: 3 - Alpha
9
+ Classifier: Intended Audience :: Science/Research
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Programming Language :: Python :: 3.7
12
+ Classifier: Programming Language :: Python :: 3.8
13
+ Classifier: Programming Language :: Python :: 3.9
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: License :: OSI Approved :: Apache Software License
17
+ Classifier: Topic :: Scientific/Engineering :: Physics
18
+ Requires-Python: >=3.7
19
+ Description-Content-Type: text/markdown
20
+ License-File: LICENSE.txt
21
+ Requires-Dist: importlib-resources
22
+ Requires-Dist: netcdf4
23
+ Requires-Dist: numpy
24
+ Requires-Dist: pandas
25
+ Requires-Dist: xarray
26
+
27
+ # pyeuvac
28
+ <!--Basic information-->
29
+ pyeuvac is a Python3 implementation of models of the ultraviolet radiation spectra of the Sun described by P. G. Richards,
30
+ J. A. Fennelly, D. G. Torr. The EUV model describes variations in the 5–105 nm spectral region.
31
+
32
+
33
+ If you use pynusinov or Nusinov's EUV/FUV models directly or indirectly, please, cite in your research the following paper:
34
+
35
+ 1. Richards, P. G., J. A. Fennelly, and D. G. Torr (1994), EUVAC: A solar EUV Flux Model for aeronomic calculations,
36
+ J. Geophys. Res., 99(A5), 8981-8992. https://doi.org/10.1029/94JA00518
37
+
38
+ # User's guide
39
+
40
+ <!--Users guide-->
41
+
42
+ ## Installation
43
+
44
+ The following command is used to install the package:
45
+
46
+ ```
47
+ python -m pip install pyeuvac
48
+ ```
49
+
50
+ pyeuvac is the name of the package.
51
+
52
+
53
+
@@ -0,0 +1,11 @@
1
+ LICENSE.txt
2
+ README.md
3
+ pyproject.toml
4
+ src/pyeuvac/__init__.py
5
+ src/pyeuvac/_euvac.py
6
+ src/pyeuvac/_misc.py
7
+ src/pyeuvac.egg-info/PKG-INFO
8
+ src/pyeuvac.egg-info/SOURCES.txt
9
+ src/pyeuvac.egg-info/dependency_links.txt
10
+ src/pyeuvac.egg-info/requires.txt
11
+ src/pyeuvac.egg-info/top_level.txt
@@ -0,0 +1,5 @@
1
+ importlib-resources
2
+ netcdf4
3
+ numpy
4
+ pandas
5
+ xarray
@@ -0,0 +1 @@
1
+ pyeuvac