Skip to content
Snippets Groups Projects
Commit df485f35 authored by Lionel GUEZ's avatar Lionel GUEZ
Browse files

Use fewer variables

Rename `first_SHPC` and `last_SHPC` to `i_SHPC`. Rename `first_loc`
and `last_loc` to ishape.
parent 19c4ae28
No related branches found
No related tags found
No related merge requests found
...@@ -147,20 +147,18 @@ for n in g.vertices(): ...@@ -147,20 +147,18 @@ for n in g.vertices():
# position of the extremum and store it in a vertex property: # position of the extremum and store it in a vertex property:
date_index, eddy_index = report_graph.node_to_date_eddy(segment[0], date_index, eddy_index = report_graph.node_to_date_eddy(segment[0],
e_overestim) e_overestim)
first_SHPC = get_SHPC(array_d_init, date_index) i_SHPC = get_SHPC(array_d_init, date_index)
first_loc = util_eddies.comp_ishape(handlers[first_SHPC], date_index, ishape = util_eddies.comp_ishape(handlers[i_SHPC], date_index, eddy_index)
eddy_index) g.vp.pos_first[n] = handlers[i_SHPC]["readers"]["extremum"].shape(ishape)\
g.vp.pos_first[n] = handlers[first_SHPC]["readers"]["extremum"]\ .points[0] # [in degrees]
.shape(first_loc).points[0] # [in degrees]
# Same for last instantaneous eddy in the segment: # Same for last instantaneous eddy in the segment:
date_index, eddy_index = report_graph.node_to_date_eddy(segment[-1], date_index, eddy_index = report_graph.node_to_date_eddy(segment[-1],
e_overestim) e_overestim)
last_SHPC = get_SHPC(array_d_init, date_index) i_SHPC = get_SHPC(array_d_init, date_index)
last_loc = util_eddies.comp_ishape(handlers[last_SHPC], date_index, ishape = util_eddies.comp_ishape(handlers[i_SHPC], date_index, eddy_index)
eddy_index) g.vp.pos_last[n] = handlers[i_SHPC]["readers"]["extremum"].shape(ishape)\
g.vp.pos_last[n] = handlers[last_SHPC]["readers"]["extremum"]\ .points[0] # [in degrees]
.shape(last_loc).points[0] # [in degrees]
if (num_of_days > num_of_days_to_avg): if (num_of_days > num_of_days_to_avg):
# The segment is longer than the number of days over which to average # The segment is longer than the number of days over which to average
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment