Skip to content

Commit

Permalink
Merge pull request #172 from Cadair/base_cf_quantity
Browse files Browse the repository at this point in the history
Ensure coordinate_to_quantity works for the base frame
  • Loading branch information
nden authored Nov 7, 2018
2 parents 9c7d371 + ff8ecdf commit 0c423ce
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gwcs/coordinate_frames.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,9 @@ def axes_type(self):

def coordinates(self, *args):
""" Create world coordinates object"""
raise NotImplementedError("Subclasses may implement this")
args = [args[i] for i in self.axes_order]
coo = tuple([arg * un if not hasattr(arg, "to") else arg.to(un) for arg, un in zip(args, self.unit)])
return coo

def coordinate_to_quantity(self, *coords):
"""
Expand Down

0 comments on commit 0c423ce

Please sign in to comment.