Skip to content

Commit

Permalink
Adjusting set_xy inside the RingCenterFlex
Browse files Browse the repository at this point in the history
  • Loading branch information
castelao committed May 15, 2013
1 parent 97a6224 commit eea82a0
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions rings/ring.py
Expand Up @@ -183,8 +183,8 @@ def __init__(self, input, metadata={}, auto=True, **keywords):
self.name = 'RingCenterFlex'

if auto == True:
#self.set_xy()
self.set_t()
self.set_xy()

self.findcenter()
#self.data['Lon_c'], self.data['Lat_c'] = xy2lonlat(self.data['xc'],
Expand Down Expand Up @@ -247,12 +247,11 @@ def set_xy(self):
Most of the procedures are based on cartesian distances. This
function define x and y distance from lat_ref, lon_ref.
"""
if ('x' in self.input) & ('y' in self.input):
self.data['x'] = self.input['x']
self.data['y'] = self.input['y']
print "It will be used the x and y given as input"

else:
if ('x' not in self.input) & ('y' not in self.input) & \
('Lat' in self.input) & ('Lon' in self.input):
#self.data['x'] = self.input['x']
#self.data['y'] = self.input['y']
#print "It will be used the x and y given as input"
self.data['x'], self.data['y'] = lonlat2xy(self.input['Lon'],
self.input['Lat'], lat_0=self.lat_ref, lon_0=self.lon_ref)

Expand Down

0 comments on commit eea82a0

Please sign in to comment.