[AstroPy] Query for Messier objects in a given region

Jim Singh jimmyboysingh at gmail.com
Sun Apr 11 20:22:24 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)



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/d2884860/attachment.html>


More information about the AstroPy mailing list