Searching for Solar Orbiter data using Solar Distance attribute
This example demonstrates how to search and download Solar Orbiter data using sunpy.net.Fido.
To do this, we can build a query based on several attributes.
The Distance attribute allows us to specify a range of distances from the Sun in astronomical units (AU).
import astropy.units as u
from sunpy.net import Fido
from sunpy.net import attrs as a
We shall start with constructing a search query with instrument, level, detector, and distance.
instrument = a.Instrument("EUI")
time = a.Time("2022-10-29 05:00:00", "2022-10-29 06:00:00")
level = a.Level(2)
detector = a.Detector("HRI_EUV")
distance = a.soar.Distance(0.45 * u.AU, 0.46 * u.AU)
Now do the search without time attribute.
result = Fido.search(instrument & level & detector & distance)
result
Results from 1 Provider:37130 Results from the SOARClient:
QueryResponseTable length=37130
| Instrument | Data product | Level | Start time | End time | Filesize | SOOP Name | Detector | Wavelength |
| | | | | Mbyte | | | |
| str3 | str25 | str2 | str23 | str23 | float64 | str48 | str7 | float64 |
| EUI | eui-hrieuv174-image-short | L2 | 2022-10-29 04:59:58.222 | 2022-10-29 04:59:58.252 | 0.112 | R_SMALL_HRES_HCAD_Atmospheric-Dynamics-Structure | HRI_EUV | 174.0 |
| EUI | eui-hrieuv174-image-short | L2 | 2022-10-29 04:59:58.222 | 2022-10-29 04:59:58.252 | 0.112 | R_SMALL_HRES_HCAD_Atmospheric-Dynamics-Structure | HRI_EUV | 174.0 |
| EUI | eui-hrieuv174-image | L2 | 2022-10-29 05:00:00.231 | 2022-10-29 05:00:01.881 | 5.599 | R_SMALL_HRES_HCAD_Atmospheric-Dynamics-Structure | HRI_EUV | 174.0 |
| EUI | eui-hrieuv174-image | L2 | 2022-10-29 05:00:00.231 | 2022-10-29 05:00:01.881 | 5.599 | R_SMALL_HRES_HCAD_Atmospheric-Dynamics-Structure | HRI_EUV | 174.0 |
| EUI | eui-hrieuv174-image-short | L2 | 2022-10-29 05:00:03.222 | 2022-10-29 05:00:03.252 | 0.109 | R_SMALL_HRES_HCAD_Atmospheric-Dynamics-Structure | HRI_EUV | 174.0 |
| EUI | eui-hrieuv174-image-short | L2 | 2022-10-29 05:00:03.222 | 2022-10-29 05:00:03.252 | 0.109 | R_SMALL_HRES_HCAD_Atmospheric-Dynamics-Structure | HRI_EUV | 174.0 |
| EUI | eui-hrieuv174-image | L2 | 2022-10-29 05:00:05.221 | 2022-10-29 05:00:06.871 | 5.57 | R_SMALL_HRES_HCAD_Atmospheric-Dynamics-Structure | HRI_EUV | 174.0 |
| EUI | eui-hrieuv174-image | L2 | 2022-10-29 05:00:05.221 | 2022-10-29 05:00:06.871 | 5.57 | R_SMALL_HRES_HCAD_Atmospheric-Dynamics-Structure | HRI_EUV | 174.0 |
| EUI | eui-hrieuv174-image-short | L2 | 2022-10-29 05:00:08.243 | 2022-10-29 05:00:08.273 | 0.109 | R_SMALL_HRES_HCAD_Atmospheric-Dynamics-Structure | HRI_EUV | 174.0 |
| ... | ... | ... | ... | ... | ... | ... | ... | ... |
| EUI | eui-hrieuv174-image | L2 | 2026-02-14 20:59:05.274 | 2026-02-14 20:59:08.924 | 5.279 | R_BOTH_HRES_HCAD_Filaments | HRI_EUV | 174.0 |
| EUI | eui-hrieuv174-image | L2 | 2026-02-14 20:59:10.274 | 2026-02-14 20:59:13.924 | 5.36 | R_BOTH_HRES_HCAD_Filaments | HRI_EUV | 174.0 |
| EUI | eui-hrieuv174-image | L2 | 2026-02-14 20:59:10.274 | 2026-02-14 20:59:13.924 | 5.36 | R_BOTH_HRES_HCAD_Filaments | HRI_EUV | 174.0 |
| EUI | eui-hrieuv174-image | L2 | 2026-02-14 20:59:15.274 | 2026-02-14 20:59:18.924 | 5.27 | R_BOTH_HRES_HCAD_Filaments | HRI_EUV | 174.0 |
| EUI | eui-hrieuv174-image | L2 | 2026-02-14 20:59:15.274 | 2026-02-14 20:59:18.924 | 5.27 | R_BOTH_HRES_HCAD_Filaments | HRI_EUV | 174.0 |
| EUI | eui-hrieuv174-image | L2 | 2026-02-14 20:59:20.273 | 2026-02-14 20:59:23.923 | 5.282 | R_BOTH_HRES_HCAD_Filaments | HRI_EUV | 174.0 |
| EUI | eui-hrieuv174-image | L2 | 2026-02-14 20:59:20.273 | 2026-02-14 20:59:23.923 | 5.282 | R_BOTH_HRES_HCAD_Filaments | HRI_EUV | 174.0 |
| EUI | eui-hrieuv174-image | L2 | 2026-02-14 20:59:25.376 | 2026-02-14 20:59:29.026 | 5.619 | R_BOTH_HRES_HCAD_Filaments | HRI_EUV | 174.0 |
| EUI | eui-hrieuv174-image | L2 | 2026-02-14 20:59:25.376 | 2026-02-14 20:59:29.026 | 5.619 | R_BOTH_HRES_HCAD_Filaments | HRI_EUV | 174.0 |
Now do the search with time attribute.
result = Fido.search(instrument & level & detector & distance & time)
result
Results from 1 Provider:1439 Results from the SOARClient:
QueryResponseTable length=1439
| Instrument | Data product | Level | Start time | End time | Filesize | SOOP Name | Detector | Wavelength |
| | | | | Mbyte | | | |
| str3 | str25 | str2 | str23 | str23 | float64 | str48 | str7 | float64 |
| EUI | eui-hrieuv174-image | L2 | 2022-10-29 05:00:00.231 | 2022-10-29 05:00:01.881 | 5.599 | R_SMALL_HRES_HCAD_Atmospheric-Dynamics-Structure | HRI_EUV | 174.0 |
| EUI | eui-hrieuv174-image-short | L2 | 2022-10-29 05:00:03.222 | 2022-10-29 05:00:03.252 | 0.109 | R_SMALL_HRES_HCAD_Atmospheric-Dynamics-Structure | HRI_EUV | 174.0 |
| EUI | eui-hrieuv174-image | L2 | 2022-10-29 05:00:05.221 | 2022-10-29 05:00:06.871 | 5.57 | R_SMALL_HRES_HCAD_Atmospheric-Dynamics-Structure | HRI_EUV | 174.0 |
| EUI | eui-hrieuv174-image-short | L2 | 2022-10-29 05:00:08.243 | 2022-10-29 05:00:08.273 | 0.109 | R_SMALL_HRES_HCAD_Atmospheric-Dynamics-Structure | HRI_EUV | 174.0 |
| EUI | eui-hrieuv174-image | L2 | 2022-10-29 05:00:10.222 | 2022-10-29 05:00:11.872 | 5.556 | R_SMALL_HRES_HCAD_Atmospheric-Dynamics-Structure | HRI_EUV | 174.0 |
| EUI | eui-hrieuv174-image-short | L2 | 2022-10-29 05:00:13.222 | 2022-10-29 05:00:13.252 | 0.109 | R_SMALL_HRES_HCAD_Atmospheric-Dynamics-Structure | HRI_EUV | 174.0 |
| EUI | eui-hrieuv174-image | L2 | 2022-10-29 05:00:15.221 | 2022-10-29 05:00:16.871 | 5.561 | R_SMALL_HRES_HCAD_Atmospheric-Dynamics-Structure | HRI_EUV | 174.0 |
| EUI | eui-hrieuv174-image-short | L2 | 2022-10-29 05:00:18.222 | 2022-10-29 05:00:18.252 | 0.109 | R_SMALL_HRES_HCAD_Atmospheric-Dynamics-Structure | HRI_EUV | 174.0 |
| EUI | eui-hrieuv174-image | L2 | 2022-10-29 05:00:20.222 | 2022-10-29 05:00:21.872 | 5.57 | R_SMALL_HRES_HCAD_Atmospheric-Dynamics-Structure | HRI_EUV | 174.0 |
| ... | ... | ... | ... | ... | ... | ... | ... | ... |
| EUI | eui-hrieuv174-image | L2 | 2022-10-29 05:59:35.228 | 2022-10-29 05:59:36.878 | 4.772 | R_SMALL_HRES_HCAD_Atmospheric-Dynamics-Structure | HRI_EUV | 174.0 |
| EUI | eui-hrieuv174-image-short | L2 | 2022-10-29 05:59:38.228 | 2022-10-29 05:59:38.258 | 0.112 | R_SMALL_HRES_HCAD_Atmospheric-Dynamics-Structure | HRI_EUV | 174.0 |
| EUI | eui-hrieuv174-image | L2 | 2022-10-29 05:59:40.228 | 2022-10-29 05:59:41.878 | 4.749 | R_SMALL_HRES_HCAD_Atmospheric-Dynamics-Structure | HRI_EUV | 174.0 |
| EUI | eui-hrieuv174-image-short | L2 | 2022-10-29 05:59:43.228 | 2022-10-29 05:59:43.258 | 0.112 | R_SMALL_HRES_HCAD_Atmospheric-Dynamics-Structure | HRI_EUV | 174.0 |
| EUI | eui-hrieuv174-image | L2 | 2022-10-29 05:59:45.228 | 2022-10-29 05:59:46.878 | 4.761 | R_SMALL_HRES_HCAD_Atmospheric-Dynamics-Structure | HRI_EUV | 174.0 |
| EUI | eui-hrieuv174-image-short | L2 | 2022-10-29 05:59:48.239 | 2022-10-29 05:59:48.269 | 0.112 | R_SMALL_HRES_HCAD_Atmospheric-Dynamics-Structure | HRI_EUV | 174.0 |
| EUI | eui-hrieuv174-image | L2 | 2022-10-29 05:59:50.228 | 2022-10-29 05:59:51.878 | 4.752 | R_SMALL_HRES_HCAD_Atmospheric-Dynamics-Structure | HRI_EUV | 174.0 |
| EUI | eui-hrieuv174-image-short | L2 | 2022-10-29 05:59:53.350 | 2022-10-29 05:59:53.380 | 0.112 | R_SMALL_HRES_HCAD_Atmospheric-Dynamics-Structure | HRI_EUV | 174.0 |
| EUI | eui-hrieuv174-image | L2 | 2022-10-29 05:59:55.230 | 2022-10-29 05:59:56.880 | 4.755 | R_SMALL_HRES_HCAD_Atmospheric-Dynamics-Structure | HRI_EUV | 174.0 |
To then download the data, you would use Fido.fetch(result), which will download the data locally.
Total running time of the script: (0 minutes 40.802 seconds)
🏷 Tags: Acquiring Data, SOAR, Solar Orbiter
Gallery generated by Sphinx-Gallery