[AstroPy] Query for Messier objects in a given region
Jim Singh
jimmyboysingh at gmail.com
Sun Apr 11 20:24:43 EDT 2021
Thanks Eric!
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?
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:
*- use astropy coordinate routines to calculate angular distance from your
field center to each object in the table- apply a filter to keep only those
objects within a given angular distance *
result_table = Simbad.query_object("m *",wildcard=True)
print(result_table)
MAIN_ID RA DEC ... COO_WAVELENGTH COO_BIBCODE
"h:m:s" "d:m:s" ...
--------- ------------- ------------- ... -------------- -------------------
M 1 05 34 31.94 +22 00 52.2 ... R 2011A&A...533A..10L
M 2 21 33 27.02 -00 49 23.7 ... O 2010AJ....140.1830G
M 3 13 42 11.62 +28 22 38.2 ... O 2010AJ....140.1830G
M 4 16 23 35.22 -26 31 32.7 ... O 2010AJ....140.1830G
M 5 15 18 33.22 +02 04 51.7 ... O 2010AJ....140.1830G
NGC 6405 17 40 20 -32 15.2 ... O 2009MNRAS.399.2146W
NGC 6475 17 53 51 -34 47.6 ... O 2009MNRAS.399.2146W
M 8 18 03 37 -24 23.2 ...
M 9 17 19 11.78 -18 30 58.5 ... 2002MNRAS.332..441F
M 10 16 57 09.05 -04 06 01.1 ... O 2010AJ....140.1830G
... ... ... ... ... ...
M 101 14 03 12.583 +54 20 55.50 ... I 2006AJ....131.1163S
M 102 15 06 29.561 +55 45 47.91 ... I 2006AJ....131.1163S
M 103 01 33 23 +60 39.0 ... O 2009MNRAS.399.2146W
M 104 12 39 59.4318 -11 37 22.995 ... R 2004AJ....127.3587F
M 105 10 47 49.600 +12 34 53.87 ... I 2006AJ....131.1163S
M 106 12 18 57.620 +47 18 13.39 ... I 2006AJ....131.1163S
M 107 16 32 31.86 -13 03 13.6 ... O 2010AJ....140.1830G
M 108 11 11 30.967 +55 40 26.84 ... I 2006AJ....131.1163S
M 109 11 57 35.984 +53 22 28.27 ... I 2006AJ....131.1163S
M 110 00 40 22.0544 +41 41 07.496 ... O 2018yCat.1345....0G
Length = 110 rows
Regards,
Jim
On Mon, Apr 12, 2021 at 12:41 AM Eric Jensen <ejensen1 at swarthmore.edu>
wrote:
> Hi Jim,
>
> 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:
>
> - read spreadsheet to pandas data frame (pandas.read_excel)
> - convert to astropy table (Table.from_pandas)
> - use astropy coordinate routines to calculate angular distance from your
> field center to each object in the table
> - apply a filter to keep only those objects within a given angular
> distance.
>
> 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.
>
> 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.
>
> Astropy docs will help you with specific syntax, but this should get you
> started.
>
> Eric
>
>
> > On Apr 11, 2021, at 9:08 AM, Jim Singh <jimmyboysingh at gmail.com> wrote:
> >
> >
> > 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.
>
> > So is there an online catalog you would suggest that can be queried by
> region to return the following for objects in said region:
> > -Messier Number
> > -Apparent Magnitude (preferable but not essential)
> > -RA/Dec
> > I see SIMBAD supports query for a specified Messier object like this:
> > result_table = Simbad.query_object("m83")
> > and there's also Simbad.query_region and Simbad.query_criteria
> > but I am not sure how they might be used for the stated objective (if at
> all)?
> > Regards,
> > Jim
> >
> > _______________________________________________
> > AstroPy mailing list
> > AstroPy at python.org
> > https://mail.python.org/mailman/listinfo/astropy
> _______________________________________________
> AstroPy mailing list
> AstroPy at python.org
> https://mail.python.org/mailman/listinfo/astropy
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.python.org/pipermail/astropy/attachments/20210412/4e5b282e/attachment-0001.html>
More information about the AstroPy
mailing list