13
13
from astroquery .linelists .cdms import conf
14
14
from astroquery .exceptions import InvalidQueryError , EmptyResponseError
15
15
16
- import warnings
17
16
import re
18
17
import string
19
18
@@ -296,7 +295,7 @@ def _parse_result(self, response, *, verbose=False):
296
295
def get_species_table (self , * , catfile = 'partfunc.cat' , use_cached = True ,
297
296
catfile_url = conf .catfile_url ,
298
297
catfile2 = 'catdir.cat' , catfile_url2 = conf .catfile_url2 ,
299
- write_new_species_cache = True ):
298
+ write_new_species_cache = False ):
300
299
"""
301
300
A directory of the catalog is found in a file called 'catdir.cat.'
302
301
@@ -308,12 +307,13 @@ def get_species_table(self, *, catfile='partfunc.cat', use_cached=True,
308
307
The catalog file, installed locally along with the package
309
308
use_cached : bool, optional
310
309
If True, use the cached file if it exists. If False, download the
311
- file from the CDMS server and save it to the cache (if ``write`` is set).
310
+ file from the CDMS server and save it to the cache if
311
+ ``write_new_species_cache`` is set.
312
312
write_new_species_cache : bool, optional
313
- If True, and if ``use_cached`` is False, write the species data
314
- table files to the CDMS data directory. Use this option if you need
315
- to update the index from CDMS; this should be set to False for
316
- testing.
313
+ *Overrides ``use_cached=True``*.
314
+ If True, write the species data table files to the CDMS data
315
+ directory. Use this option if you need to update the index from
316
+ CDMS; this should be set to False for testing.
317
317
318
318
Returns
319
319
-------
@@ -326,9 +326,7 @@ def get_species_table(self, *, catfile='partfunc.cat', use_cached=True,
326
326
327
327
"""
328
328
329
- if use_cached :
330
- if write_new_species_cache :
331
- warnings .warn ("use_cached and write_new_species_cache are both set to True; write_new_species_cache will be ignored. If you meant to update the cache, set use_cached to False." )
329
+ if use_cached and not write_new_species_cache :
332
330
try :
333
331
result = ascii .read (data_path (catfile ), format = 'fixed_width' , delimiter = '|' )
334
332
result2 = ascii .read (data_path (catfile2 ), format = 'fixed_width' , delimiter = '|' )
0 commit comments