solarc-eclipse 0.6.1__tar.gz → 0.6.2__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.
- {solarc_eclipse-0.6.1/solarc_eclipse.egg-info → solarc_eclipse-0.6.2}/PKG-INFO +70 -51
- {solarc_eclipse-0.6.1 → solarc_eclipse-0.6.2}/README.md +69 -50
- {solarc_eclipse-0.6.1 → solarc_eclipse-0.6.2}/euvst_response/__init__.py +3 -2
- {solarc_eclipse-0.6.1 → solarc_eclipse-0.6.2}/euvst_response/analysis.py +148 -226
- {solarc_eclipse-0.6.1 → solarc_eclipse-0.6.2}/euvst_response/config.py +21 -53
- {solarc_eclipse-0.6.1 → solarc_eclipse-0.6.2}/euvst_response/data_processing.py +144 -15
- solarc_eclipse-0.6.2/euvst_response/main.py +460 -0
- {solarc_eclipse-0.6.1 → solarc_eclipse-0.6.2}/euvst_response/monte_carlo.py +74 -26
- {solarc_eclipse-0.6.1 → solarc_eclipse-0.6.2}/euvst_response/radiometric.py +55 -53
- {solarc_eclipse-0.6.1 → solarc_eclipse-0.6.2}/euvst_response/synthesis.py +1 -1
- solarc_eclipse-0.6.2/euvst_response/utils.py +360 -0
- {solarc_eclipse-0.6.1 → solarc_eclipse-0.6.2/solarc_eclipse.egg-info}/PKG-INFO +70 -51
- solarc_eclipse-0.6.1/euvst_response/main.py +0 -468
- solarc_eclipse-0.6.1/euvst_response/utils.py +0 -176
- {solarc_eclipse-0.6.1 → solarc_eclipse-0.6.2}/LICENSE +0 -0
- {solarc_eclipse-0.6.1 → solarc_eclipse-0.6.2}/MANIFEST.in +0 -0
- {solarc_eclipse-0.6.1 → solarc_eclipse-0.6.2}/euvst_response/cli.py +0 -0
- {solarc_eclipse-0.6.1 → solarc_eclipse-0.6.2}/euvst_response/data/throughput/grating_reflection_efficiency.dat +0 -0
- {solarc_eclipse-0.6.1 → solarc_eclipse-0.6.2}/euvst_response/data/throughput/primary_mirror_coating_reflectance.dat +0 -0
- {solarc_eclipse-0.6.1 → solarc_eclipse-0.6.2}/euvst_response/data/throughput/source.txt +0 -0
- {solarc_eclipse-0.6.1 → solarc_eclipse-0.6.2}/euvst_response/data/throughput/throughput_aluminium_1000_angstrom.dat +0 -0
- {solarc_eclipse-0.6.1 → solarc_eclipse-0.6.2}/euvst_response/data/throughput/throughput_aluminium_oxide_1000_angstrom.dat +0 -0
- {solarc_eclipse-0.6.1 → solarc_eclipse-0.6.2}/euvst_response/data/throughput/throughput_carbon_1000_angstrom.dat +0 -0
- {solarc_eclipse-0.6.1 → solarc_eclipse-0.6.2}/euvst_response/fitting.py +0 -0
- {solarc_eclipse-0.6.1 → solarc_eclipse-0.6.2}/euvst_response/pinhole_diffraction.py +0 -0
- {solarc_eclipse-0.6.1 → solarc_eclipse-0.6.2}/euvst_response/psf.py +0 -0
- {solarc_eclipse-0.6.1 → solarc_eclipse-0.6.2}/euvst_response/synthesis_cli.py +0 -0
- {solarc_eclipse-0.6.1 → solarc_eclipse-0.6.2}/pyproject.toml +0 -0
- {solarc_eclipse-0.6.1 → solarc_eclipse-0.6.2}/setup.cfg +0 -0
- {solarc_eclipse-0.6.1 → solarc_eclipse-0.6.2}/setup.py +0 -0
- {solarc_eclipse-0.6.1 → solarc_eclipse-0.6.2}/solarc_eclipse.egg-info/SOURCES.txt +0 -0
- {solarc_eclipse-0.6.1 → solarc_eclipse-0.6.2}/solarc_eclipse.egg-info/dependency_links.txt +0 -0
- {solarc_eclipse-0.6.1 → solarc_eclipse-0.6.2}/solarc_eclipse.egg-info/entry_points.txt +0 -0
- {solarc_eclipse-0.6.1 → solarc_eclipse-0.6.2}/solarc_eclipse.egg-info/not-zip-safe +0 -0
- {solarc_eclipse-0.6.1 → solarc_eclipse-0.6.2}/solarc_eclipse.egg-info/requires.txt +0 -0
- {solarc_eclipse-0.6.1 → solarc_eclipse-0.6.2}/solarc_eclipse.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: solarc-eclipse
|
|
3
|
-
Version: 0.6.
|
|
3
|
+
Version: 0.6.2
|
|
4
4
|
Summary: ECLIPSE: Emission Calculation and Line Prediction for SOLAR-C EUVST
|
|
5
5
|
Home-page: https://github.com/jamesmckevitt/eclipse
|
|
6
6
|
Author: James McKevitt
|
|
@@ -88,6 +88,7 @@ eclipse --help
|
|
|
88
88
|
You can also use ECLIPSE as a Python library:
|
|
89
89
|
|
|
90
90
|
```python
|
|
91
|
+
import astropy.units as u
|
|
91
92
|
import euvst_response
|
|
92
93
|
from euvst_response import AluminiumFilter, Detector_SWC, Telescope_EUVST
|
|
93
94
|
|
|
@@ -117,7 +118,7 @@ For analyzing simulation results, see the included Jupyter notebook `analysis_tu
|
|
|
117
118
|
- Analyze fit statistics and compute velocity/line width errors
|
|
118
119
|
- Create SunPy maps for visualization
|
|
119
120
|
|
|
120
|
-
The analysis functions are
|
|
121
|
+
The analysis functions are available directly from the package:
|
|
121
122
|
|
|
122
123
|
```python
|
|
123
124
|
from euvst_response import (
|
|
@@ -127,6 +128,15 @@ from euvst_response import (
|
|
|
127
128
|
create_sunpy_maps_from_combo,
|
|
128
129
|
summary_table
|
|
129
130
|
)
|
|
131
|
+
|
|
132
|
+
# Load results
|
|
133
|
+
results = load_instrument_response_results("run/result/my_run.pkl")
|
|
134
|
+
|
|
135
|
+
# Print a summary table (auto-discovers all parameters and shows git commit)
|
|
136
|
+
summary_table(results)
|
|
137
|
+
|
|
138
|
+
# Retrieve a specific combination using full section.attribute names
|
|
139
|
+
combo = get_results_for_combination(results, **{"simulation.expos": 40*u.s, "simulation.psf": True})
|
|
130
140
|
```
|
|
131
141
|
|
|
132
142
|
## Detailed instructions
|
|
@@ -306,61 +316,66 @@ This step can require a lot of memory at full resolution. A fully synthesised at
|
|
|
306
316
|
|
|
307
317
|
#### Configuration File
|
|
308
318
|
|
|
309
|
-
ECLIPSE uses YAML configuration files to specify simulation parameters.
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
-
|
|
316
|
-
- `
|
|
317
|
-
-
|
|
319
|
+
ECLIPSE uses YAML configuration files to specify simulation parameters.
|
|
320
|
+
Parameters are organised into four sections - `simulation`, `detector`, `telescope`, and `filter` - each corresponding directly to a configuration class in `config.py`.
|
|
321
|
+
Any field of those classes can be set here.
|
|
322
|
+
**Any parameter that is given as a list is automatically swept over** and the
|
|
323
|
+
simulation runs every combination (cartesian product).
|
|
324
|
+
|
|
325
|
+
**Top-level keys** (not sections):
|
|
326
|
+
- `instrument`: `SWC` (EUVST Short Wavelength) or `EIS` (Hinode/EIS)
|
|
327
|
+
- `synthesis_file`: path to the synthesised spectra pickle file
|
|
328
|
+
- `reference_line`: spectral line used as the wavelength-grid reference (default `Fe12_195.1190`)
|
|
329
|
+
- `n_iter`: number of Monte Carlo iterations
|
|
330
|
+
- `ncpu`: CPU cores to use (`-1` = all available)
|
|
331
|
+
- `pinhole_sizes`, `pinhole_positions`: fixed paired lists for pinhole diffraction tests (SWC only)
|
|
332
|
+
- `uniform_intensity`, `rest_wavelength`, `thermal_width`: uniform-intensity mode (alternative to synthesis file)
|
|
318
333
|
|
|
319
334
|
Here's a complete example configuration file:
|
|
320
335
|
|
|
321
336
|
```yaml
|
|
322
|
-
#
|
|
323
|
-
instrument: SWC
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
#
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
#
|
|
345
|
-
|
|
346
|
-
#
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
oxide_thickness: 95 angstrom
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
# Aluminum filter thickness
|
|
357
|
-
aluminium_thickness: 1485 angstrom # Default (expected value)
|
|
337
|
+
# Input
|
|
338
|
+
instrument: SWC
|
|
339
|
+
synthesis_file: ./run/input/synthesised_spectra.pkl
|
|
340
|
+
reference_line: Fe12_195.1190
|
|
341
|
+
|
|
342
|
+
# Global settings (apply to all combinations)
|
|
343
|
+
n_iter: 500
|
|
344
|
+
ncpu: -1
|
|
345
|
+
|
|
346
|
+
# Simulation parameters
|
|
347
|
+
# Any field listed as a list is swept over; all combinations are run.
|
|
348
|
+
simulation:
|
|
349
|
+
slit_width: [0.2 arcsec, 0.4 arcsec] # sweep over two slit widths
|
|
350
|
+
expos: [5 s, 10 s, 20 s, 40 s, 80 s] # sweep over five exposure times
|
|
351
|
+
psf: True
|
|
352
|
+
vis_sl: 0 photon / (s * cm^2)
|
|
353
|
+
enable_pinholes: False
|
|
354
|
+
|
|
355
|
+
# Detector parameters
|
|
356
|
+
detector:
|
|
357
|
+
ccd_temperature: -60 Celsius # used to compute dark current via the CCD model
|
|
358
|
+
|
|
359
|
+
# Telescope parameters
|
|
360
|
+
telescope:
|
|
361
|
+
microroughness_sigma: 0.3 nm # RMS surface roughness
|
|
362
|
+
|
|
363
|
+
# Aluminium filter parameters (SWC only)
|
|
364
|
+
filter:
|
|
365
|
+
al_thickness: 1485 angstrom
|
|
366
|
+
oxide_thickness: 95 angstrom
|
|
367
|
+
c_thickness: 40 angstrom
|
|
368
|
+
mesh_throughput: 0.8
|
|
369
|
+
```
|
|
358
370
|
|
|
359
|
-
|
|
360
|
-
|
|
371
|
+
Any parameter from the `Detector_SWC`, `Telescope_EUVST`, or `AluminiumFilter`
|
|
372
|
+
dataclasses in `config.py` can be added to the corresponding section. For
|
|
373
|
+
example, to sweep over detector quantum efficiency:
|
|
361
374
|
|
|
362
|
-
|
|
363
|
-
|
|
375
|
+
```yaml
|
|
376
|
+
detector:
|
|
377
|
+
ccd_temperature: -60 Celsius
|
|
378
|
+
qe_euv: [0.5, 0.65, 0.76] # sweep over three QE values
|
|
364
379
|
```
|
|
365
380
|
|
|
366
381
|
For guidance on recommended values, see McKevitt et al. (2025) (in prep.).
|
|
@@ -387,6 +402,10 @@ Results are saved as pickle files in the `run/result/` directory with the same b
|
|
|
387
402
|
- Fitted spectral line parameters (intensity, velocity, width)
|
|
388
403
|
- Statistical analysis of velocity precision vs. exposure time
|
|
389
404
|
- Ground truth comparisons
|
|
405
|
+
- Full config objects (`Detector`, `Telescope`, `Simulation`) for each parameter combination
|
|
406
|
+
- The git commit ID and software version used to produce the results
|
|
407
|
+
|
|
408
|
+
Use `summary_table(results)` after loading to see all parameter combinations and the run metadata.
|
|
390
409
|
|
|
391
410
|
## Acknowledgements
|
|
392
411
|
|
|
@@ -45,6 +45,7 @@ eclipse --help
|
|
|
45
45
|
You can also use ECLIPSE as a Python library:
|
|
46
46
|
|
|
47
47
|
```python
|
|
48
|
+
import astropy.units as u
|
|
48
49
|
import euvst_response
|
|
49
50
|
from euvst_response import AluminiumFilter, Detector_SWC, Telescope_EUVST
|
|
50
51
|
|
|
@@ -74,7 +75,7 @@ For analyzing simulation results, see the included Jupyter notebook `analysis_tu
|
|
|
74
75
|
- Analyze fit statistics and compute velocity/line width errors
|
|
75
76
|
- Create SunPy maps for visualization
|
|
76
77
|
|
|
77
|
-
The analysis functions are
|
|
78
|
+
The analysis functions are available directly from the package:
|
|
78
79
|
|
|
79
80
|
```python
|
|
80
81
|
from euvst_response import (
|
|
@@ -84,6 +85,15 @@ from euvst_response import (
|
|
|
84
85
|
create_sunpy_maps_from_combo,
|
|
85
86
|
summary_table
|
|
86
87
|
)
|
|
88
|
+
|
|
89
|
+
# Load results
|
|
90
|
+
results = load_instrument_response_results("run/result/my_run.pkl")
|
|
91
|
+
|
|
92
|
+
# Print a summary table (auto-discovers all parameters and shows git commit)
|
|
93
|
+
summary_table(results)
|
|
94
|
+
|
|
95
|
+
# Retrieve a specific combination using full section.attribute names
|
|
96
|
+
combo = get_results_for_combination(results, **{"simulation.expos": 40*u.s, "simulation.psf": True})
|
|
87
97
|
```
|
|
88
98
|
|
|
89
99
|
## Detailed instructions
|
|
@@ -263,61 +273,66 @@ This step can require a lot of memory at full resolution. A fully synthesised at
|
|
|
263
273
|
|
|
264
274
|
#### Configuration File
|
|
265
275
|
|
|
266
|
-
ECLIPSE uses YAML configuration files to specify simulation parameters.
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
-
|
|
273
|
-
- `
|
|
274
|
-
-
|
|
276
|
+
ECLIPSE uses YAML configuration files to specify simulation parameters.
|
|
277
|
+
Parameters are organised into four sections - `simulation`, `detector`, `telescope`, and `filter` - each corresponding directly to a configuration class in `config.py`.
|
|
278
|
+
Any field of those classes can be set here.
|
|
279
|
+
**Any parameter that is given as a list is automatically swept over** and the
|
|
280
|
+
simulation runs every combination (cartesian product).
|
|
281
|
+
|
|
282
|
+
**Top-level keys** (not sections):
|
|
283
|
+
- `instrument`: `SWC` (EUVST Short Wavelength) or `EIS` (Hinode/EIS)
|
|
284
|
+
- `synthesis_file`: path to the synthesised spectra pickle file
|
|
285
|
+
- `reference_line`: spectral line used as the wavelength-grid reference (default `Fe12_195.1190`)
|
|
286
|
+
- `n_iter`: number of Monte Carlo iterations
|
|
287
|
+
- `ncpu`: CPU cores to use (`-1` = all available)
|
|
288
|
+
- `pinhole_sizes`, `pinhole_positions`: fixed paired lists for pinhole diffraction tests (SWC only)
|
|
289
|
+
- `uniform_intensity`, `rest_wavelength`, `thermal_width`: uniform-intensity mode (alternative to synthesis file)
|
|
275
290
|
|
|
276
291
|
Here's a complete example configuration file:
|
|
277
292
|
|
|
278
293
|
```yaml
|
|
279
|
-
#
|
|
280
|
-
instrument: SWC
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
#
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
#
|
|
302
|
-
|
|
303
|
-
#
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
oxide_thickness: 95 angstrom
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
# Aluminum filter thickness
|
|
314
|
-
aluminium_thickness: 1485 angstrom # Default (expected value)
|
|
294
|
+
# Input
|
|
295
|
+
instrument: SWC
|
|
296
|
+
synthesis_file: ./run/input/synthesised_spectra.pkl
|
|
297
|
+
reference_line: Fe12_195.1190
|
|
298
|
+
|
|
299
|
+
# Global settings (apply to all combinations)
|
|
300
|
+
n_iter: 500
|
|
301
|
+
ncpu: -1
|
|
302
|
+
|
|
303
|
+
# Simulation parameters
|
|
304
|
+
# Any field listed as a list is swept over; all combinations are run.
|
|
305
|
+
simulation:
|
|
306
|
+
slit_width: [0.2 arcsec, 0.4 arcsec] # sweep over two slit widths
|
|
307
|
+
expos: [5 s, 10 s, 20 s, 40 s, 80 s] # sweep over five exposure times
|
|
308
|
+
psf: True
|
|
309
|
+
vis_sl: 0 photon / (s * cm^2)
|
|
310
|
+
enable_pinholes: False
|
|
311
|
+
|
|
312
|
+
# Detector parameters
|
|
313
|
+
detector:
|
|
314
|
+
ccd_temperature: -60 Celsius # used to compute dark current via the CCD model
|
|
315
|
+
|
|
316
|
+
# Telescope parameters
|
|
317
|
+
telescope:
|
|
318
|
+
microroughness_sigma: 0.3 nm # RMS surface roughness
|
|
319
|
+
|
|
320
|
+
# Aluminium filter parameters (SWC only)
|
|
321
|
+
filter:
|
|
322
|
+
al_thickness: 1485 angstrom
|
|
323
|
+
oxide_thickness: 95 angstrom
|
|
324
|
+
c_thickness: 40 angstrom
|
|
325
|
+
mesh_throughput: 0.8
|
|
326
|
+
```
|
|
315
327
|
|
|
316
|
-
|
|
317
|
-
|
|
328
|
+
Any parameter from the `Detector_SWC`, `Telescope_EUVST`, or `AluminiumFilter`
|
|
329
|
+
dataclasses in `config.py` can be added to the corresponding section. For
|
|
330
|
+
example, to sweep over detector quantum efficiency:
|
|
318
331
|
|
|
319
|
-
|
|
320
|
-
|
|
332
|
+
```yaml
|
|
333
|
+
detector:
|
|
334
|
+
ccd_temperature: -60 Celsius
|
|
335
|
+
qe_euv: [0.5, 0.65, 0.76] # sweep over three QE values
|
|
321
336
|
```
|
|
322
337
|
|
|
323
338
|
For guidance on recommended values, see McKevitt et al. (2025) (in prep.).
|
|
@@ -344,6 +359,10 @@ Results are saved as pickle files in the `run/result/` directory with the same b
|
|
|
344
359
|
- Fitted spectral line parameters (intensity, velocity, width)
|
|
345
360
|
- Statistical analysis of velocity precision vs. exposure time
|
|
346
361
|
- Ground truth comparisons
|
|
362
|
+
- Full config objects (`Detector`, `Telescope`, `Simulation`) for each parameter combination
|
|
363
|
+
- The git commit ID and software version used to produce the results
|
|
364
|
+
|
|
365
|
+
Use `summary_table(results)` after loading to see all parameter combinations and the run metadata.
|
|
347
366
|
|
|
348
367
|
## Acknowledgements
|
|
349
368
|
|
|
@@ -4,7 +4,7 @@ ECLIPSE: Emission Calculation and Line Prediction for SOLAR-C EUVST
|
|
|
4
4
|
This package provides tools for modeling the performance of the EUV spectrograph EUVST, on SOLAR-C.
|
|
5
5
|
"""
|
|
6
6
|
|
|
7
|
-
__version__ = "0.6.
|
|
7
|
+
__version__ = "0.6.2"
|
|
8
8
|
__author__ = "James McKevitt"
|
|
9
9
|
__email__ = "jm2@mssl.ucl.ac.uk"
|
|
10
10
|
|
|
@@ -20,7 +20,7 @@ from .pinhole_diffraction import apply_euv_pinhole_diffraction, airy_disk_patter
|
|
|
20
20
|
from .fitting import fit_cube_gauss, velocity_from_fit, width_from_fit, analyse
|
|
21
21
|
from .monte_carlo import simulate_once, monte_carlo
|
|
22
22
|
from .main import main
|
|
23
|
-
from .data_processing import load_atmosphere
|
|
23
|
+
from .data_processing import load_atmosphere, create_uniform_intensity_cube
|
|
24
24
|
from .analysis import (
|
|
25
25
|
load_instrument_response_results,
|
|
26
26
|
get_parameter_combinations,
|
|
@@ -42,6 +42,7 @@ __all__ = [
|
|
|
42
42
|
"simulate_once", "monte_carlo",
|
|
43
43
|
"main",
|
|
44
44
|
"load_atmosphere",
|
|
45
|
+
"create_uniform_intensity_cube",
|
|
45
46
|
"load_instrument_response_results",
|
|
46
47
|
"get_parameter_combinations",
|
|
47
48
|
"analyse_fit_statistics",
|