|
@@ -501,6 +501,7 @@ class MchDataCenter(object):
|
|
|
mratios = {}
|
|
|
hfive = h5py.File(self._file_name, 'r')
|
|
|
for mchid, paths in mchid_paths.items():
|
|
|
+ mch_ratios = {}
|
|
|
for card_type, name in card_types.items():
|
|
|
print('card_type=',card_type,'name=',name)
|
|
|
if card_type is None:
|
|
@@ -509,7 +510,8 @@ class MchDataCenter(object):
|
|
|
cur_paths = self._merge_mobile_type_path(paths,card_type)
|
|
|
mdata = self._merge_data(hfive,cur_paths)
|
|
|
result = self._calc_mratio(mdata,presecs,time_stamp - day_stamp)
|
|
|
- mratios[mchid][name] = result
|
|
|
+ mch_ratios[name] = result
|
|
|
+ mratios[mchid] = mch_ratios
|
|
|
hfive.close()
|
|
|
return mratios
|
|
|
|