Coder Social home page Coder Social logo

Comments (3)

willettk avatar willettk commented on July 19, 2024

I can't reproduce the first error that you reported above. Using the module hosted in this repo, I get the following:

In [21]: import nedpy
In [32]: nedpy.query_ned_basic_posn('M32').names[:5]
Out[32]: 
('pos_ref',
 'pos_ra_equ_B1950_d',
 'pos_dec_equ_B1950_d',
 'pos_ra_equ_B1950_s',
 'pos_dec_equ_B1950_s')

As to the second, I've added some basic error-catching routines to each of the routines in this module; this looks to see if the data returned from the NED server is a formatted XML file and if any results were found for the query. There are still queries which return ill-formatted Tables that result in errors (which cdeil mentioned in another issue). Either we take these examples to NED and ask them about the output format or we have to find a way to read in the string and fix it within the module. I'm open to either, but would like more data on which queries are still making this break.

from astroquery.

cdeil avatar cdeil commented on July 19, 2024

Can you try with astroquery?
I still only get default, not the actual, column names:

In [1]: from astroquery import ned
WARNING: ConfigurationDefaultMissingWarning: Requested default configuration file /Users/deil/Library/Python/2.7/lib/python/site-packages/astroquery-0.0.dev270-py2.7.egg/astroquery/astroquery.cfg is not a file. Cannot install default profile. If you are importing from source, this is expected. [astroquery]

In [2]: ned.query_ned_basic_posn('M32').colnames[:5]
WARNING: W42: /var/folders/sb/4qv5j4m90pz1rw7m70rj1b1r0000gn/T/tmphqq6fC:2:0: W42: No XML namespace specified [astropy.io.votable.exceptions]
WARNING: W22: /var/folders/sb/4qv5j4m90pz1rw7m70rj1b1r0000gn/T/tmphqq6fC:3:0: W22: The DEFINITIONS element is deprecated in VOTable 1.1.  Ignoring [astropy.io.votable.exceptions]
WARNING: W04: /var/folders/sb/4qv5j4m90pz1rw7m70rj1b1r0000gn/T/tmphqq6fC:18:0: W04: content-type 'char' must be a valid MIME content type [astropy.io.votable.exceptions]
WARNING: W50: /var/folders/sb/4qv5j4m90pz1rw7m70rj1b1r0000gn/T/tmphqq6fC:26:0: W50: Invalid unit string 'degrees' [astropy.io.votable.exceptions]
WARNING: W50: /var/folders/sb/4qv5j4m90pz1rw7m70rj1b1r0000gn/T/tmphqq6fC:29:0: W50: Invalid unit string 'degrees' [astropy.io.votable.exceptions]
WARNING: W50: /var/folders/sb/4qv5j4m90pz1rw7m70rj1b1r0000gn/T/tmphqq6fC:38:0: W50: Invalid unit string 'arcseconds' [astropy.io.votable.exceptions]
WARNING: W50: /var/folders/sb/4qv5j4m90pz1rw7m70rj1b1r0000gn/T/tmphqq6fC:41:0: W50: Invalid unit string 'arcseconds' [astropy.io.votable.exceptions]
WARNING: W50: /var/folders/sb/4qv5j4m90pz1rw7m70rj1b1r0000gn/T/tmphqq6fC:44:0: W50: Invalid unit string 'arcseconds' [astropy.io.votable.exceptions]
WARNING: W50: /var/folders/sb/4qv5j4m90pz1rw7m70rj1b1r0000gn/T/tmphqq6fC:47:0: W50: Invalid unit string 'degrees' [astropy.io.votable.exceptions]
WARNING: W50: /var/folders/sb/4qv5j4m90pz1rw7m70rj1b1r0000gn/T/tmphqq6fC:50:0: W50: Invalid unit string 'degrees' [astropy.io.votable.exceptions]
WARNING: W50: /var/folders/sb/4qv5j4m90pz1rw7m70rj1b1r0000gn/T/tmphqq6fC:59:0: W50: Invalid unit string 'arcseconds' [astropy.io.votable.exceptions]
WARNING: W50: /var/folders/sb/4qv5j4m90pz1rw7m70rj1b1r0000gn/T/tmphqq6fC:62:0: W50: Invalid unit string 'arcseconds' [astropy.io.votable.exceptions]
WARNING: W50: /var/folders/sb/4qv5j4m90pz1rw7m70rj1b1r0000gn/T/tmphqq6fC:65:0: W50: Invalid unit string 'arcseconds' (suppressing further warnings of this type...) [astropy.io.votable.exceptions]
Out[2]: ['posn_col1', 'posn_col2', 'posn_col3', 'posn_col4', 'posn_col5']

from astroquery.

keflavich avatar keflavich commented on July 19, 2024

refactor has corrected this, I hope

from astroquery.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.