[{"data":1,"prerenderedAt":44},["ShallowReactive",2],{"analysis-playbook-hinode-eis-level0":3},{"@context":4,"@type":5,"name":6,"description":7,"proficiencyLevel":8,"dependencies":9,"programmingLanguage":14,"keywords":15,"citation":23,"about":39,"articleBody":43},"https:\u002F\u002Fschema.org","TechArticle","Hinode\u002FEIS Level-0 Spectra Visualization","Visualize Hinode EUV Imaging Spectrometer (EIS) Level-0 data. Lists observations by date from DARTS, reads gzip-compressed binary-table FITS files containing EUV spectral windows, and plots spectra or spatial intensity maps for coronal emission lines.","beginner",[10,11,12,13],"astropy","matplotlib","numpy","requests","Python",[16,17,18,19,20,21,22],"Hinode","EIS","EUV Imaging Spectrometer","solar corona","EUV","spectroscopy","FITS",[24,28,32,35],{"@type":25,"url":26,"name":27},"WebPage","https:\u002F\u002Fdarts.isas.jaxa.jp\u002Fdatasets\u002Fdarts:hinode-eis-level0\u002F","Hinode EIS Level-0 dataset at DARTS",{"@type":29,"url":30,"name":31},"ScholarlyArticle","https:\u002F\u002Fdoi.org\u002F10.1007\u002Fs11207-007-9014-6","The Hinode (Solar-B) Mission: An Overview",{"@type":29,"url":33,"name":34},"https:\u002F\u002Fdoi.org\u002F10.1007\u002Fs11207-007-9996-1","EUV Imaging Spectrometer for Hinode",{"@type":36,"url":37,"name":38},"SoftwareApplication","https:\u002F\u002Fsunpy.org\u002F","SunPy",[40],{"@type":41,"name":42},"Dataset","darts:hinode-eis-level0","## Hinode\u002FEIS Level-0 Spectra Visualization\n\nHinode EUV Imaging Spectrometer (EIS) Level-0 data contain raw EUV spectra of the solar corona\nacross multiple emission line windows (2006–present).\nEach file covers one raster observation and stores spectra from up to ~25 emission lines\nas a binary table in gzip-compressed FITS format.\nThe dataset page is at [DARTS](https:\u002F\u002Fdarts.isas.jaxa.jp\u002Fdatasets\u002Fdarts:hinode-eis-level0\u002F).\n\n---\n\n### Data Files\n\nFiles are organized by observation date under:\n\n```\nhttps:\u002F\u002Fdata.darts.isas.jaxa.jp\u002Fpub\u002Fhinode\u002Feis\u002Flevel0\u002F{YYYY}\u002F{MM}\u002F{DD}\u002F\n```\n\nEach file covers one raster sequence:\n\n```\neis_l0_{YYYYMMDD}_{HHMMSS}.fits.gz\n```\n\nThe FITS file contains a Primary HDU (metadata only) and a `DATA` binary table extension.\nEach row in the table corresponds to one slit position in the raster (`NEXP` rows total).\nSpectral windows are stored as 2D arrays `[n_wavelength × n_spatial]` per row.\n\n#### Key Primary HDU header keywords\n\n| Keyword     | Example value               | Description |\n|-------------|-----------------------------|-------------|\n| `DATE_OBS`  | `2017-10-12T06:13:19`       | Observation start time (UTC) |\n| `DATE_END`  | `2017-10-12T06:16:15`       | Observation end time (UTC) |\n| `XCEN`      | `-203.9`                    | FOV center Solar-X (arcsec) |\n| `YCEN`      | `43.1`                      | FOV center Solar-Y (arcsec) |\n| `FOVX`      | `479.2`                     | Field of view in X (arcsec) |\n| `FOVY`      | `488.0`                     | Field of view in Y (arcsec) |\n| `SLIT_ID`   | `40\"`                       | Slit\u002Fslot width |\n| `NWIN`      | `10`                        | Number of spectral windows |\n| `NEXP`      | `15`                        | Number of raster slit positions |\n| `OBSTITLE`  | `HOP323 (plage)`            | Observation title |\n| `TARGET`    | `Active Region`             | Observation target |\n| `DATA_LEV`  | `0`                         | Processing level |\n\n#### Binary table columns (DATA extension)\n\nEach spectral window column is named after the emission line (e.g., `Fe XII 195.120`)\nand has shape `(n_wavelength, n_spatial)` — typically `(40, 488)` pixels.\nAdditional scalar columns per row include:\n\n| Column      | Description |\n|-------------|-------------|\n| `TI_1`      | Exposure start time (seconds from DATE_OBS) |\n| `exp_dur`   | Exposure duration (seconds) |\n| `XCEN_TI1`  | Solar-X center at exposure start (arcsec) |\n| `YCEN_TI1`  | Solar-Y center at exposure start (arcsec) |\n| `fmirr`     | Fine mirror position (scan step) |\n\n---\n\n### Visualization with Python\n\n#### Requirements\n\n```\npip install astropy matplotlib numpy requests\n```\n\n#### Helper functions\n\n```python\nimport re\nimport gzip\nimport io\nimport requests\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom astropy.io import fits\n\nBASE = \"https:\u002F\u002Fdata.darts.isas.jaxa.jp\u002Fpub\u002Fhinode\u002Feis\u002Flevel0\"\n\ndef list_eis_files(year, month, day):\n    \"\"\"Return list of file URLs for a given date.\"\"\"\n    date_url = f\"{BASE}\u002F{year:04d}\u002F{month:02d}\u002F{day:02d}\u002F\"\n    resp = requests.get(date_url, timeout=30, verify=False)\n    if resp.status_code != 200:\n        return []\n    names = re.findall(r'href=\"(eis_l0_\\w+\\.fits\\.gz)\"', resp.text)\n    return [date_url + n for n in names]\n\ndef load_eis(url):\n    \"\"\"Download and open a gzip-compressed EIS Level-0 FITS file.\"\"\"\n    r = requests.get(url, timeout=120, verify=False)\n    r.raise_for_status()\n    return fits.open(io.BytesIO(gzip.decompress(r.content)))\n```\n\n#### Example 1: List spectral windows and print observation summary\n\n```python\nurls = list_eis_files(2017, 10, 12)\nprint(f\"{len(urls)} files found\")\n\nwith load_eis(urls[0]) as hdul:\n    h = hdul[0].header\n    print(f\"Date:    {h['DATE_OBS']}  →  {h['DATE_END']}\")\n    print(f\"Title:   {h['OBSTITLE']}\")\n    print(f\"Target:  {h['TARGET']}\")\n    print(f\"Center:  ({h['XCEN']:.1f}\\\", {h['YCEN']:.1f}\\\")\")\n    print(f\"FOV:     {h['FOVX']:.1f}\\\" × {h['FOVY']:.1f}\\\"\")\n    print(f\"Slit:    {h['SLIT_ID']}  |  {h['NEXP']} raster positions\")\n    print()\n    print(\"Spectral windows:\")\n    for col in hdul[1].columns:\n        if col.dim:   # spectral windows have dim set\n            print(f\"  {col.name:25s}  shape={col.dim}\")\n```\n\n#### Example 2: Plot a spectrum for one emission line at one slit position\n\n```python\nwith load_eis(urls[0]) as hdul:\n    h = hdul[0].header\n    data = hdul[1].data\n    spec_cols = [col.name for col in hdul[1].columns if col.dim]\n\n    # Pick the first available Fe XII window (name varies slightly between obs)\n    line = next((c for c in spec_cols if \"Fe XII\" in c), spec_cols[0])\n    cube = np.array([row[line] for row in data])  # shape: (NEXP, n_wave, n_spatial)\n\n    # Mean spectrum averaged over all slit positions and spatial pixels\n    mean_spec = cube.mean(axis=(0, 2))\n\n    fig, ax = plt.subplots(figsize=(8, 4))\n    ax.plot(mean_spec)\n    ax.set_xlabel(\"Wavelength pixel\")\n    ax.set_ylabel(\"Intensity (raw counts)\")\n    ax.set_title(f\"Hinode\u002FEIS  {line}  —  {h['DATE_OBS'][:19]}\")\n    plt.tight_layout()\n    plt.savefig(\"hinode_eis_spectrum.png\", dpi=150, bbox_inches=\"tight\")\n    plt.close()\n```\n\n#### Example 3: Build a spatial intensity map (sum over wavelength)\n\n```python\nwith load_eis(urls[0]) as hdul:\n    h = hdul[0].header\n    data = hdul[1].data\n    spec_cols = [col.name for col in hdul[1].columns if col.dim]\n\n    line = next((c for c in spec_cols if \"Fe XII\" in c), spec_cols[0])\n    cube = np.array([row[line] for row in data])  # (NEXP, n_wave, n_spatial)\n\n    # Integrate over wavelength axis → (NEXP, n_spatial) = (scan, slit)\n    intensity_map = cube.sum(axis=1).T   # (n_spatial, NEXP)\n\n    fig, ax = plt.subplots(figsize=(6, 8))\n    vmin, vmax = np.percentile(intensity_map, [1, 99])\n    im = ax.imshow(intensity_map, origin=\"lower\", cmap=\"hot\",\n                   vmin=vmin, vmax=vmax, aspect=\"auto\")\n    fig.colorbar(im, ax=ax, label=\"Intensity (raw counts)\")\n    ax.set_xlabel(\"Raster position (slit step)\")\n    ax.set_ylabel(\"Spatial pixel (along slit)\")\n    ax.set_title(f\"Hinode\u002FEIS  {line}\\n{h['DATE_OBS'][:19]}\")\n    plt.tight_layout()\n    plt.savefig(\"hinode_eis_map.png\", dpi=150, bbox_inches=\"tight\")\n    plt.close()\n```\n\n#### Example 4: Compare multiple emission lines side by side\n\n```python\nwith load_eis(urls[0]) as hdul:\n    h = hdul[0].header\n    data = hdul[1].data\n    spec_cols = [col.name for col in hdul[1].columns if col.dim]\n\n    n = len(spec_cols)\n    fig, axes = plt.subplots(2, (n + 1) \u002F\u002F 2, figsize=(14, 6))\n    for ax, line in zip(axes.flat, spec_cols):\n        cube = np.array([row[line] for row in data])\n        imap = cube.sum(axis=1).T\n        vmin, vmax = np.percentile(imap, [1, 99])\n        ax.imshow(imap, origin=\"lower\", cmap=\"hot\", vmin=vmin, vmax=vmax, aspect=\"auto\")\n        ax.set_title(line, fontsize=8)\n        ax.set_axis_off()\n\n    for ax in axes.flat[n:]:\n        ax.set_visible(False)\n\n    fig.suptitle(f\"Hinode\u002FEIS — {h['DATE_OBS'][:19]}\")\n    plt.tight_layout()\n    plt.savefig(\"hinode_eis_all_lines.png\", dpi=150, bbox_inches=\"tight\")\n    plt.close()\n```\n\n---\n\n### Notes\n\n- Level-0 data are raw telemetry with no radiometric calibration. For calibrated spectra (Level-1), use the IDL `eis_prep` routine from Solar Software (SSW) or the Python package `eispac`.\n- The spectral window names in the binary table correspond to the dominant emission line in each window. Each window contains `n_wavelength` spectral pixels (typically 24–40) × `n_spatial` slit pixels (up to 512).\n- The `SLIT_ID` keyword identifies the slit used: `1\"`, `2\"`, `40\"` (slot), or `266\"` (slot). The 40\" and 266\" slots produce context images rather than true spectra.\n- SSL certificate verification may fail for `data.darts.isas.jaxa.jp`; pass `verify=False` to `requests.get` as a workaround.\n- For absolute wavelength calibration, a dispersion of approximately 0.0223 Å\u002Fpixel applies to the short-wavelength channel (SW: 170–210 Å) and 0.0446 Å\u002Fpixel to the long-wavelength channel (LW: 250–290 Å).\n\n---\n\n### Acknowledgement\n\nWhen using this data in publications, please follow the [Hinode data use guidelines](https:\u002F\u002Fdarts.isas.jaxa.jp\u002Fmissions\u002Fhinode\u002Fguidelines.html) and cite:\n\n- Kosugi, T. et al. (2007), Sol. Phys., 243, 3. [doi:10.1007\u002Fs11207-007-9014-6](https:\u002F\u002Fdoi.org\u002F10.1007\u002Fs11207-007-9014-6) — Hinode mission\n- Culhane, J.L. et al. (2007), Sol. Phys., 243, 19. [doi:10.1007\u002Fs11207-007-9996-1](https:\u002F\u002Fdoi.org\u002F10.1007\u002Fs11207-007-9996-1) — EIS instrument\n",1780296758120]