From 92fa037044fd91864085c1309cef86cb040c82e1 Mon Sep 17 00:00:00 2001 From: joyvelasquez Date: Thu, 2 Jul 2026 12:07:48 -0400 Subject: [PATCH 1/3] Update general documentation files --- docs/about_xrt.rst | 20 ++++++------- docs/getting_started.rst | 64 +++++++++++++++++++--------------------- docs/glossary.rst | 19 +++++++++++- docs/index.rst | 8 +++++ 4 files changed, 66 insertions(+), 45 deletions(-) diff --git a/docs/about_xrt.rst b/docs/about_xrt.rst index c9848a872..575c6901b 100644 --- a/docs/about_xrt.rst +++ b/docs/about_xrt.rst @@ -8,8 +8,8 @@ Hinode ====== .. image:: _static/images/hinode_satellite.png - :alt: Hinode Satellite - :align: center + :alt: Hinode Satellite + :align: center Hinode is a joint mission involving the space agencies of Japan, the United States, Europe, and the United Kingdom. It is depicted in the *illustration shown above*. @@ -25,9 +25,9 @@ The X-Ray Telescope =================== .. image:: _static/images/XRT_composite_image_full_disk_14February2015.png - :alt: XRT Composite Image - :align: center - :scale: 50% + :alt: XRT Composite Image + :align: center + :scale: 50% The X-Ray Telescope (XRT), depicted as a long linear black tube on the Hinode spacecraft is a crucial instrument for observing the solar corona's most intense regions, with temperatures ranging from 1,000,000 to 10,000,000 Kelvin. The image below is a synoptic composite from February 14, 2015, created using the Al-Mesh/Be-Thin/Al-Med filters. @@ -36,7 +36,7 @@ For a comprehensive overview of XRT's mission and capabilities, please visit the .. tip:: - Visit the `XRT Picture of the Week`_ and the `Hinode-XRT YouTube`_ page for captivating visual content showcasing the XRT's solar observations. + Visit the `XRT Picture of the Week`_ and the `Hinode-XRT YouTube`_ page for captivating visual content showcasing the XRT's solar observations. XRT uses two sequentially positioned filter wheels, as shown in the diagram below, where each wheel houses a variety of filters. By rotating these wheels, scientists can select different filters to study the Sun in different wavelengths, thereby enhancing the resolution and quality of solar images. @@ -73,8 +73,8 @@ The existing filters are structured as follows: The process is the same for all XRT filter channels. .. image:: _static/images/XRT_filter_wheels_Sun_View_Diagram.png - :alt: Diagram of the XRT Filter Wheels - :align: center + :alt: Diagram of the XRT Filter Wheels + :align: center Data Products ************* @@ -99,8 +99,8 @@ The XRT software was originally created in the Interactive Data Language (IDL). .. note:: - Please note that the `SolarSoft XRT Analysis Guide`_ does not serve as a guide for using XRTpy. - It focuses solely on the analysis of XRT data using the IDL software. + Please note that the `SolarSoft XRT Analysis Guide`_ does not serve as a guide for using XRTpy. + It focuses solely on the analysis of XRT data using the IDL software. .. _Hinode-XRT YouTube: https://www.youtube.com/user/xrtpow .. _Interactive Data Language: https://www.l3harrisgeospatial.com/Software-Technology/IDL diff --git a/docs/getting_started.rst b/docs/getting_started.rst index 8f3cae3cf..d6af2ed45 100644 --- a/docs/getting_started.rst +++ b/docs/getting_started.rst @@ -7,7 +7,7 @@ on board the Hinode spacecraft. This page is intended for new users of XRTpy. Fo please refer to the `SolarSoft XRT Analysis Guide`_. XRTpy Objects -************* +------------- XRTpy currently provides access to the following core classes: @@ -24,41 +24,41 @@ It also includes functionality to: Visit our Examples page for step-by-step Jupyter notebook guides on how to use each feature. Channel -------- +^^^^^^^ The ``Channel`` class describes the configuration of a specific XRT filter channel. It includes details for the Charge-Coupled Device (CCD), Entrance Filter, Focal Plane Filters, Geometry, and Mirrors. Effective Area --------------- +^^^^^^^^^^^^^^ XRTpy calculates the effective area for each XRT filter channel, accounting for time-dependent contamination on the CCD. For more details, refer to the `SolarSoft XRT Analysis Guide`_. Temperature Response --------------------- +^^^^^^^^^^^^^^^^^^^^ XRTpy calculates the temperature response of XRT filter channels using the CHIANTI_ atomic database (version 10.0) and coronal abundances (:cite:t:`feldman:1992`). This produces a response function as a function of temperature, using an assumed emission model (:cite:t:`narukage:2011`, :cite:t:`narukage:2014`). Deriving Temperature and Emission Measure ------------------------------------------ +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The ``temperature_from_filter_ratio`` function allows you to derive plasma temperature and emission measure from a pair of XRT images using the filter-ratio method. This mirrors the logic in the SolarSoft IDL routine of the same name. A usage example is available in the Examples section. Image Deconvolution with the PSF --------------------------------- +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The ``deconvolve`` function applies image deconvolution using the instrument's Point Spread Function (PSF) to sharpen XRT images. This is especially useful for recovering detail around bright or sharp solar structures. Light Leak Correction ---------------------- +^^^^^^^^^^^^^^^^^^^^^ The ``remove_lightleak`` function subtracts visible stray light from XRT synoptic composite images. This correction improves the quality of long-term coronal evolution studies. See our Examples section for how to use this function. Abundance Model Options ------------------------ +^^^^^^^^^^^^^^^^^^^^^^^ By default, XRTpy uses CHIANTI coronal abundances (:cite:t:`feldman:1992`). You may also choose: @@ -72,7 +72,9 @@ To use a different abundance model: from xrtpy.response import TemperatureResponseFundamental TemperatureResponseFundamental( - "Al-poly", "2022-07-04T23:43:12", abundance_model="hybrid" + "Al-poly", + "2022-07-04T23:43:12", + abundance_model="hybrid" ) You may also pass the ``abundance_model`` keyword to ``temperature_from_filter_ratio``. @@ -83,12 +85,12 @@ You may also pass the ``abundance_model`` keyword to ``temperature_from_filter_r Tools -***** +----- The ``xrtpy.response.tools`` module includes helpful utility functions to streamline workflows. It includes the following: Generate Temperature Responses ------------------------------- +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Use the ``generate_temperature_responses`` tool to compute the temperature response for one or more filters — including combinations like ``"Al-poly/Ti-poly"`` — with a single command. @@ -101,15 +103,15 @@ This function returns a list of ``TemperatureResponseFundamental`` objects, one from xrtpy.response.tools import generate_temperature_responses responses = generate_temperature_responses( - filters=["Al-poly", "Be-thick", "Al-poly/Ti-poly"], - obs_date="2020-07-04T00:00:00", - abundance="Hybrid", + filters=["Al-poly", "Be-thick", "Al-poly/Ti-poly"], + obs_date="2020-07-04T00:00:00", + abundance="Hybrid", ) for resp in responses: - print(f"Filter: {resp.filter_name}") - print(f" Temperatures: {resp.temperature[:3]}") - print(f" Response: {resp.response[:3]}") + print(f"Filter: {resp.filter_name}") + print(f" Temperatures: {resp.temperature[:3]}") + print(f" Response: {resp.response[:3]}") **Example Output:** @@ -117,16 +119,16 @@ This function returns a list of ``TemperatureResponseFundamental`` objects, one .. code-block:: text Filter: Al-poly - Temperatures: [100000. 112201.9 125892.516] K - Response: [8.34e-31 1.07e-30 1.53e-30] cm5 DN / (pix s) + Temperatures: [100000. 112201.9 125892.516] K + Response: [8.34e-31 1.07e-30 1.53e-30] cm5 DN / (pix s) Filter: Be-thick - Temperatures: [100000. 112201.9 125892.516] K - Response: [0.00e+00 1.73e-94 2.43e-84] cm5 DN / (pix s) + Temperatures: [100000. 112201.9 125892.516] K + Response: [0.00e+00 1.73e-94 2.43e-84] cm5 DN / (pix s) Filter: Al-poly/Ti-poly - Temperatures: [100000. 112201.9 125892.516] K - Response: [5.34e-34 7.24e-34 1.11e-33] cm5 DN / (pix s) + Temperatures: [100000. 112201.9 125892.516] K + Response: [5.34e-34 7.24e-34 1.11e-33] cm5 DN / (pix s) Each response object has the following attributes: @@ -138,7 +140,7 @@ This tool is useful on its own, but it also serves as a foundation for upcoming Data Products -************* +------------- XRT data products are available through the XRT website. These include: @@ -148,7 +150,7 @@ XRT data products are available through the XRT website. These include: For more information, visit the `XRT data products`_ page. Double Filter Combinations -************************** +-------------------------- XRTpy now supports double filter combinations such as ``"Al-poly/Ti-poly"`` in both the :obj:`EffectiveAreaFundamental ` and :obj:`TemperatureResponseFundamental ` classes. @@ -159,10 +161,10 @@ XRTpy now supports double filter combinations such as ``"Al-poly/Ti-poly"`` in b from xrtpy.response import EffectiveAreaFundamental, TemperatureResponseFundamental eff_area = EffectiveAreaFundamental( - "Al-poly/Ti-poly", "2020-08-17T09:00:00", abundance_model="photospheric" + "Al-poly/Ti-poly", "2020-08-17T09:00:00", abundance_model="photospheric" ) temp_resp = TemperatureResponseFundamental( - "C-poly/Ti-poly", "2025-07-10T12:00:00", abundance_model="coronal" + "C-poly/Ti-poly", "2025-07-10T12:00:00", abundance_model="coronal" ) The following combinations are currently supported: @@ -178,7 +180,7 @@ The following combinations are currently supported: X-Ray Filter Channels -********************* +--------------------- XRT uses two filter wheels to configure the imaging filter channel. Each wheel includes several filters and an open slot: @@ -204,12 +206,6 @@ Filter Wheel 2: Filter names in XRTpy are passed as strings like ``'Ti-poly'``. -References -********** - -Velasquez, J., Murphy, N., Reeves, K. K., Slavin, J., Weber, M., & Barnes, W. (2024). -*XRTpy: A Hinode-X-Ray Telescope Python Package*. JOSS, 9(100), 6396. -https://doi.org/10.21105/joss.06396 .. _CHIANTI: https://www.chiantidatabase.org/chianti_database_history.html .. _SolarSoft XRT Analysis Guide: https://xrt.cfa.harvard.edu/resources/documents/XAG/XAG.pdf diff --git a/docs/glossary.rst b/docs/glossary.rst index 178a371cf..15ffcdd8e 100644 --- a/docs/glossary.rst +++ b/docs/glossary.rst @@ -17,7 +17,13 @@ Glossary A numerical image processing technique used to correct for the blurring caused by the telescope's Point Spread Function (PSF), improving sharpness and visibility of fine structures. DEM - Differential Emission Measure (DEM) — a function that describes the distribution of plasma as a function of temperature along the line of sight. XRTpy will support DEM modeling in future versions. + Differential Emission Measure (DEM) — a function that describes how much plasma is present along the line of sight as a function of temperature. See :ref:`xrtpy-dem-overview` for a detailed overview of DEM theory, + usage, and the solver provided in XRTpy. + + DEM Inversion + The process of determining the temperature distribution of coronal plasma (the DEM) from a small number of filter intensities. Since more temperature bins are used than available filters, the problem is mathematically + underconstrained (“ill posed”), so regularization and smoothing are required to obtain a stable, physical solution. + DN Data Number (DN) — the digital value recorded by the CCD, representing the detected photon flux, usually in DN s\ :sup:`−1`\ . @@ -38,9 +44,20 @@ Glossary Contamination (related to the XRT) Refers to the gradual accumulation of material on the CCD and focal plane filters (FPFs), which reduces instrument throughput. This time-dependent degradation impacts effective area calculations and must be accounted for in data analysis. Refer to Section 2.5.3 *Contamination* in the `SolarSoft XRT Analysis Guide`_ for more information. + Monte Carlo DEM + A set of DEM solutions computed by adding random noise (based on intensity errors) to the observed intensities and re-solving the DEM multiple times. + The spread of these Monte Carlo solutions provides an estimate ofuncertainty in the DEM at each temperature. + PSF Point Spread Function — describes the response of the telescope to a point source of light. In XRTpy, it is used in deconvolution routines to sharpen images. + Response Matrix + A two-dimensional array containing the temperature response of each XRT filter interpolated onto the solver’s regular log10 temperature grid.This matrix connects + the DEM to the modeled filter intensities through the forward model: + + :math:`I_i^{model} = \sum_j DEM(T_j)\, R_i(T_j)\, T_j\, \Delta(\ln T)`. + + Solar Emission Spectra Emission spectra produced by solar plasma across a range of temperatures, calculated using spectral models such as CHIANTI. These spectra are used in temperature response and filter ratio methods diff --git a/docs/index.rst b/docs/index.rst index b2812ead1..bc56f7ed6 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -21,6 +21,7 @@ Whether you're conducting research or just beginning to explore the world of X-r about_xrt install getting_started + dem_overview generated/gallery/index reference/index acknowledging_xrtpy @@ -30,3 +31,10 @@ Whether you're conducting research or just beginning to explore the world of X-r contributing code_of_conduct changelog/index + +Published Work +-------------- + +The following paper describes the XRTpy package and its initial release- v0.4.0: + +:cite:p:`velasquez:2024` From 548312346206a735991dda6baf6abe65521861bb Mon Sep 17 00:00:00 2001 From: joyvelasquez Date: Thu, 2 Jul 2026 12:18:21 -0400 Subject: [PATCH 2/3] Revert index.rst and glossary.rst - depend on DEM content not yet in main --- docs/glossary.rst | 19 +------------------ docs/index.rst | 8 -------- 2 files changed, 1 insertion(+), 26 deletions(-) diff --git a/docs/glossary.rst b/docs/glossary.rst index 15ffcdd8e..178a371cf 100644 --- a/docs/glossary.rst +++ b/docs/glossary.rst @@ -17,13 +17,7 @@ Glossary A numerical image processing technique used to correct for the blurring caused by the telescope's Point Spread Function (PSF), improving sharpness and visibility of fine structures. DEM - Differential Emission Measure (DEM) — a function that describes how much plasma is present along the line of sight as a function of temperature. See :ref:`xrtpy-dem-overview` for a detailed overview of DEM theory, - usage, and the solver provided in XRTpy. - - DEM Inversion - The process of determining the temperature distribution of coronal plasma (the DEM) from a small number of filter intensities. Since more temperature bins are used than available filters, the problem is mathematically - underconstrained (“ill posed”), so regularization and smoothing are required to obtain a stable, physical solution. - + Differential Emission Measure (DEM) — a function that describes the distribution of plasma as a function of temperature along the line of sight. XRTpy will support DEM modeling in future versions. DN Data Number (DN) — the digital value recorded by the CCD, representing the detected photon flux, usually in DN s\ :sup:`−1`\ . @@ -44,20 +38,9 @@ Glossary Contamination (related to the XRT) Refers to the gradual accumulation of material on the CCD and focal plane filters (FPFs), which reduces instrument throughput. This time-dependent degradation impacts effective area calculations and must be accounted for in data analysis. Refer to Section 2.5.3 *Contamination* in the `SolarSoft XRT Analysis Guide`_ for more information. - Monte Carlo DEM - A set of DEM solutions computed by adding random noise (based on intensity errors) to the observed intensities and re-solving the DEM multiple times. - The spread of these Monte Carlo solutions provides an estimate ofuncertainty in the DEM at each temperature. - PSF Point Spread Function — describes the response of the telescope to a point source of light. In XRTpy, it is used in deconvolution routines to sharpen images. - Response Matrix - A two-dimensional array containing the temperature response of each XRT filter interpolated onto the solver’s regular log10 temperature grid.This matrix connects - the DEM to the modeled filter intensities through the forward model: - - :math:`I_i^{model} = \sum_j DEM(T_j)\, R_i(T_j)\, T_j\, \Delta(\ln T)`. - - Solar Emission Spectra Emission spectra produced by solar plasma across a range of temperatures, calculated using spectral models such as CHIANTI. These spectra are used in temperature response and filter ratio methods diff --git a/docs/index.rst b/docs/index.rst index bc56f7ed6..b2812ead1 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -21,7 +21,6 @@ Whether you're conducting research or just beginning to explore the world of X-r about_xrt install getting_started - dem_overview generated/gallery/index reference/index acknowledging_xrtpy @@ -31,10 +30,3 @@ Whether you're conducting research or just beginning to explore the world of X-r contributing code_of_conduct changelog/index - -Published Work --------------- - -The following paper describes the XRTpy package and its initial release- v0.4.0: - -:cite:p:`velasquez:2024` From e1e7d6f15f81f6c52801a8c9fecfd4b4bca88333 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 2 Jul 2026 16:21:52 +0000 Subject: [PATCH 3/3] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- docs/getting_started.rst | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/docs/getting_started.rst b/docs/getting_started.rst index d6af2ed45..6e1fef6e9 100644 --- a/docs/getting_started.rst +++ b/docs/getting_started.rst @@ -72,9 +72,7 @@ To use a different abundance model: from xrtpy.response import TemperatureResponseFundamental TemperatureResponseFundamental( - "Al-poly", - "2022-07-04T23:43:12", - abundance_model="hybrid" + "Al-poly", "2022-07-04T23:43:12", abundance_model="hybrid" ) You may also pass the ``abundance_model`` keyword to ``temperature_from_filter_ratio``. @@ -103,15 +101,15 @@ This function returns a list of ``TemperatureResponseFundamental`` objects, one from xrtpy.response.tools import generate_temperature_responses responses = generate_temperature_responses( - filters=["Al-poly", "Be-thick", "Al-poly/Ti-poly"], - obs_date="2020-07-04T00:00:00", - abundance="Hybrid", + filters=["Al-poly", "Be-thick", "Al-poly/Ti-poly"], + obs_date="2020-07-04T00:00:00", + abundance="Hybrid", ) for resp in responses: - print(f"Filter: {resp.filter_name}") - print(f" Temperatures: {resp.temperature[:3]}") - print(f" Response: {resp.response[:3]}") + print(f"Filter: {resp.filter_name}") + print(f" Temperatures: {resp.temperature[:3]}") + print(f" Response: {resp.response[:3]}") **Example Output:** @@ -161,10 +159,10 @@ XRTpy now supports double filter combinations such as ``"Al-poly/Ti-poly"`` in b from xrtpy.response import EffectiveAreaFundamental, TemperatureResponseFundamental eff_area = EffectiveAreaFundamental( - "Al-poly/Ti-poly", "2020-08-17T09:00:00", abundance_model="photospheric" + "Al-poly/Ti-poly", "2020-08-17T09:00:00", abundance_model="photospheric" ) temp_resp = TemperatureResponseFundamental( - "C-poly/Ti-poly", "2025-07-10T12:00:00", abundance_model="coronal" + "C-poly/Ti-poly", "2025-07-10T12:00:00", abundance_model="coronal" ) The following combinations are currently supported: