arcsecond-io / public-issues

An issues-only repository to hold all your questions, issues, remarks, suggestions about arcsecondio!
1 stars 0 forks source link

Issue with the API: searching for some objects gives null coordinates and other values #42

Closed lusiaold closed 6 years ago

lusiaold commented 6 years ago

When I search for some objects (eg. NGC 772), I'm getting null values everywhere. Here's an example:

{"name":"NGC 772","ICRS_coordinates":null,"ecliptic_coordinates":null,"galactic_coordinates":null,"spectral_type":null,"morphological_type":null,"proper_motion":null,"parallax":null,"radial_velocity":null,"age":null,"mass":null,"radius":null,"distance":null,"metallicity":null,"effective_temperature":null,"aliases":[{"name":"[T76] 151B","catalogue_url":"http://vizier.u-strasbg.fr/viz-bin/VizieR-S?%5BT76%5D%20151B"},{"name":"[M98c] 015635.3+184550","catalogue_url":"http://vizier.u-strasbg.fr/viz-bin/VizieR-S?%5BM98c%5D%20015635.3%2B184550"},{"name":"Z 0156.5+1846","catalogue_url":"http://vizier.u-strasbg.fr/viz-bin/VizieR-S?Z%200156.5%2B1846"},{"name":"Z 461-18","catalogue_url":"http://vizier.u-strasbg.fr/viz-bin/VizieR-S?Z%20461-18"},{"name":"UZC J015919.8+190030","catalogue_url":"http://vizier.u-strasbg.fr/viz-bin/VizieR-S?UZC%20J015919.8%2B190030"},{"name":"UGC  1466","catalogue_url":"http://vizier.u-strasbg.fr/viz-bin/VizieR-S?UGC%20%201466"},{"name":"TC 646","catalogue_url":"http://vizier.u-strasbg.fr/viz-bin/VizieR-S?TC%20646"},{"name":"SDSS J015919.55+190027.5","catalogue_url":"http://vizier.u-strasbg.fr/viz-bin/VizieR-S?SDSS%20J015919.55%2B190027.5"},{"name":"PSCz Q01565+1845","catalogue_url":"http://vizier.u-strasbg.fr/viz-bin/VizieR-S?PSCz%20Q01565%2B1845"},{"name":"MCG+03-06-011","catalogue_url":"http://vizier.u-strasbg.fr/viz-bin/VizieR-S?MCG%2B03-06-011"},{"name":"2MASX J01591958+1900271","catalogue_url":"http://vizier.u-strasbg.fr/viz-bin/VizieR-S?2MASX%20J01591958%2B1900271"},{"name":"LEDA    7525","catalogue_url":"http://vizier.u-strasbg.fr/viz-bin/VizieR-S?LEDA%20%20%20%207525"},{"name":"K73   80","catalogue_url":"http://vizier.u-strasbg.fr/viz-bin/VizieR-S?K73%20%20%2080"},{"name":"IRAS F01565+1845","catalogue_url":"http://vizier.u-strasbg.fr/viz-bin/VizieR-S?IRAS%20F01565%2B1845"},{"name":"IRAS 01565+1845","catalogue_url":"http://vizier.u-strasbg.fr/viz-bin/VizieR-S?IRAS%2001565%2B1845"},{"name":"HIPASS J0159+18","catalogue_url":"http://vizier.u-strasbg.fr/viz-bin/VizieR-S?HIPASS%20J0159%2B18"},{"name":"APG  78","catalogue_url":"http://vizier.u-strasbg.fr/viz-bin/VizieR-S?APG%20%2078"},{"name":"NGC   772","catalogue_url":"http://vizier.u-strasbg.fr/viz-bin/VizieR-S?NGC%20%20%20772"}],"object_types":["G","GiP","HI","IG","IR"],"fluxes":[{"name":"b'U'","value":11.35,"error":0.13,"error_max":null,"error_min":null,"bibcode":"2007ApJS..173..185G","quality":"D","system":"Vega","unit":"mag","flags":"|"},{"name":"b'B'","value":11.09,"error":0.13,"error_max":null,"error_min":null,"bibcode":"2007ApJS..173..185G","quality":"D","system":"Vega","unit":"mag","flags":"|"},{"name":"b'V'","value":10.31,"error":0.13,"error_max":null,"error_min":null,"bibcode":"2007ApJS..173..185G","quality":"D","system":"Vega","unit":"mag","flags":"|"},{"name":"b'R'","value":10.23,"error":null,"error_max":null,"error_min":null,"bibcode":"2007AJ....134.2286H","quality":"D","system":"Vega","unit":"mag","flags":"|"},{"name":"b'I'","value":9.38,"error":null,"error_max":null,"error_min":null,"bibcode":"2007AJ....134.2286H","quality":"D","system":"Vega","unit":"mag","flags":"|"},{"name":"b'J'","value":8.168,"error":0.025,"error_max":null,"error_min":null,"bibcode":"2006AJ....131.1163S","quality":"C","system":"Vega","unit":"mag","flags":"|"},{"name":"b'H'","value":7.44,"error":0.028,"error_max":null,"error_min":null,"bibcode":"2006AJ....131.1163S","quality":"C","system":"Vega","unit":"mag","flags":"|"},{"name":"b'K'","value":7.197,"error":0.036,"error_max":null,"error_min":null,"bibcode":"2006AJ....131.1163S","quality":"C","system":"Vega","unit":"mag","flags":"|"},{"name":"b'u'","value":13.853,"error":0.004,"error_max":null,"error_min":null,"bibcode":"2011yCat.2306....0A","quality":"C","system":"AB","unit":"mag","flags":"|"},{"name":"b'g'","value":12.028,"error":0.002,"error_max":null,"error_min":null,"bibcode":"2011yCat.2306....0A","quality":"C","system":"AB","unit":"mag","flags":"|"},{"name":"b'r'","value":11.14,"error":0.001,"error_max":null,"error_min":null,"bibcode":"2011yCat.2306....0A","quality":"C","system":"AB","unit":"mag","flags":"|"},{"name":"b'i'","value":10.671,"error":0.001,"error_max":null,"error_min":null,"bibcode":"2011yCat.2306....0A","quality":"C","system":"AB","unit":"mag","flags":"|"},{"name":"b'z'","value":10.339,"error":0.002,"error_max":null,"error_min":null,"bibcode":"2011yCat.2306....0A","quality":"C","system":"AB","unit":"mag","flags":"|"}],"planets":[],"astronomer_telegrams":[6634]}
onekiloparsec commented 6 years ago

