Comments (8)
Inspecting a few other packages,
xmatch
,mast
,ipac.ned
,ipac.nexsci.nasa_exoplanet_archive
have similar runtime config issue.gaia
,ipac.irsa
seem to be okay.
from astroquery.
This is a duplicate of #2993 - in short, we don't support the approach you're trying now, but we could (slowly) refactor to support it.
from astroquery.
There are two issues here.
-
changing with config file. Somehow it does not work, as if
astroquery.cfg
is ignored. I don't think it is raised in other issues. -
changing at runtime: it is of the same nature of #2993 (for astrometry.net) and #2291 (for SIMBAD)
from astroquery.
Ahhh, ok, issue 1 is new, you're right. That is a bug.
from astroquery.
For issue 1, the vizier config in file astroquery.cfg
is ignored, I've reproduced it in Linux and WSL2 as well.
Alongside with issue 2, runtime config is ignored, effectively one cannot configure Vizier at all. The only workaround is to explicitly pass along the parameters in constructing Vizier()
object, e.g., Vizier(vizier_server="vizier.cfa.harvard.edu")
.
Test:
In [1]: import astroquery; print("astroquery:", astroquery.__version__)
...: import astropy; print("astropy:", astropy.__version__)
...:
...: import astroquery.vizier as vizier
...: v = vizier.Vizier()
...: print(v.VIZIER_SERVER)
astroquery: 0.4.6
astropy: 5.2.1
vizier.u-strasbg.fr
In [2]: !grep vizier ~/.astropy/config/astroquery.cfg
[vizier]
# Options: vizier.u-strasbg.fr, vizier.nao.ac.jp, vizier.hia.nrc.ca, vizier.ast.cam.ac.uk, vizier.cfa.harvard.edu, www.ukirt.jach.hawaii.edu, vizier.iucaa.ernet.in, vizier.china-vo.org
#vizier_server = vizier.u-strasbg.fr
vizier_server = vizier.cfa.harvard.edu
Versions:
- WSL2: astroquery 0.4.6, astropy: 5.2.1, Python 3.8
- Linux (Ubuntu 20.404): astroquery: 0.4.6, astropy: 5.3.4, Python 3.11
from astroquery.
For issue 1, static config issue, it turns out the config parameter name for Vizier server is server
, rather than vizier_server
.
This would be ignored
[vizier]
vizier_server = vizier.cfa.harvard.edu
While this would be honored:
[vizier]
server = vizier.cfa.harvard.edu
I use vizier_server
because it is in the generated astroqueryc.cfg
:
# vizier_server = vizier.cds.unistra.fr
It looks like the parameter was renamed from vizier_server
to server
at some astroquery version, and the generated astroqueryc.cfg
was from created from some old version of astroquery.
Re-generating astroqueryc.cfg
would produce a new config file with correct parameter names.
from astropy.config import create_config_file
create_config_file('astroquery', overwrite=True)
from astroquery.
Good detective work. It looks any new astroquery users are unaffected, but anyone who had an old version of the config (the change was 10 years ago, in c58b497, so congrats on being a long-time user!) would encounter the same problem as you.
from astroquery.
There might still be a problem that somehow an outdated astroquery.cfg
is somehow generated.
- I do not know when it was first generated on my machine, but it is in 2020s.
- in a hosted environment I got in May this year (about a month ago), https://timeseries.science.stsci.edu/ , the
astroquery.cfg
there also has the same outdated parameter names. The vizier section ofastroquery.cfg
there:
[vizier]
# Name of the VizieR mirror to use.
# Options: vizier.u-strasbg.fr, vizier.nao.ac.jp, vizier.hia.nrc.ca, vizier.ast.cam.ac.uk, vizier.cfa.harvard.edu, www.ukirt.jach.hawaii.edu, vizier.iucaa.ernet.in, vizier.china-vo.org
#vizier_server = vizier.u-strasbg.fr
# default timeout for connecting to server
#timeout = 60
# maximum number of rows that will be fetched from the result (set to -1 for
# unlimited).
#row_limit = 50
I do not know how / when the astroquery.cfg
there is first generated. But it should be somewhat recent (unless their hosted environment copies some outdated version manually in their process)
The software version there is astroquery 0.4.6, astropy 5.3.4
The vizier section in the above astroquery.cfg
is different from the generated one using create_config_file()
[vizier]
## Name of the VizieR mirror to use.
# server = vizier.cds.unistra.fr
...
The generated one
- has the correct parameter name
server
- does not have the nice description listing out all the mirrors
- the commented default value is different, with the more recent
cds.unistra.fr
domain.
It is as if even if a practically brand new hosted environment, an outdated astroquery.cfg
still gets somehow generated.
from astroquery.
Related Issues (20)
- Switch to dict instead of ordered dict in Vizier find_catalogs HOT 3
- Splatalogue.query_lines() seems to be broken? HOT 2
- Slow Simbad.query_objects & IRSA.query_region searches HOT 6
- Use plot directive to generate figures
- modulate verbosity of astroquery.mast.Observations.download_products() HOT 1
- Add support for upload tables for queries in ALMA
- BUG: CI -- no space left on device HOT 2
- ESA Herschel download_data connection error HOT 2
- MAINT: retire/rename exceptions.TimeoutError in favour of requests
- TST: esasky tests take too long time and donwload too much data HOT 8
- BUG: alma test downloads 850+Mb of data HOT 8
- How to download Level 1 ancillary (*cbcd.fits and *cbunc.fits) from IRSA?
- Vizier.query_region() returns incorrect index for some catalog HOT 3
- CI: rerun failing tests at the end
- Bug in rows limitation in module vizier HOT 2
- Unexpected behavior when passing `obj_names` to `SDSS.query_region()`
- Handling No astronomical object found response HOT 5
- IRSA: adding SSA method
- Astroquery.gaia API Error: RA cannot be converted to hour or hourangle. HOT 2
- MAST cloud dataset doesn't show level 3 data products
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from astroquery.