[AstroPy] Some Feedbacks about Astropy

Erik Tollerud erik.tollerud at gmail.com
Fri Jul 11 17:10:35 EDT 2014


Oh, and there's an issue
(https://github.com/astropy/astropy/issues/1846) to add the mode of
"everything within x arcmin" - it's pretty straightforward to
implement from the existing matching stuff, it just needs someone to
take the time to work out the details... (SciPy sprint, perhaps, if
anyone has some remaining time?)

On Fri, Jul 11, 2014 at 5:05 PM, Erik Tollerud <erik.tollerud at gmail.com> wrote:
>> 2. Though there's astropy.coordinates.matching.match_coordinates_sky to cross-correlate two catalogs, it doesn't allow user to specify matching radius and matching mode (e.g., one-one match). I've made a function to do so, and hope similar function can be included in astropy (https://github.com/Guang91/Astronomers_Tool_Box/blob/master/my_srcor.py).
>
> The idea is to use it like this (this is astropy 0.4 syntax - for
> astropy 0.3 it's similar, but replace SkyCoord with `ICRS` or whatever
> class makes sense for your coordinates):
>
> catalog = SkyCoord(ra_cat*u.deg, dec_cat*u.deg, frame='icrs')
> coordstomatch = SkyCoord(ra*u.deg, dec*u.deg, frame='icrs')
>
> idx, d2d, d3d = coordstomatch.match_to_catalog_sky(catalog)
>
> coordinateswithmatches = coordstomatch[d2d < 3*u.arcmin]
> catalogwithmatches = catalog[idx[d2d < 3*u.arcmin]]
>
>
> As for the "matching mode", the idea is that there are a lot of
> different "modes" people use, and match_to_catalog_sky (or
> match_to_catalog_3d) along with the `nthneighbor` argument should be
> flexible enough to take care of most of them.  Can you be more
> specific about exactly what sort of mode you think is missing?
>
>
> This was not too thoroughly documented before v0.4 (the version about
> to be release), but there's a lot more there in v0.4. See
> http://devdocs.astropy.org/coordinates/matchsep.html#matching-catalogs
> (that's the developer documentation, but this will become
> http://docs.astropy.org/en/stable/coordinates/matchsep.html#matching-catalogs
> when 0.4 is released).
>
>
>
> --
> Erik T



-- 
Erik T



More information about the AstroPy mailing list