Hi. Well, not everywhere, but this particular case indeed, has lot of null values.

Two reasons for this. First, the fields shown are all fields associated with the model. There are many, and I intend to have a maximum of them.

Second, we fill these fields only with one source: CDS Simbad. It's on the pipe to also use NED.

Does it answer your question / concern ?

P.S. One strange thing for NGC 772 is the missing ICRS_coordinates though. It's a bug, I'll check.

onekiloparsec commented 6 years ago

Could you also tell us how did you requested the API ? curl or something else ? Or our just-released arcsecond cli already ? (pip install arcsecond)

onekiloparsec commented 6 years ago

After investigation, it seemed to be a problem associated with the CLI. I just published a bugfixed version (0.2.0). Please, try it out.

lusiaold commented 6 years ago

Hello, thank you for the response. I'm requesting the API using ReactJS' fetch function. Unfortunately, the API still isn't working - it still returns null for coordinates (and some other things as well) - here's another example:

{"name":"NGC 7301","ICRS_coordinates":null,"ecliptic_coordinates":null,"galactic_coordinates":null,"spectral_type":null,"morphological_type":null,"proper_motion":null,"parallax":null,"radial_velocity":null,"age":null,"mass":null,"radius":null,"distance":null,"metallicity":null,"effective_temperature":null,"aliases":[{"name":"[CHM2007] LDC 1525 J223034.73-1734254","catalogue_url":"http://vizier.u-strasbg.fr/viz-bin/VizieR-S?%5BCHM2007%5D%20LDC%201525%20J223034.73-1734254"},{"name":"[CHM2007] HDC 1195 J223034.73-1734254","catalogue_url":"http://vizier.u-strasbg.fr/viz-bin/VizieR-S?%5BCHM2007%5D%20HDC%201195%20J223034.73-1734254"},{"name":"VV  372","catalogue_url":"http://vizier.u-strasbg.fr/viz-bin/VizieR-S?VV%20%20372"},{"name":"SGC 222753-1749.8","catalogue_url":"http://vizier.u-strasbg.fr/viz-bin/VizieR-S?SGC%20222753-1749.8"},{"name":"PSCz Q22278-1749","catalogue_url":"http://vizier.u-strasbg.fr/viz-bin/VizieR-S?PSCz%20Q22278-1749"},{"name":"NVSS J223034-173423","catalogue_url":"http://vizier.u-strasbg.fr/viz-bin/VizieR-S?NVSS%20J223034-173423"},{"name":"MCG-03-57-015","catalogue_url":"http://vizier.u-strasbg.fr/viz-bin/VizieR-S?MCG-03-57-015"},{"name":"2MASX J22303473-1734254","catalogue_url":"http://vizier.u-strasbg.fr/viz-bin/VizieR-S?2MASX%20J22303473-1734254"},{"name":"LEDA   69021","catalogue_url":"http://vizier.u-strasbg.fr/viz-bin/VizieR-S?LEDA%20%20%2069021"},{"name":"IRAS 22278-1749","catalogue_url":"http://vizier.u-strasbg.fr/viz-bin/VizieR-S?IRAS%2022278-1749"},{"name":"GSC 06388-00018","catalogue_url":"http://vizier.u-strasbg.fr/viz-bin/VizieR-S?GSC%2006388-00018"},{"name":"ESO-LV 602-0230","catalogue_url":"http://vizier.u-strasbg.fr/viz-bin/VizieR-S?ESO-LV%20602-0230"},{"name":"ESO 602-23","catalogue_url":"http://vizier.u-strasbg.fr/viz-bin/VizieR-S?ESO%20602-23"},{"name":"6dFGS gJ223034.7-173426","catalogue_url":"http://vizier.u-strasbg.fr/viz-bin/VizieR-S?6dFGS%20gJ223034.7-173426"},{"name":"NGC  7301","catalogue_url":"http://vizier.u-strasbg.fr/viz-bin/VizieR-S?NGC%20%207301"}],"object_types":["*","EmG","G","GiG","IG","IR","Rad"],"fluxes":[{"name":"b'B'","value":14.13,"error":null,"error_max":null,"error_min":null,"bibcode":"1989ESOLV.C......0L","quality":"C","system":"Vega","unit":"mag","flags":"|"},{"name":"b'R'","value":13.1,"error":null,"error_max":null,"error_min":null,"bibcode":"1989ESOLV.C......0L","quality":"C","system":"Vega","unit":"mag","flags":"|"},{"name":"b'J'","value":11.685,"error":0.027,"error_max":null,"error_min":null,"bibcode":"2006AJ....131.1163S","quality":"C","system":"Vega","unit":"mag","flags":"|"},{"name":"b'H'","value":11.039,"error":0.037,"error_max":null,"error_min":null,"bibcode":"2006AJ....131.1163S","quality":"C","system":"Vega","unit":"mag","flags":"|"},{"name":"b'K'","value":10.678,"error":0.05,"error_max":null,"error_min":null,"bibcode":"2006AJ....131.1163S","quality":"C","system":"Vega","unit":"mag","flags":"|"}],"planets":[],"astronomer_telegrams":[]}
onekiloparsec commented 6 years ago

After struggling with logging in production, I've discovered the cause of the problem. An hypothesis I was making about how relationships are set between models upon creation is no longer valid. Maybe due to the upgrade to Django 2.1. But this was silent... Anyway, this is now fixed. I let you close this, if you find it fixed too.

lusiaold commented 6 years ago

Great, it's working now, thank you! 😃👍