eclipse 0.13.0__py3-none-any.whl

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.
Files changed (50) hide show
  1. eclipse/__init__.py +95 -0
  2. eclipse/analysis.py +853 -0
  3. eclipse/atmosphere.py +859 -0
  4. eclipse/band.py +477 -0
  5. eclipse/cli.py +138 -0
  6. eclipse/config.py +1710 -0
  7. eclipse/continuum.py +413 -0
  8. eclipse/data/eis_response/EIS_EffArea_A.004 +61 -0
  9. eclipse/data/eis_response/EIS_EffArea_B.004 +60 -0
  10. eclipse/data/eis_response/EIS_EffArea_B.005 +64 -0
  11. eclipse/data/eis_response/README_dz2025 +50 -0
  12. eclipse/data/eis_response/fit_eis_ea_2023-05-04_smooth.sav +0 -0
  13. eclipse/data/eis_response/source.txt +33 -0
  14. eclipse/data/science_cases.yaml +365 -0
  15. eclipse/data/throughput/grating_reflection_efficiency.dat +25 -0
  16. eclipse/data/throughput/primary_mirror_coating_reflectance.dat +25 -0
  17. eclipse/data/throughput/source.txt +6 -0
  18. eclipse/data/throughput/throughput_aluminium_1000_angstrom.dat +503 -0
  19. eclipse/data/throughput/throughput_aluminium_oxide_1000_angstrom.dat +503 -0
  20. eclipse/data/throughput/throughput_carbon_1000_angstrom.dat +503 -0
  21. eclipse/data_processing.py +904 -0
  22. eclipse/deprecated.py +161 -0
  23. eclipse/eis_calibration.py +573 -0
  24. eclipse/extern/__init__.py +0 -0
  25. eclipse/extern/mpfit.py +2388 -0
  26. eclipse/fitting.py +1734 -0
  27. eclipse/frame.py +594 -0
  28. eclipse/full_frame.py +944 -0
  29. eclipse/main.py +1646 -0
  30. eclipse/monte_carlo.py +660 -0
  31. eclipse/pinhole_diffraction.py +409 -0
  32. eclipse/psf.py +6 -0
  33. eclipse/radiometric.py +1328 -0
  34. eclipse/raster.py +869 -0
  35. eclipse/readout.py +1002 -0
  36. eclipse/resolution_budget.py +108 -0
  37. eclipse/results_file.py +1226 -0
  38. eclipse/sampling.py +351 -0
  39. eclipse/science_cases.py +364 -0
  40. eclipse/synthesis.py +2492 -0
  41. eclipse/synthesis_cli.py +12 -0
  42. eclipse/synthesis_file.py +882 -0
  43. eclipse/utils.py +1145 -0
  44. eclipse-0.13.0.dist-info/METADATA +70 -0
  45. eclipse-0.13.0.dist-info/RECORD +50 -0
  46. eclipse-0.13.0.dist-info/WHEEL +5 -0
  47. eclipse-0.13.0.dist-info/entry_points.txt +7 -0
  48. eclipse-0.13.0.dist-info/licenses/LICENSE +3 -0
  49. eclipse-0.13.0.dist-info/top_level.txt +2 -0
  50. euvst_response/__init__.py +129 -0
