Package sabx10 :: Package profiles :: Module profiles
[hide private]
[frames] | no frames]

Module profiles

source code

Co-ordinate the generation of profiles for a rideset.

Classes [hide private]
  Annotation
Hold all information necessary for a profile annotation.
Functions [hide private]
float
_calc_elevation(ele)
Convert an elevation from meters to feet.
source code
(list of float,list of float)
_process_points(points, length)
For a list of points representing a line, generate lists of the elevations and distances along the line for each point.
source code
 
_process_segs(plotter, segs)
Plot a large and a small profile for each segment in a list.
source code
list of Annotation objects
_process_annotations(segs)
Generate the annotations for a list of segments.
source code
 
_process_ride(plotter, ride)
Generate the large and small profiles for a ride.
source code
 
plot_all_rides(xml_tree, graph_filebase, graph_dir, hires, segs)
Generate profiles for all the rides in a rideset, and all the rides' segments as well (if asked).
source code
Variables [hide private]
  __package__ = 'sabx10.profiles'
Function Details [hide private]

_calc_elevation(ele)

source code 

Convert an elevation from meters to feet.

Parameters:
  • ele (float) - elevation to convert
Returns: float
elevation in feet

_process_points(points, length)

source code 

For a list of points representing a line, generate lists of the elevations and distances along the line for each point.

Parameters:
  • points (list of Point) - points to process
  • length (float) - length of line the points represent
Returns: (list of float,list of float)
distances list, elevations list

_process_segs(plotter, segs)

source code 

Plot a large and a small profile for each segment in a list. These profiles are not annotated.

Parameters:

_process_annotations(segs)

source code 

Generate the annotations for a list of segments.

Parameters:
Returns: list of Annotation objects
list of Annotation objects

_process_ride(plotter, ride)

source code 

Generate the large and small profiles for a ride. Large ride profiles include annotations.

Parameters:

plot_all_rides(xml_tree, graph_filebase, graph_dir, hires, segs)

source code 

Generate profiles for all the rides in a rideset, and all the rides' segments as well (if asked).

Parameters:
  • xml_tree (ElementTree stuff) - ElementTree representation of a rideset
  • graph_filebase (string) - base filename for profile plots
  • graph_dir (string) - directory to place profile plots into
  • hires (boolean) - high resolution?
  • segs (boolean) - plot segments?