<div dir="ltr">Thanks so much for your response Eric, yes this helps tremendously!<div><br></div><div>I did some additional filtering and formatting (to enable direct comparison of returned results with a star map on the phone), and they match up nicely. </div><div>However, as can be seen below, some rows are without names - this is expected? </div><div><br></div><div>from astroquery.vizier import Vizier<br>import astropy.units as u<br>v = Vizier(columns=['Name','_RAJ2000', '_DEJ2000', 'Vmag'],column_filters={"Vmag":"<8"})<br>result = v.query_region("rigel", radius="02d00m00s", catalog="V/50")<br>for table_name in result.keys():<br>    table = result[table_name]<br>    table['_RAJ2000'] = table['_RAJ2000'].to(u.hourangle)<br>    table['_RAJ2000'].info.format = '10.3f'<br>    print(table)<br></div><div><br></div><div>Name    _RAJ2000   _DEJ2000   Vmag<br>                hourangle     deg      mag<br>--------- ---------- ---------- -----<br>               5.139  -8.665000  5.78<br>69Lam Eri      5.152  -8.754167  4.27<br>               5.226  -8.147778  6.37<br>19Bet Ori      5.242  -8.201667  0.12<br>20Tau Ori      5.293  -6.844444  3.60<br></div><div><br></div><div>Also, presumably another Vizier DB contains a mapping of 'common name' (where one exists) to the Bayer name? I tried for example the online form for IV/22 "Common Name Cross Index" and although for our first example it found 'BET CEN' when given the RA and Dec of Hadar, it did not return anything in the 'name' field (where I'd expected 'Hadar' to appear):</div><div><br></div>
        
        
        



<table cellspacing="0" border="0" style="font-family:"Liberation Sans";font-size:x-small">
        <colgroup span="5" width="85"></colgroup>
        <tbody><tr>
                <td height="32" align="center" style="font-family:"Liberation Sans""><b><font face="Liberation Serif" size="1"><a>RAJ2000</a><br><a>"h:m:s"</a></font></b></td>
                <td align="center" style="font-family:"Liberation Sans""><b><font face="Liberation Serif"><a>DEJ2000</a><br><a>"d:m:s"</a></font></b></td>
                <td align="center" style="font-family:"Liberation Sans""><b><font face="Liberation Serif"><a>Vmag</a><br><a>mag</a></font></b></td>
                <td align="center" style="font-family:"Liberation Sans""><font face="Liberation Serif"><a>BFno</a></font></td>
                <td align="center" style="font-family:"Liberation Sans""><font face="Liberation Serif"><a>name</a></font></td>
        </tr>
        <tr>
                <td height="17" align="right" style="font-family:"Liberation Sans""><font face="Liberation Serif">14 03 49.408</font></td>
                <td align="right" style="font-family:"Liberation Sans""><font face="Liberation Serif">-60 22 22.79</font></td>
                <td align="right" style="font-family:"Liberation Sans""><font face="Liberation Serif">0.61</font></td>
                <td align="left" style="font-family:"Liberation Sans""><font face="Liberation Serif">        BET CEN</font></td>
                <td align="left" style="font-family:"Liberation Sans""><font face="Liberation Serif"> </font></td>
        </tr>
</tbody></table><br><div> </div><div>Regards,</div><div>Jim</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Apr 3, 2021 at 5:26 AM Eric Jensen <<a href="mailto:ejensen1@swarthmore.edu">ejensen1@swarthmore.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;">Hi Jim, <div><br></div><div>If you’re primarily interested in bright stars, and in names of objects, then the VO search probably isn’t the best bet.  As you’ve found, it has lots of objects, and no common names for them. </div><div><br></div><div>I’d suggest querying one of the catalogs from Vizier (<a href="https://vizier.u-strasbg.fr/viz-bin/VizieR" target="_blank">https://vizier.u-strasbg.fr/viz-bin/VizieR</a>), for example the Bright Star Catalogue.  </div><div><br></div><div>Here’s a query that will do a 2-degree-radius search around Hadar for stars brighter than V=6:</div><div><br></div><div><div><font face="Menlo">from astroquery.vizier import Vizier</font></div><div><font face="Menlo">result = Vizier.query_region("Hadar", radius="02d00m00s", </font></div><div><font face="Menlo">                             catalog=‘V/50',</font></div><div><font face="Menlo">                             column_filters={"Vmag":"<6"})</font></div><div><font face="Menlo">print(result[0])</font></div><div><br></div><div>which prints: </div><div><br></div><div><pre> HR    Name    HD   ADS  VarID   RAJ2000    DEJ2000   Vmag  B-V  SpType NoteFlag
                                 "h:m:s"    "d:m:s"   mag   mag                 
---- ------- ------ --- ------- ---------- --------- ----- ----- ------ --------
5267 Bet Cen 122451     Bet Cen 14 03 49.4 -60 22 23  0.61 -0.23  B1III        *</pre><div><br></div></div><div>The reason you have to use ‘print(result[0])’ rather than just ‘print(result)’ is that the query returns a *list* of tables, though in this case the list only has one element.  The string ‘V/50’ is the Vizier code for the Yale Bright Star Catalogue.  You can find other suitable catalogs to query by searching Vizier and noting down the code, typically a Roman numeral followed by some digits.  Each catalog will have different column names, so you may have to adapt your ‘column_filters’ argument above to the names of columns actually present in the catalog, or it won’t have any effect. </div><div><br></div><div>Hope this helps, </div><div><br></div><div>Eric</div><div><br><blockquote type="cite"><div>On Apr 2, 2021, at 1:23 AM, Jim Singh <<a href="mailto:jimmyboysingh@gmail.com" target="_blank">jimmyboysingh@gmail.com</a>> wrote:</div><br><div><div dir="ltr">Hi,<div>I am a beginner astropy user. What I'd like to be able to do is obtain the names and RA and Dec of all objects above a certain Magnitude, within a given angular FOV centered on a given named object. If I try this for example...</div><div><br></div><div>from astropy.coordinates import SkyCoord<br>from astroquery.vo_conesearch import ConeSearch<br>c = SkyCoord.from_name('hadar')<br>print(c)<br>result = ConeSearch.query_region(c, '0.1 deg')<br>result.sort('Mag')<br>print(result)<br></div><div><br></div><div>...I get 2670 rows back. Assuming this is the right basic approach to begin with, is there any way to constrain the search to just those rows with 'Mag'>8 for instance? Only a handful of records would qualify in this case. My typical search radius would be a couple of degrees, so if the query were to return everything like above, it would take forever to execute. Also, how to get the name of each qualifying object? Would it entail a separate lookup on the column 'objID'?</div><div><br></div><div>Thanks for your help!</div><div><br></div><div>Regards,<br></div><div>Jim</div></div>
_______________________________________________<br>AstroPy mailing list<br><a href="mailto:AstroPy@python.org" target="_blank">AstroPy@python.org</a><br><a href="https://mail.python.org/mailman/listinfo/astropy" target="_blank">https://mail.python.org/mailman/listinfo/astropy</a><br></div></blockquote></div><br></div></div>_______________________________________________<br>
AstroPy mailing list<br>
<a href="mailto:AstroPy@python.org" target="_blank">AstroPy@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/astropy" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/astropy</a><br>
</blockquote></div>