astroquery icon indicating copy to clipboard operation
astroquery copied to clipboard

Exoplanet Archive alias queries not cached

Open bmorris3 opened this issue 3 years ago • 1 comments

The astroquery API allows for users to submit cached alias queries like this:

        from astroquery.ipac.nexsci.nasa_exoplanet_archive import NasaExoplanetArchive
        aliases = NasaExoplanetArchive.query_aliases(
            "HAT-P-11", cache=True
        )

but the function doesn't do anything with the value cache (see source). Would it be possible to cache aliases?

bmorris3 avatar Apr 23 '22 11:04 bmorris3

Also, by default query_object* will has the regularize kwarg set to True, which calls self._regularize_object_name(object_name), which calls self.query_aliases(object_name, cache=False), where the last cache kwarg is ignored. So right now the default query_object method fails to cache the name and has to do a lookup online each time it is called, even when cache=True.

bmorris3 avatar Apr 23 '22 11:04 bmorris3