<div dir="ltr">Thanks Eric!<br>What you suggest is certainly an option, but in the first instance I wanted to see if I could get away without having to download and store any reference data locally. Also, do not RA/Dec values drift over time, so real-time DB access assures the latest for one's plots?<br><br><div>Noticed the following query from SIMBAD seems to return rows for all 110 Messier objects and executes fast, so I suppose I can now apply the last couple of steps you mention:<span class="gmail-im" style="color:rgb(80,0,80)"><br><i>- use astropy coordinate routines to calculate angular distance from your field center to each object in the table<br>- apply a filter to keep only those objects within a given angular distance </i><br></span></div><div><br></div><div>result_table = Simbad.query_object("m *",wildcard=True)<br>print(result_table)</div><div><pre style="line-height:18px;overflow:auto hidden;clear:both;padding:8.5px;border-radius:3px;margin-top:0px;margin-bottom:0px;border:1px solid rgba(0,0,0,0.12);background-color:rgb(248,248,248);color:rgb(64,64,64);font-size:13px"> MAIN_ID        RA           DEC      ... COO_WAVELENGTH     COO_BIBCODE    <br>             "h:m:s"       "d:m:s"    ...                                   <br>--------- ------------- ------------- ... -------------- -------------------<br>    M   1   05 34 31.94   +22 00 52.2 ...              R 2011A&A...533A..10L<br>    M   2   21 33 27.02   -00 49 23.7 ...              O 2010AJ....140.1830G<br>    M   3   13 42 11.62   +28 22 38.2 ...              O 2010AJ....140.1830G<br>    M   4   16 23 35.22   -26 31 32.7 ...              O 2010AJ....140.1830G<br>    M   5   15 18 33.22   +02 04 51.7 ...              O 2010AJ....140.1830G<br>NGC  6405      17 40 20      -32 15.2 ...              O 2009MNRAS.399.2146W<br>NGC  6475      17 53 51      -34 47.6 ...              O 2009MNRAS.399.2146W<br>    M   8      18 03 37      -24 23.2 ...                                   <br>    M   9   17 19 11.78   -18 30 58.5 ...                2002MNRAS.332..441F<br>    M  10   16 57 09.05   -04 06 01.1 ...              O 2010AJ....140.1830G<br>      ...           ...           ... ...            ...                 ...<br>    M 101  14 03 12.583  +54 20 55.50 ...              I 2006AJ....131.1163S<br>    M 102  15 06 29.561  +55 45 47.91 ...              I 2006AJ....131.1163S<br>    M 103      01 33 23      +60 39.0 ...              O 2009MNRAS.399.2146W<br>    M 104 12 39 59.4318 -11 37 22.995 ...              R 2004AJ....127.3587F<br>    M 105  10 47 49.600  +12 34 53.87 ...              I 2006AJ....131.1163S<br>    M 106  12 18 57.620  +47 18 13.39 ...              I 2006AJ....131.1163S<br>    M 107   16 32 31.86   -13 03 13.6 ...              O 2010AJ....140.1830G<br>    M 108  11 11 30.967  +55 40 26.84 ...              I 2006AJ....131.1163S<br>    M 109  11 57 35.984  +53 22 28.27 ...              I 2006AJ....131.1163S<br>    M 110 00 40 22.0544 +41 41 07.496 ...              O 2018yCat.1345....0G<br>Length = 110 rows<br></pre></div><div><br></div><div>Regards,</div><div>Jim</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Apr 12, 2021 at 12:41 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">Hi Jim,<br>
<br>
The total number of Messier objects is small, so I think you might just want to download and store locally a table of their coordinates and properties (e.g. in a spreadsheet) that you could read into your code each time.  Then in your Python code you could do something like this:<br>
<br>
- read spreadsheet to pandas data frame (pandas.read_excel)<br>
- convert to astropy table (Table.from_pandas)<br>
- use astropy coordinate routines to calculate angular distance from your field center to each object in the table <br>
- apply a filter to keep only those objects within a given angular distance. <br>
<br>
This would have the advantage that you could edit that Messier list to tweak it however you wanted, e.g. to combine columns from different sources if one has coords and another has magnitudes. <br>
<br>
If you can’t find a suitable Messier list, you could even write a one-time routine to loop over Simbad calls to build and store it, but I bet you can find most/all of what you need already formatted somewhere. <br>
<br>
Astropy docs will help you with specific syntax, but this should get you started. <br>
<br>
Eric<br>
<br>
<br>
> On Apr 11, 2021, at 9:08 AM, Jim Singh <<a href="mailto:jimmyboysingh@gmail.com" target="_blank">jimmyboysingh@gmail.com</a>> wrote:<br>
> <br>
> <br>
> Hi, I've put together a sky simulation using mathplotlib to display and name the bright stars (size based on magnitude) within a certain radius of a given planet. I convert the RA/Dec of each object to Alt/Az based on my location and current time, and then flip the Az axis so that the field plot matches the sky through my finderscope. What I'd like to finally do is include and label any Messier catalog object in the same FOV of the plot.    <br>
> So is there an online catalog you would suggest that can be queried by region to return the following for objects in said region: <br>
> -Messier Number<br>
> -Apparent Magnitude (preferable but not essential)<br>
> -RA/Dec<br>
> I see SIMBAD supports  query for a specified Messier object like this:<br>
> result_table = Simbad.query_object("m83")<br>
> and there's also Simbad.query_region and Simbad.query_criteria<br>
> but I am not sure how they might be used for the stated objective (if at all)?<br>
> Regards,<br>
> Jim<br>
> <br>
> _______________________________________________<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>
_______________________________________________<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>