Skip to content

Commit 49dccb8

Browse files
committed
Increase astropy timeout limit to 120s
1 parent 95f874c commit 49dccb8

3 files changed

Lines changed: 14 additions & 5 deletions

File tree

tutorials/euclid/3_Euclid_intro_1D_spectra.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ from astropy.io import fits
7474
from astropy.table import QTable
7575
from astropy import units as u
7676
from astropy.coordinates import SkyCoord
77+
from astropy.utils.data import conf
7778
from astropy.visualization import quantity_support
7879
7980
from astroquery.ipac.irsa import Irsa
@@ -91,6 +92,10 @@ warnings.filterwarnings(
9192
message="The unit 'erg' has been deprecated",
9293
category=u.UnitsWarning,
9394
)
95+
96+
# The Euclid spectrum files are large and the time it takes to read
97+
# them can exceed astropy's default timeout limit. Increase it.
98+
conf.remote_timeout = 120
9499
```
95100

96101
## 1. Search for the spectrum of a specific galaxy

tutorials/euclid/4_Euclid_intro_PHZ_catalog.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,16 @@ from astropy.io import fits
8383
from astropy.nddata import Cutout2D
8484
from astropy.table import QTable
8585
from astropy import units as u
86-
from astropy.utils.data import download_file
86+
from astropy.utils.data import conf, download_file
8787
from astropy.visualization import ImageNormalize, PercentileInterval, AsinhStretch, LogStretch, quantity_support
8888
from astropy.wcs import WCS
8989
9090
from firefly_client import FireflyClient
9191
from astroquery.ipac.irsa import Irsa
92+
93+
# The Euclid spectrum files are large and the time it takes to read
94+
# them can exceed astropy's default timeout limit. Increase it.
95+
conf.remote_timeout = 120
9296
```
9397

9498
## 1. Find the MER Tile ID that corresponds to a given RA and Dec

tutorials/euclid/5_Euclid_intro_SPE_catalog.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,14 @@ from astropy.coordinates import SkyCoord
7878
from astropy.io import fits
7979
from astropy.table import QTable
8080
from astropy import units as u
81-
from astropy.utils.data import download_file
82-
from astropy.utils import data
81+
from astropy.utils.data import conf, download_file
8382
from astropy.visualization import ImageNormalize, PercentileInterval, AsinhStretch, quantity_support
8483
8584
from astroquery.ipac.irsa import Irsa
8685
87-
# Increase Astropy’s default network timeout (in seconds) for remote name resolution and data access
88-
data.conf.remote_timeout = 60
86+
# The Euclid spectrum files are large and the time it takes to read
87+
# them can exceed astropy's default timeout limit. Increase it.
88+
conf.remote_timeout = 120
8989
9090
#suppress warnings about deprecated units and cache
9191
import warnings

0 commit comments

Comments
 (0)