dkist-processing-visp 5.1.2rc2__py3-none-any.whl → 5.2.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 (30) hide show
  1. dkist_processing_visp/models/parameters.py +43 -1
  2. dkist_processing_visp/models/tags.py +11 -0
  3. dkist_processing_visp/models/task_name.py +2 -0
  4. dkist_processing_visp/tasks/geometric.py +1 -1
  5. dkist_processing_visp/tasks/science.py +88 -11
  6. dkist_processing_visp/tasks/solar.py +12 -205
  7. dkist_processing_visp/tasks/wavelength_calibration.py +430 -0
  8. dkist_processing_visp/tasks/write_l1.py +2 -0
  9. dkist_processing_visp/tests/conftest.py +11 -0
  10. dkist_processing_visp/tests/header_models.py +22 -6
  11. dkist_processing_visp/tests/local_trial_workflows/l0_cals_only.py +21 -0
  12. dkist_processing_visp/tests/local_trial_workflows/l0_polcals_as_science.py +21 -0
  13. dkist_processing_visp/tests/local_trial_workflows/l0_solar_gain_as_science.py +20 -0
  14. dkist_processing_visp/tests/local_trial_workflows/l0_to_l1.py +21 -0
  15. dkist_processing_visp/tests/local_trial_workflows/local_trial_helpers.py +27 -0
  16. dkist_processing_visp/tests/test_parameters.py +11 -5
  17. dkist_processing_visp/tests/test_science.py +60 -5
  18. dkist_processing_visp/tests/test_solar.py +0 -1
  19. dkist_processing_visp/tests/test_wavelength_calibration.py +297 -0
  20. dkist_processing_visp/tests/test_write_l1.py +0 -2
  21. dkist_processing_visp/workflows/l0_processing.py +4 -1
  22. dkist_processing_visp/workflows/trial_workflows.py +4 -1
  23. {dkist_processing_visp-5.1.2rc2.dist-info → dkist_processing_visp-5.2.0.dist-info}/METADATA +34 -34
  24. {dkist_processing_visp-5.1.2rc2.dist-info → dkist_processing_visp-5.2.0.dist-info}/RECORD +29 -27
  25. docs/gain_correction.rst +3 -0
  26. docs/index.rst +1 -0
  27. docs/wavelength_calibration.rst +64 -0
  28. changelog/251.feature.rst +0 -1
  29. {dkist_processing_visp-5.1.2rc2.dist-info → dkist_processing_visp-5.2.0.dist-info}/WHEEL +0 -0
  30. {dkist_processing_visp-5.1.2rc2.dist-info → dkist_processing_visp-5.2.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,64 @@
1
+ Wavelength Calibration
2
+ ============================
3
+
4
+ Overview
5
+ --------
6
+
7
+ The `~dkist_processing_visp.tasks.wavelength_calibration` task provides an absolute wavelength calibration of
8
+ ViSP solar spectra by using the routines provided by the `solar-wavelength-calibration <https://docs.dkist.nso.edu/projects/solar-wavelength-calibration/en/latest/>`_ library.
9
+
10
+ Workflow
11
+ --------
12
+
13
+ #. Compute a representative spectrum by taking a median over all spatial positions of the :ref:`characteristic spectra <charspec-description>` of beam 1 computed in the solar gain task.
14
+ #. Use spectrograph setup parameters to generate a first-guess wavelength solution.
15
+ #. Feed the representative spectrum and setup parameters into the `solar-wavelength-calibration <https://docs.dkist.nso.edu/projects/solar-wavelength-calibration/en/latest/>`_ library.
16
+ #. Save the fit results as FITS header keywords, parameterizing the solution for downstream use.
17
+
18
+ Wavelength Solution Encoding
19
+ ----------------------------
20
+
21
+ The wavelength solution is stored in FITS headers using the following keywords (see `Greisen et al (2006) <https://ui.adsabs.harvard.edu/abs/2006A%26A...446..747G/abstract>`_, Section 5 and Table 6):
22
+
23
+ +---------+--------------------------+----------------+
24
+ | Keyword | Description | Units |
25
+ +=========+==========================+================+
26
+ | `CTYPE2`| Spectral coordinate type | "AWAV-GRA" |
27
+ +---------+--------------------------+----------------+
28
+ | `CUNIT2`| Wavelength unit | "nm" |
29
+ +---------+--------------------------+----------------+
30
+ | `CRPIX2`| Reference pixel | |
31
+ +---------+--------------------------+----------------+
32
+ | `CRVAL2`| Reference wavelength | nm |
33
+ +---------+--------------------------+----------------+
34
+ | `CDELT2`| Linear dispersion | nm / px |
35
+ +---------+--------------------------+----------------+
36
+ | `PV2_0` | Grating constant | 1 / m |
37
+ +---------+--------------------------+----------------+
38
+ | `PV2_1` | Spectral order | |
39
+ +---------+--------------------------+----------------+
40
+ | `PV2_1` | Incident light angle | deg |
41
+ +---------+--------------------------+----------------+
42
+
43
+ Note: The units of `PV2_0` are always 1 / m.
44
+
45
+ .. warning::
46
+ Some data taken during OCP1 (2022) use the 1st WCS axis to record wavelength information. In rare cases OCP1 data have WCS information that is scrambled and completely incorrect.
47
+
48
+ Fitted Parameters
49
+ -----------------
50
+
51
+ The fitting process can optimize several parameters. The parameters that are free in ViSP fits are:
52
+
53
+ - **crval**: Wavelength zero-point.
54
+ - **dispersion**: Linear dispersion, allowed to vary within a few percent of the nominal value.
55
+ - **opacity_factor**: Atmospheric absorption scaling, to match telluric line strengths.
56
+ - **continuum_level**: Overall spectrum scaling, to match the observed continuum.
57
+ - **straylight_fraction**: Fraction of stray or scattered light added to the observed spectrum, affecting line depths and continuum.
58
+ - **resolving_power**: Spectral resolving power (:math:`R = \frac{\lambda}{\Delta\lambda}`), characterizing the instrument's ability to distinguish close spectral features.
59
+ - **incident_light_angle**: Angle at which light enters the grating, influencing the wavelength solution through the grating equation.
60
+
61
+
62
+ For more details on the fitting algorithms and parameterization, see the
63
+ `solar-wavelength-calibration documentation <https://docs.dkist.nso.edu/projects/solar-wavelength-calibration/en/latest/>`_
64
+ and `Greisen et al. (2006) <https://ui.adsabs.harvard.edu/abs/2006A%26A...446..747G/abstract>`_.
changelog/251.feature.rst DELETED
@@ -1 +0,0 @@
1
- Store quality data in object store and revise the workflow so that VispAssembleQualityData precedes the TransferL1Data task.