.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "generated/gallery/channels.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_generated_gallery_channels.py: ============================= Exploring XRT's Configuration ============================= This example explores the X-Ray Telescope (XRT) instrument properties using XRTpy's `xrtpy.response.Channel`. It provides convenient methods and attributes to access and analyze various aspects of the XRT instrument configuration. .. GENERATED FROM PYTHON SOURCE LINES 10-15 .. code-block:: Python import matplotlib.pyplot as plt import xrtpy .. GENERATED FROM PYTHON SOURCE LINES 16-23 We begin by defining a filter channel by its common abbreviation. In this example we will be exploring the titanium-on-polyimide filter. For detailed information about various filter channels and their characteristics, you can refer to :ref:`xrtpy-about-xrt-filters`. To explore the properties and characteristics of a defined filter channel, we will create a `xrtpy.response.Channel`. By passing in the filter name as an input, we can work with the properties associated with the titanium-on-polyimide filter. .. GENERATED FROM PYTHON SOURCE LINES 23-26 .. code-block:: Python channel = xrtpy.response.Channel("Ti-poly") .. GENERATED FROM PYTHON SOURCE LINES 27-29 Now that we have created our channel, we can delve into the XRT instrument and its properties. We will start by examining basic information about the XRT instrument. .. GENERATED FROM PYTHON SOURCE LINES 29-34 .. code-block:: Python print("Selected filter:", channel.name) print("\nObservatory:", channel.observatory) print("Instrument:", channel.instrument) .. rst-class:: sphx-glr-script-out .. code-block:: none Selected filter: Ti-poly Observatory: Hinode Instrument: XRT .. GENERATED FROM PYTHON SOURCE LINES 35-42 It is important to note that most instrument properties of XRT remain the same regardless of the specific filter being used. This means that many characteristics and specifications of the XRT instrument, such as its dimensions, field of view, and detector properties, are independent of the selected filter. We can explore various characteristics of the the Charge-Coupled-Device (CCD) camera camera, such as its quantum efficiency and pixel size to list a few. .. GENERATED FROM PYTHON SOURCE LINES 42-50 .. code-block:: Python print(channel.ccd.ccd_name) print("\nPixel size: ", channel.ccd.ccd_pixel_size) print("Full well: ", channel.ccd.ccd_full_well) print("Gain left: ", channel.ccd.ccd_gain_left) print("Gain right: ", channel.ccd.ccd_gain_right) print("eV pre electron: ", channel.ccd.ccd_energy_per_electron) .. rst-class:: sphx-glr-script-out .. code-block:: none Hinode/XRT Flight Model CCD Pixel size: 13.5 micron Full well: 222000.0 electron Gain left: 58.79999923706055 electron / DN Gain right: 57.5 electron / DN eV pre electron: 3.6500000953674316 eV / electron .. GENERATED FROM PYTHON SOURCE LINES 51-52 We can explore the XRT entrance filter properties utilizing ``entrancefilter``. .. GENERATED FROM PYTHON SOURCE LINES 52-58 .. code-block:: Python print(channel.entrancefilter.entrancefilter_name) print("Material: ", channel.entrancefilter.entrancefilter_material) print("Thickness: ", channel.entrancefilter.entrancefilter_thickness) print("Density: ", channel.entrancefilter.entrancefilter_density) .. rst-class:: sphx-glr-script-out .. code-block:: none Entrance filters Material: ['Al2O3' 'Al' 'Al2O3' 'polyimide'] Thickness: [ 75. 1492. 0. 2030.] Angstrom Density: [3.97 2.699 3.97 1.43 ] g / cm3 .. GENERATED FROM PYTHON SOURCE LINES 59-66 XRT data is recorded through nine X-ray filters, which are implemented using two filter wheels. By utilizing the ``channel.filter_#`` notation, where ``#`` represents filter wheel 1 or 2, we can explore detailed information about the selected XRT channel filter. It's worth noting that sometimes the other filter will yield the result "Open," as it's not use. For more comprehensive information about the XRT filters, you can refer to :ref:`xrtpy-about-xrt-filters`. .. GENERATED FROM PYTHON SOURCE LINES 66-72 .. code-block:: Python print("Filter Wheel:", channel.filter_2.filter_name) print("\nFilter material:", channel.filter_2.filter_material) print("Thickness: ", channel.filter_2.filter_thickness) print("Density: ", channel.filter_2.filter_density) .. rst-class:: sphx-glr-script-out .. code-block:: none Filter Wheel: Ti filter on polyimide Filter material: ['TiO2' 'Ti' 'TiO2' 'polyimide'] Thickness: [ 75. 2338. 0. 2522.] Angstrom Density: [4.26 4.54 4.26 1.43] g / cm3 .. GENERATED FROM PYTHON SOURCE LINES 73-74 We can explore geometry factors in the XRT using ``geometry``. .. GENERATED FROM PYTHON SOURCE LINES 74-79 .. code-block:: Python print(channel.geometry.geometry_name) print("\nFocal length:", channel.geometry.geometry_focal_len) print("Aperture Area:", channel.geometry.geometry_aperture_area) .. rst-class:: sphx-glr-script-out .. code-block:: none Hinode/XRT Flight Model geometry Focal length: 270.753 cm Aperture Area: 2.28 cm2 .. GENERATED FROM PYTHON SOURCE LINES 80-83 The XRT is equipped with two mirrors and We can access the properties of these mirrors using the ``channel_mirror_#`` notation, where ``#`` represents the first or second mirror surface. .. GENERATED FROM PYTHON SOURCE LINES 83-89 .. code-block:: Python print(channel.mirror_1.mirror_name) print("Material: ", channel.mirror_1.mirror_material) print("Density: ", channel.mirror_1.mirror_density) print("Graze_angle: ", channel.mirror_1.mirror_graze_angle) .. rst-class:: sphx-glr-script-out .. code-block:: none Hinode/XRT Flight Model mirror Material: Zerodur Density: 2.5299999713897705 g / cm3 Graze_angle: 0.9100000262260437 deg .. GENERATED FROM PYTHON SOURCE LINES 90-91 Finally we can explore the XRT transmission properties .. GENERATED FROM PYTHON SOURCE LINES 91-104 .. code-block:: Python plt.figure() plt.plot(channel.wavelength, channel.transmission, label=f"{channel.name}") plt.title(f"{channel.name} filter") plt.xlabel(r"$\lambda$ [Å]") plt.ylabel(r"Transmittance") # The full range goes up to 400 Å, but we will limit it to 80 Å for better visualization plt.xlim(0, 80) plt.grid(color="lightgrey") plt.tight_layout() plt.show() .. image-sg:: /generated/gallery/images/sphx_glr_channels_001.png :alt: Ti-poly filter :srcset: /generated/gallery/images/sphx_glr_channels_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.170 seconds) .. _sphx_glr_download_generated_gallery_channels.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: channels.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: channels.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: channels.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_