These are chat archives for astropy/astropy

7th
Aug 2014
Adam Ginsburg
@keflavich
Aug 07 2014 07:11
I need to run doctests that are marked as 'skip' - any good way to do that (or, just as good, extract the doctests from files into their own)?
David Pérez-Suárez
@dpshelio
Aug 07 2014 07:35
@keflavich isn't py.test -k skyp do that?
I'm not sure if that run the doctests
Adam Ginsburg
@keflavich
Aug 07 2014 15:42
@dpshelio - thanks, I'll try it
Erik Tollerud
@eteq
Aug 07 2014 18:55
@keflavich - if you want the auto-building feature in setup.py, you can also use python setup.py test --args="-k skip"
Erik Tollerud
@eteq
Aug 07 2014 19:17
Also see #2833, @keflavich
Brigitta Sipocz
@bsipocz
Aug 07 2014 19:58
I have a question to coordinates/wcs experts:
I try to convert the world coordinates to pixel coordinates, where the world coordinates of objects are sourced from a simbad query. The query returns the 'RA' and 'DEC' columns as dtype('S13') and apparently wcs_world2pix returns with a TypeError.
What is the easy was to covert the 'S13' coordinates to a float format? (Simbad.query_region to return them in float, or wcs_world2pix to accept strings?)
Erik Tollerud
@eteq
Aug 07 2014 20:56
@bsipocz - two possibilities come to mind to me:
  1. Use the from_name method of SkyCoord to do the SIMBAD query. that will give SkyCoord objects (which allow coord.ra.deg)
  2. Use astropy.coordinates.Angle to translate the string representation into a decimal degree. E.g., Angle(simbadstring).deg (you may need to give a unit as the second argument to Angle if the SIMBAD output is ambiguous)
Brigitta Sipocz
@bsipocz
Aug 07 2014 22:12
Thanks @eteq, I'm checking those. It also seems like the coordinates package changed a lot in the last 2 months...
e.g. it used to work with SkyCoord('8 00 00 -5 00 ', unit=(u.hour, u.deg)), but now it doesn't recognizes the spaces only the colons as separatorsSkyCoord('8:00:00 -5:00 ', unit=(u.hour, u.deg))
Brigitta Sipocz
@bsipocz
Aug 07 2014 23:12
@eteq: 1) is not working when a list of object within a region is required
2) almost works but I end up running into a bug that is somewhat related to the previously mentioned broken case when a coordinate has less than 3 values.