Skip to content

Commit

Permalink
Make FITS LLWCS return tuples not lists
Browse files Browse the repository at this point in the history
  • Loading branch information
Cadair committed Nov 25, 2019
1 parent 787ca7a commit b60f8b2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions astropy/wcs/wcsapi/fitswcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,15 +247,15 @@ def axis_correlation_matrix(self):

def pixel_to_world_values(self, *pixel_arrays):
world = self.all_pix2world(*pixel_arrays, 0)
return world[0] if self.world_n_dim == 1 else world
return world[0] if self.world_n_dim == 1 else tuple(world)

def array_index_to_world_values(self, *indices):
world = self.all_pix2world(*indices[::-1], 0)
return world[0] if self.world_n_dim == 1 else world
return world[0] if self.world_n_dim == 1 else tuple(world)

def world_to_pixel_values(self, *world_arrays):
pixel = self.all_world2pix(*world_arrays, 0)
return pixel[0] if self.pixel_n_dim == 1 else pixel
return pixel[0] if self.pixel_n_dim == 1 else tuple(pixel)

def world_to_array_index_values(self, *world_arrays):
pixel_arrays = self.all_world2pix(*world_arrays, 0)[::-1]
Expand Down

0 comments on commit b60f8b2

Please sign in to comment.