def set_track_heights(self):
    ' set_track_heights(self)\n\n            Since tracks may not be of identical heights, the bottom and top\n            radius for each track is stored in a dictionary - self.track_radii,\n            keyed by track number\n        '
    top_track = max(self.drawn_tracks)
    trackunit_sum = 0
    trackunits = {}
    heightholder = 0
    for track in range(1, (top_track + 1)):
        try:
            trackheight = self._parent[track].height
        except:
            trackheight = 1
        trackunit_sum += trackheight
        trackunits[track] = (heightholder, (heightholder + trackheight))
        heightholder += trackheight
    trackunit_height = ((0.5 * min(self.pagewidth, self.pageheight)) / trackunit_sum)
    self.track_radii = {}
    track_crop = ((trackunit_height * (1 - self.track_size)) / 2.0)
    for track in trackunits:
        top = ((trackunits[track][1] * trackunit_height) - track_crop)
        btm = ((trackunits[track][0] * trackunit_height) + track_crop)
        ctr = (btm + ((top - btm) / 2.0))
        self.track_radii[track] = (btm, ctr, top)
set_track_heights(self)

Since tracks may not be of identical heights, the bottom and top
radius for each track is stored in a dictionary - self.track_radii,
keyed by track number
def set_track_heights(self):
    ' set_track_heights(self)\n\n            Since tracks may not be of identical heights, the bottom and top\n            radius for each track is stored in a dictionary - self.track_radii,\n            keyed by track number\n        '
    top_track = max(self.drawn_tracks)
    trackunit_sum = 0
    trackunits = {}
    heightholder = 0
    for track in range(1, (top_track + 1)):
        try:
            trackheight = self._parent[track].height
        except:
            trackheight = 1
        trackunit_sum += trackheight
        trackunits[track] = (heightholder, (heightholder + trackheight))
        heightholder += trackheight
    trackunit_height = ((0.5 * min(self.pagewidth, self.pageheight)) / trackunit_sum)
    self.track_radii = {}
    track_crop = ((trackunit_height * (1 - self.track_size)) / 2.0)
    for track in trackunits:
        top = ((trackunits[track][1] * trackunit_height) - track_crop)
        btm = ((trackunits[track][0] * trackunit_height) + track_crop)
        ctr = (btm + ((top - btm) / 2.0))
        self.track_radii[track] = (btm, ctr, top)