@@ -0,0 +1,70 @@
1
+ Metadata-Version: 2.4
2
+ Name: eclipse
3
+ Version: 0.13.0
4
+ Summary: ECLIPSE: Emission Calculation and Line Prediction for SOLAR-C EUVST
5
+ Author-email: James McKevitt <jm2@mssl.ucl.ac.uk>
6
+ Project-URL: Homepage, https://github.com/jamesmckevitt/eclipse
7
+ Project-URL: Repository, https://github.com/jamesmckevitt/eclipse
8
+ Project-URL: Documentation, https://solarc-eclipse.readthedocs.io
9
+ Classifier: Development Status :: 4 - Beta
10
+ Classifier: Intended Audience :: Science/Research
11
+ Classifier: Topic :: Scientific/Engineering :: Astronomy
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Programming Language :: Python :: 3.13
16
+ Classifier: Programming Language :: Python :: 3.14
17
+ Requires-Python: >=3.11
18
+ Description-Content-Type: text/markdown
19
+ License-File: LICENSE
20
+ Requires-Dist: numpy>=2.0
21
+ Requires-Dist: astropy>=6.1.5
22
+ Requires-Dist: ndcube>=2.3
23
+ Requires-Dist: scipy
24
+ Requires-Dist: matplotlib>=3.8.4
25
+ Requires-Dist: joblib>=1.2
26
+ Requires-Dist: tqdm
27
+ Requires-Dist: dill>=0.3.6
28
+ Requires-Dist: pyyaml
29
+ Requires-Dist: reproject>=0.14
30
+ Requires-Dist: sunpy[all]>=6.0
31
+ Requires-Dist: dask>=2024.9.1
32
+ Requires-Dist: psutil
33
+ Requires-Dist: mendeleev
34
+ Requires-Dist: h5py>=3.11
35
+ Requires-Dist: fiasco>=0.5
36
+ Provides-Extra: mpi
37
+ Requires-Dist: mpi4py; extra == "mpi"
38
+ Provides-Extra: dev
39
+ Requires-Dist: pytest; extra == "dev"
40
+ Requires-Dist: black; extra == "dev"
41
+ Requires-Dist: flake8; extra == "dev"
42
+ Requires-Dist: mypy; extra == "dev"
43
+ Requires-Dist: ipywidgets; extra == "dev"
44
+ Provides-Extra: docs
45
+ Requires-Dist: mkdocs-material; extra == "docs"
46
+ Requires-Dist: mkdocstrings[python]; extra == "docs"
47
+ Requires-Dist: mkdocs-jupyter; extra == "docs"
48
+ Requires-Dist: mkdocs-redirects; extra == "docs"
49
+ Dynamic: license-file
50
+
51
+ # ECLIPSE: Emission Calculation and Line Prediction for SOLAR-C EUVST
52
+
53
+ ECLIPSE (Emission Calculation and Line Prediction for SOLAR-C EUVST) predicts what the EUV spectrograph EUVST on SOLAR-C will measure, and how precisely, starting from a model of the solar atmosphere. It also models Hinode/EIS.
54
+
55
+ Contact: James McKevitt (jm2@mssl.ucl.ac.uk). See [LICENSE](LICENSE) for usage terms.
56
+
57
+ The instrument model will be updated as EUVST is built, tested and commissioned.
58
+
59
+ [![Tests](https://github.com/jamesmckevitt/eclipse/actions/workflows/tests.yml/badge.svg)](https://github.com/jamesmckevitt/eclipse/actions/workflows/tests.yml)
60
+ [![Documentation Status](https://app.readthedocs.org/projects/solarc-eclipse/badge/?version=stable)](https://solarc-eclipse.readthedocs.io/)
61
+ [![PyPI](https://img.shields.io/pypi/v/eclipse.svg)](https://pypi.org/project/eclipse/)
62
+ [![DOI](https://img.shields.io/badge/DOI-10.5281%2Fzenodo.17543844-blue.svg)](https://doi.org/10.5281/zenodo.17543844)
63
+
64
+ ECLIPSE is installed with `pip install eclipse`. ECLIPSE 0.12 and earlier were on PyPI as `solarc-eclipse`.
65
+
66
+ The documentation, with installation and a first run, guides to synthesising spectra, simulating the instrument and analysing the results, and a worked example, is at **[solarc-eclipse.readthedocs.io](https://solarc-eclipse.readthedocs.io)**.
67
+
68
+ ## Acknowledgements
69
+
70
+ The SOLAR-C/EUVST-SW instrument is an ESA-funded contribution to the JAXA-led SOLAR-C mission. The EUVST-LW (long wavelength) instrument is contributed by NASA. The ECLIPSE code is developed and maintained at Mullard Space Science Laboratory (UCL), and was made using Austrian Super Computing (ASC) infrastructure in collaboration with the University of Vienna.
@@ -0,0 +1,50 @@
1
+ eclipse/__init__.py,sha256=kafy_1qox35pUEbbKZcmyJ8lcCA_veiVNsywsjrP2UY,3795
2
+ eclipse/analysis.py,sha256=4BumUARzq0K1hNjLa7WH5aFOYipvWKYROunietKnwFk,36872
3
+ eclipse/atmosphere.py,sha256=JQDAL9uaRrdEp59dGfx7KvcqA5qkPmEOsUBo1_3O-pU,34691
4
+ eclipse/band.py,sha256=Hmfa7O-8AXEE1OYqUkTdoCDqxFdACOLSQG8v6AGxWPk,19418
5
+ eclipse/cli.py,sha256=JGBWyiSH22y5q3yTb2IQZt82dqGlbYo3ghjc0Z04j6o,3876
6
+ eclipse/config.py,sha256=hHg579UTHPaLEIBkuBH_Gb0zv3KKmQWzK4v4jNYwP3w,82648
7
+ eclipse/continuum.py,sha256=6Ic7HKVS9rymxprwnzmkOKRHP67gud3ey5fBBjw3YxY,18066
8
+ eclipse/data_processing.py,sha256=Vr91O8rin8rvd8yra2poD4DvHegaKOWZUq8FIEMsogU,41940
9
+ eclipse/deprecated.py,sha256=Ce5GXhW5qZbmA8M3pKiaTDqxnNAg_N-sI1KOcJaMsbU,6571
10
+ eclipse/eis_calibration.py,sha256=lM59AyyDTKMsgz0brz3xX2disEWArG9Sz0g3PcgwN0s,23165
11
+ eclipse/fitting.py,sha256=VRgmYdzSDy8LLypwMRDAx1w5NFWtVrIKKn0Yam5_pRo,77577
12
+ eclipse/frame.py,sha256=fenE-Zy80KKWinVG9oA44qxi3WmKgihlbJbtUP6_W5c,26589
13
+ eclipse/full_frame.py,sha256=Yu7BqoUFUCxJG9UXeQmFRjsS8JkZgNJsOdplf6NQNCw,47819
14
+ eclipse/main.py,sha256=b4diaaIkz-WF0V9MOsgvFhkjvWBqyHZtftNQ6ldkm0k,80985
15
+ eclipse/monte_carlo.py,sha256=g70VtfeR864qytf9k6fAARQXPX1do5Crntyb5uQ_5dk,32185
16
+ eclipse/pinhole_diffraction.py,sha256=ewMPe6lWfTeSlGDdO9w7sawNUGU01_ZC4bkntP2EUgg,17358
17
+ eclipse/psf.py,sha256=HccypVopMhtXaTloRIBHXbCiTlUqF80Wobk7je7QW5k,228
18
+ eclipse/radiometric.py,sha256=QAZSXlU9Dz9UhGlQ59I-ihba4mL6-MsOQY9EOuoPhPM,52601
19
+ eclipse/raster.py,sha256=g_BZiJ9sEJQgPx07mSgGNBj6z3gUrjfAGdhHVCo_QFc,43007
20
+ eclipse/readout.py,sha256=Q11zwsHPwgS1tdcciPqF3JjLBzCe_jT2W3MNkWX4pyE,46601
21
+ eclipse/resolution_budget.py,sha256=Y_MphbDfTJ_6yLwA9pzFw1T1Dn9j2A2JQa8S1qvSpJ4,4963
22
+ eclipse/results_file.py,sha256=ItvJkBdFVH2PzT1M-spGTWayCLKwxuYZs76pHpfzbrs,56925
23
+ eclipse/sampling.py,sha256=JWP2yxXpios-z1s42fCxIaiN-mstZ1OlCSnOILwfmlY,15151
24
+ eclipse/science_cases.py,sha256=l98JCBIab72NR1ZZEoZbFYQ3fPgi4_cCr-NsiHpzQpI,14438
25
+ eclipse/synthesis.py,sha256=5PTMGtJE5Q-AgGy6hIqXahmrDPQdBFMR7dSWVJu8x_U,109664
26
+ eclipse/synthesis_cli.py,sha256=XGiMXg0A7pFWXn9Yfps2jDfBphG26vnmLaxJBxalebU,258
27
+ eclipse/synthesis_file.py,sha256=4pJLOWPIPN58iGt4PWKbvjuN0Szwic-_1XNeveuHGp4,38173
28
+ eclipse/utils.py,sha256=4F2zWsAvpKRuI9ZmbD9y61ryhTP0QILZ0zdzZZ6j5sU,40741
29
+ eclipse/data/science_cases.yaml,sha256=ZKVrLxlH7mTJ7WkhAsbHRuObC2fSq5l9c_AwuZIK79s,16761
30
+ eclipse/data/eis_response/EIS_EffArea_A.004,sha256=c-CIFqPwLm5foye6ncDYIL7hFpg4iiFb225DZmfHPwg,1734
31
+ eclipse/data/eis_response/EIS_EffArea_B.004,sha256=-GMwz1jROLwAx5n-c_NBjqzs-3h3_eXCaQOuulIojGw,1690
32
+ eclipse/data/eis_response/EIS_EffArea_B.005,sha256=tW5cKHOxC9yb0x0PNC5ezASR_3UuzlgH8djeL5TRXWQ,1776
33
+ eclipse/data/eis_response/README_dz2025,sha256=uWKCecCNd3mFmRIH0GldVwc1cnaJz6lzUXTS3CunMho,1426
34
+ eclipse/data/eis_response/fit_eis_ea_2023-05-04_smooth.sav,sha256=t-JmD6QaWt-3ytVxfQ-RlmWcq8FHzt-TRIQDyHq9r3s,20120
35
+ eclipse/data/eis_response/source.txt,sha256=F6_zg5LdPbXZH_j_JTnGAL1AsET1JfFqHBONWN1nYWA,1521
36
+ eclipse/data/throughput/grating_reflection_efficiency.dat,sha256=OsaBQ5XhnuZU1EUoDHUZqH9UFThhwNF6s-SnnCh28zI,648
37
+ eclipse/data/throughput/primary_mirror_coating_reflectance.dat,sha256=1ibNeUajw1zzLfDc25juSAcjwSf4r7Fz1RHZjledcEE,653
38
+ eclipse/data/throughput/source.txt,sha256=It7W0qz0UlLNy-HjWzjPwybfQdIInv0r7MY8iLEMkC4,272
39
+ eclipse/data/throughput/throughput_aluminium_1000_angstrom.dat,sha256=19SmUQBMZsi-yUnmbattTtmPQJZSK8F4yWGvGciZnl8,14100
40
+ eclipse/data/throughput/throughput_aluminium_oxide_1000_angstrom.dat,sha256=-opQvD-6oK--g6dy5Rcfm1G_2kB0CdHhFk7Bqe7EFzw,14101
41
+ eclipse/data/throughput/throughput_carbon_1000_angstrom.dat,sha256=TuVMkAr9JBMavD0UVth7kNTvDXLSr47Z60UouQdMUbU,14096
42
+ eclipse/extern/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
43
+ eclipse/extern/mpfit.py,sha256=j952yKKlG2ND4tgVkdpzniBhms12CbIDe6-bi3yaEUY,84862
44
+ eclipse-0.13.0.dist-info/licenses/LICENSE,sha256=C-wC_cjWSA50wswaSSj9ycedH3w6qgC40b2-aSHlxqc,199
45
+ euvst_response/__init__.py,sha256=VDm_t0K1axlfa09arQWjmLJn28GNa_ShFByrFbyFu7o,4533
46
+ eclipse-0.13.0.dist-info/METADATA,sha256=ub4Lk_raXznVqMhcsrFwRu0bZLFLBwLEPrvi7rEmFsA,3513
47
+ eclipse-0.13.0.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
48
+ eclipse-0.13.0.dist-info/entry_points.txt,sha256=twWCkODfcJOGXnB5U2hyXbTA0f1ogINiOYKXkMLTggs,271
49
+ eclipse-0.13.0.dist-info/top_level.txt,sha256=T-monBSb3jPt9Ioe953oMcVrUdvIDY5PB4oMWQMjI0U,23
50
+ eclipse-0.13.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (84.2.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,7 @@
1
+ [console_scripts]
2
+ eclipse = eclipse.cli:main
3
+ eclipse-atmosphere = eclipse.atmosphere:main
4
+ eclipse-science-cases = eclipse.science_cases:main
5
+ solarc-eclipse = eclipse.cli:main
6
+ synthesise-spectra = eclipse.synthesis_cli:main
7
+ synthesise_spectra = eclipse.synthesis_cli:main
@@ -0,0 +1,3 @@
1
+ Copyright (c) James McKevitt
2
+
3
+ The SOLAR-C SWG are required to approve the publication of forward modelling results for SOLAR-C/EUVST. Contact James McKevitt (jm2@mssl.ucl.ac.uk) for more information.
@@ -0,0 +1,2 @@
1
+ eclipse
2
+ euvst_response
@@ -0,0 +1,129 @@
1
+ """
2
+ The former name of the `eclipse` package, kept so existing scripts still run.
3
+
4
+ Importing it warns that it will be removed in a future release. Each of its
5
+ modules, such as `euvst_response.frame`, is the `eclipse` module of the same
6
+ name, so older pickles that name these modules also still load. Its package
7
+ data are those of `eclipse`.
8
+ """
9
+ import importlib
10
+ import importlib.abc
11
+ import importlib.util
12
+ import sys
13
+ import types
14
+ import warnings
15
+
16
+ import eclipse
17
+ from eclipse import * # noqa: F401,F403
18
+ from eclipse import __all__, __version__ # noqa: F401
19
+ from eclipse.utils import FormerNameWarning
20
+
21
+ MESSAGE = ("The euvst_response package is now called eclipse: use `import eclipse`. "
22
+ "euvst_response will be removed in a future release.")
23
+
24
+ warnings.warn(MESSAGE, FormerNameWarning, stacklevel=2)
25
+
26
+
27
+ def _new_name(name):
28
+ return "eclipse" + name[len("euvst_response"):]
29
+
30
+
31
+ class _Alias(importlib.abc.MetaPathFinder, importlib.abc.Loader):
32
+ """Import `euvst_response.<name>` as the module `eclipse.<name>`."""
33
+
34
+ euvst_response_alias = True
35
+
36
+ def find_spec(self, name, path=None, target=None):
37
+ if not name.startswith("euvst_response."):
38
+ return None
39
+ real = importlib.util.find_spec(_new_name(name))
40
+ if real is None:
41
+ return None
42
+ spec = importlib.util.spec_from_loader(
43
+ name, self, origin=real.origin,
44
+ is_package=real.submodule_search_locations is not None)
45
+ spec.has_location = real.has_location
46
+ return spec
47
+
48
+ def create_module(self, spec):
49
+ module = importlib.import_module(_new_name(spec.name))
50
+ spec.loader_state = module.__spec__
51
+ return module
52
+
53
+ def exec_module(self, module):
54
+ # The import machinery gave the module this alias's spec; give it back
55
+ # its own, so reloading it and its relative imports still work.
56
+ module.__spec__ = module.__spec__.loader_state
57
+
58
+ # Used by `python -m euvst_response.<name>`, which runs the module's code
59
+ # without importing it.
60
+ def _loader(self, name):
61
+ spec = importlib.util.find_spec(_new_name(name))
62
+ if spec is None:
63
+ raise ImportError(f"No module named {_new_name(name)!r}", name=name)
64
+ return spec.loader, spec.name
65
+
66
+ def get_code(self, name):
67
+ loader, name = self._loader(name)
68
+ return loader.get_code(name)
69
+
70
+ def get_source(self, name):
71
+ loader, name = self._loader(name)
72
+ return loader.get_source(name)
73
+
74
+ def is_package(self, name):
75
+ loader, name = self._loader(name)
76
+ return loader.is_package(name)
77
+
78
+
79
+ class _Loader:
80
+ """This package's loader, reading package data from `eclipse`."""
81
+
82
+ def __init__(self, loader):
83
+ self._loader = loader
84
+
85
+ def __getattr__(self, name):
86
+ return getattr(self._loader, name)
87
+
88
+ def get_resource_reader(self, name):
89
+ return eclipse.__spec__.loader.get_resource_reader(eclipse.__name__)
90
+
91
+
92
+ class _Package(types.ModuleType):
93
+ """This package, whose attributes are those of `eclipse`."""
94
+
95
+ def __setattr__(self, name, value):
96
+ # Importing `euvst_response.<name>` sets the module on this package.
97
+ # Keep the attribute `eclipse` gave it instead, such as the function `main`.
98
+ if (isinstance(value, types.ModuleType) and value.__name__ == f"eclipse.{name}"
99
+ and getattr(self, name, value) is not value):
100
+ return
101
+ super().__setattr__(name, value)
102
+
103
+
104
+ # Modules run with `python -m`, which runs a module's code only if the module
105
+ # is not yet imported under the name given.
106
+ _COMMANDS = {"atmosphere", "band", "cli", "continuum", "main", "synthesis", "synthesis_cli"}
107
+
108
+
109
+ def _register():
110
+ """Put each loaded `eclipse` module in `sys.modules` under the old name too."""
111
+ for name, value in list(sys.modules.items()):
112
+ if name.startswith("eclipse.") and name.split(".")[1] not in _COMMANDS:
113
+ sys.modules.setdefault("euvst_response" + name[len("eclipse"):], value)
114
+
115
+
116
+ if not any(getattr(finder, "euvst_response_alias", False) for finder in sys.meta_path):
117
+ sys.meta_path.insert(0, _Alias())
118
+ _register()
119
+ sys.modules[__name__].__class__ = _Package
120
+
121
+ # importlib.resources.files("euvst_response") and the folder of `__file__`
122
+ # give the package data of `eclipse`. `__path__` is left alone, so the
123
+ # modules of `eclipse` are only ever imported as themselves.
124
+ __spec__.loader = __loader__ = _Loader(__spec__.loader)
125
+ __file__ = eclipse.__file__
126
+
127
+
128
+ def __getattr__(name):
129
+ return getattr(eclipse, name)