<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Jim, <div class=""><br class=""></div><div class="">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 class=""><br class=""></div><div class="">I’d suggest querying one of the catalogs from Vizier (<a href="https://vizier.u-strasbg.fr/viz-bin/VizieR" class="">https://vizier.u-strasbg.fr/viz-bin/VizieR</a>), for example the Bright Star Catalogue.  </div><div class=""><br class=""></div><div class="">Here’s a query that will do a 2-degree-radius search around Hadar for stars brighter than V=6:</div><div class=""><br class=""></div><div class=""><div class=""><font face="Menlo" class="">from astroquery.vizier import Vizier</font></div><div class=""><font face="Menlo" class="">result = Vizier.query_region("Hadar", radius="02d00m00s", </font></div><div class=""><font face="Menlo" class="">                             catalog=‘V/50',</font></div><div class=""><font face="Menlo" class="">                             column_filters={"Vmag":"<6"})</font></div><div class=""><font face="Menlo" class="">print(result[0])</font></div><div class=""><br class=""></div><div class="">which prints: </div><div class=""><br class=""></div><div class=""><pre class=""> 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 class=""><br class=""></div></div><div class="">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 class=""><br class=""></div><div class="">Hope this helps, </div><div class=""><br class=""></div><div class="">Eric</div><div><br class=""><blockquote type="cite" class=""><div class="">On Apr 2, 2021, at 1:23 AM, Jim Singh <<a href="mailto:jimmyboysingh@gmail.com" class="">jimmyboysingh@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hi,<div class="">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 class=""><br class=""></div><div class="">from astropy.coordinates import SkyCoord<br class="">from astroquery.vo_conesearch import ConeSearch<br class="">c = SkyCoord.from_name('hadar')<br class="">print(c)<br class="">result = ConeSearch.query_region(c, '0.1 deg')<br class="">result.sort('Mag')<br class="">print(result)<br class=""></div><div class=""><br class=""></div><div class="">...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 class=""><br class=""></div><div class="">Thanks for your help!</div><div class=""><br class=""></div><div class="">Regards,<br class=""></div><div class="">Jim</div></div>
_______________________________________________<br class="">AstroPy mailing list<br class=""><a href="mailto:AstroPy@python.org" class="">AstroPy@python.org</a><br class="">https://mail.python.org/mailman/listinfo/astropy<br class=""></div></blockquote></div><br class=""></div></body></html>