1 """
2 In this module the class
3 """
4
5 import matplotlib.mlab as mlab
6 import pylab as plt
7
8 from fieldpy.core.experiment_classes import *
9
11 """
12 Well, this class holds the discharge time series
13 """
14
15 - def __init__(self, stage, stage_field, stage2discharge_fn):
16 """
17
18 """
19 super(Discharge, self).__init__()
20 self.stage = stage
21 self.stage2discharge = stage2discharge_fn
22 self.data = stage.data
23 self.md.stage_field = stage_field
24 dis = self.stage2discharge(self.data[stage_field])
25 try:
26 self.data = helper_fns.append_ma2mrec(self.data, dis, 'discharge')
27 except:
28 self.data = mlab.rec_append_fields(self.data, 'discharge', dis)
29 self.check()
30
33