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,108 @@
1
+ """
2
+ EUVST-SW resolution budget beyond the optical design.
3
+
4
+ RSC-2022033B rev. B (28 Oct 2025), "EUVST Spatial and Spectral Resolution
5
+ Budget", lists every source of blur as a FWHM in arcsec and adds them in
6
+ quadrature. Its first row, the optical design residual, is the PSF of
7
+ RSC-2022021C, which `Telescope_EUVST.psf_params` already holds. This module
8
+ keeps the other rows, for the current best estimate (CBE) and for the
9
+ allocation.
10
+
11
+ The budget is given for the 70 x 70 and 100 x 100 arcsec fields, and its
12
+ rows other than the first are the same for both. The 280 x 280 arcsec
13
+ budget is still to be written, so the same rows are used for every field.
14
+ """
15
+ import numpy as np
16
+
17
+ BUDGETS = ("current_estimate", "allocation", "none")
18
+
19
+ # Table 3-1, spatial resolution budget, SW, FWHM in arcsec as
20
+ # (current best estimate, allocation, before the slit). The rows before the
21
+ # slit blur the telescope's image on the slit, and so also blur the scene
22
+ # across it. Row 10, the spectrograph's optics, comes after the slit.
23
+ SPATIAL_ROWS = {
24
+ "2: primary mirror": (0.206, 0.247, True),
25
+ "3: scan and tip-tilt mirror": (0.122, 0.122, True),
26
+ "4: focus mechanism": (0.033, 0.073, True),
27
+ "5: telescope alignment": (0.055, 0.125, True),
28
+ "6: measurement error": (0.063, 0.063, True),
29
+ "10: spectrograph optical elements": (0.100, 0.163, False),
30
+ "20: pointing jitter": (0.110, 0.110, True),
31
+ }
32
+
33
+ # Table 4-1, spectral resolution budget, SW, rows 3 to 5, as FWHM in arcsec
34
+ # along the dispersion. The table gives the allocation only. Each row is a
35
+ # row of Table 3-1, or a fraction of one, as its notes say, so the current
36
+ # best estimate is the same rule applied to the estimates of Table 3-1.
37
+ SPECTRAL_ROWS = {
38
+ "3-1: alignment of the spectrograph (#10-3)": (0.029, 0.100),
39
+ "3-2: residual of 1G compensation (2/3 of #5-2)": (2 / 3 * 0.036, 0.040),
40
+ "3-3: thermal deformation, ground to space (2/3 of #5-3)": (2 / 3 * 0.012, 0.053),
41
+ "3-4: thermal deformation, orbital (1/3 of 3-3)": (1 / 3 * (2 / 3 * 0.012), 0.018),
42
+ "3-5: launch load (#5-5)": (0.018, 0.031),
43
+ "3-6: CFRP moisture desorption (#5-6)": (0.003, 0.015),
44
+ "3-7: BUS I/F thermal deformation (#5-7)": (0.001, 0.010),
45
+ "3-8: BUS I/F flatness (#5-8)": (0.001, 0.010),
46
+ "4-1: grating surface figure and mounting stress (#10-1)": (0.090, 0.120),
47
+ "4-2: slit assembly (#10-2)": (0.033, 0.046),
48
+ "5: grating micro-vibrations (2/3 of #20)": (2 / 3 * 0.110, 0.073),
49
+ }
50
+
51
+
52
+ def _column(budget: str) -> int | None:
53
+ if budget not in BUDGETS:
54
+ raise ValueError(f"resolution_budget must be one of {', '.join(BUDGETS)}, got "
55
+ f"{budget!r}.")
56
+ return {"current_estimate": 0, "allocation": 1}.get(budget)
57
+
58
+
59
+ def _sum_in_quadrature(values) -> float:
60
+ return float(np.sqrt(np.sum(np.square(list(values)))))
61
+
62
+
63
+ JITTER_ROW = "20: pointing jitter"
64
+ VIBRATION_ROW = "5: grating micro-vibrations (2/3 of #20)"
65
+
66
+
67
+ def _spatial_rows(budget: str, pointing_jitter: float | None) -> list:
68
+ """(FWHM, before the slit) of each spatial row, with row 20 replaced by `pointing_jitter`."""
69
+ column = _column(budget)
70
+ rows = [] if column is None else [(row[column], row[2]) for name, row in SPATIAL_ROWS.items()
71
+ if name != JITTER_ROW or pointing_jitter is None]
72
+ if pointing_jitter is not None:
73
+ rows.append((pointing_jitter, True))
74
+ return rows
75
+
76
+
77
+ def along_slit_fwhm(budget: str, pointing_jitter: float | None = None) -> float:
78
+ """
79
+ FWHM in arcsec of the budget's blur along the slit, all rows but the optical design.
80
+
81
+ `pointing_jitter`, a FWHM in arcsec, replaces the budget's row 20. It is
82
+ added even with `budget` `"none"`.
83
+ """
84
+ return _sum_in_quadrature(fwhm for fwhm, _ in _spatial_rows(budget, pointing_jitter))
85
+
86
+
87
+ def across_slit_fwhm(budget: str, pointing_jitter: float | None = None) -> float:
88
+ """FWHM in arcsec of the budget's blur across the slit, from the rows before the slit."""
89
+ return _sum_in_quadrature(fwhm for fwhm, before in _spatial_rows(budget, pointing_jitter)
90
+ if before)
91
+
92
+
93
+ def spectral_fwhm(budget: str, pointing_jitter: float | None = None) -> float:
94
+ """
95
+ FWHM in arcsec of the budget's blur along the dispersion.
96
+
97
+ Rows 3 to 5 of Table 4-1. Rows 1 and 2, the optical design and the
98
+ slit, are already in `Telescope_EUVST.psf_params`. The slit width error
99
+ of row 2-2 is a tolerance on the slit, not a blur, and is left out.
100
+ The budget takes the grating's micro-vibration, row 5, as 2/3 of the
101
+ pointing jitter, so a `pointing_jitter` given sets it the same way.
102
+ """
103
+ column = _column(budget)
104
+ rows = [] if column is None else [row[column] for name, row in SPECTRAL_ROWS.items()
105
+ if name != VIBRATION_ROW or pointing_jitter is None]
106
+ if pointing_jitter is not None:
107
+ rows.append(2 / 3 * pointing_jitter)
108
+ return _sum_in_quadrature(rows)