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:0 Results from the SOARClient:Errors: HTTPConnectionPool(host='soar.esac.esa.int', port=80): Read timed out. (read timeout=60)
QueryResponseTable length=0
To then download the data, you would use Fido.fetch(result), which will download the data locally.
Total running time of the script: (1 minutes 39.345 seconds)
🏷 Tags: Acquiring Data, SOAR, Solar Orbiter
Gallery generated by Sphinx-Gallery