import numpy as np
import pickle
import os

def GenerateFeature_alpha(ligand_name, working_dir):
    Cut = 12.0

    LIGELE = ['C','N','O','S','CN','CO','CS','NO','NS','OS','CCl','CBr','CP','CF','CNO','CNS','COS','NOS','CNOS','CNOSPFClBrI','H','CH','NH','OH','SH','CNH','COH','CSH','NOH','NSH','OSH','CNOH','CNSH','COSH','NOSH','CNOSH','CNOSPFClBrIH','CClH','CBrH','CPH','CFH']

    Feature_i = []
    pdb = ligand_name
    InFile = open(working_dir+'/'+ligand_name+'_alpha.pkl')
    BarCollection = pickle.load(InFile)
    for el in LIGELE:
        if 'lig_'+el in BarCollection.keys():
            Bars = BarCollection['lig_'+el]
            Bar0Birth = []; Bar0Death = []; Bar1Birth = []; Bar1Death = []; Bar2Birth = []; Bar2Death = [];
            for Bar in Bars:
                if Bar[2] < Bar[1]:
                    continue
                if Bar[2] > 12.0 and Bar[0] == 0: continue
                if Bar[2] > 12.0 and Bar[0] > 0: Bar[2] = 12.0
                if Bar[0] == 0:
                    Bar0Birth.append(Bar[1])
                    Bar0Death.append(Bar[2])
                if Bar[0] == 1:
                    Bar1Birth.append(Bar[1])
                    Bar1Death.append(Bar[2])
                if Bar[0] == 2:
                    Bar2Birth.append(Bar[1])
                    Bar2Death.append(Bar[2])
            if len(Bar0Birth) > 0:
                Bar0Birth = np.asarray(Bar0Birth, float)
                Bar0Death = np.asarray(Bar0Death, float)
            if len(Bar1Birth) > 0:
                Bar1Birth = np.asarray(Bar1Birth, float)
                Bar1Death = np.asarray(Bar1Death, float)
            if len(Bar2Birth) > 0:
                Bar2Birth = np.asarray(Bar2Birth, float)
                Bar2Death = np.asarray(Bar2Death, float)
            if len(Bar0Death) > 0:
                Feature_i.append(np.mean(Bar0Death[:]))
                Feature_i.append(np.std(Bar0Death[:]))
                Feature_i.append(np.max(Bar0Death[:]))
                Feature_i.append(np.min(Bar0Death[:]))
                Feature_i.append(np.sum(Bar0Death[:]))
                Feature_i.append(len(Bar0Death))
            else:
                Feature_i.extend([0.]*6)
            if len(Bar1Death) > 0:
                Feature_i.append(np.mean(Bar1Death[:] - Bar1Birth[:]))
                Feature_i.append(np.std(Bar1Death[:] - Bar1Birth[:]))
                Feature_i.append(np.max(Bar1Death[:] - Bar1Birth[:]))
                Feature_i.append(np.min(Bar1Death[:] - Bar1Birth[:]))
                Feature_i.append(np.sum(Bar1Death[:] - Bar1Birth[:]))
                Feature_i.append(Bar1Birth[np.argmax(Bar1Death[:] - Bar1Birth[:])])
                Feature_i.append(Bar1Death[np.argmax(Bar1Death[:] - Bar1Birth[:])])
                Feature_i.append(np.mean(Bar1Birth[:]))
                Feature_i.append(np.std(Bar1Birth[:]))
                Feature_i.append(np.max(Bar1Birth[:]))
                Feature_i.append(np.min(Bar1Birth[:]))
                Feature_i.append(np.sum(Bar1Birth[:]))
                Feature_i.append(np.mean(Bar1Death[:]))
                Feature_i.append(np.std(Bar1Death[:]))
                Feature_i.append(np.max(Bar1Death[:]))
                Feature_i.append(np.min(Bar1Death[:]))
                Feature_i.append(np.sum(Bar1Death[:]))
                Feature_i.append(len(Bar1Death))
            else:
                Feature_i.extend([0.]*18)
            if len(Bar2Death) > 0:
                Feature_i.append(np.mean(Bar2Death[:] - Bar2Birth[:]))
                Feature_i.append(np.std(Bar2Death[:] - Bar2Birth[:]))
                Feature_i.append(np.max(Bar2Death[:] - Bar2Birth[:]))
                Feature_i.append(np.min(Bar2Death[:] - Bar2Birth[:]))
                Feature_i.append(np.sum(Bar2Death[:] - Bar2Birth[:]))
                Feature_i.append(Bar2Birth[np.argmax(Bar2Death[:] - Bar2Birth[:])])
                Feature_i.append(Bar2Death[np.argmax(Bar2Death[:] - Bar2Birth[:])])
                Feature_i.append(np.mean(Bar2Birth[:]))
                Feature_i.append(np.std(Bar2Birth[:]))
                Feature_i.append(np.max(Bar2Birth[:]))
                Feature_i.append(np.min(Bar2Birth[:]))
                Feature_i.append(np.sum(Bar2Birth[:]))
                Feature_i.append(np.mean(Bar2Death[:]))
                Feature_i.append(np.std(Bar2Death[:]))
                Feature_i.append(np.max(Bar2Death[:]))
                Feature_i.append(np.min(Bar2Death[:]))
                Feature_i.append(np.sum(Bar2Death[:]))
                Feature_i.append(len(Bar2Death))
            else:
                Feature_i.extend([0.]*18)
        else:
            Feature_i.extend([0.]*42)
    Feature_i = np.asarray(Feature_i, float)

    outfile = open(working_dir+'/'+ligand_name+'_feature_alpha_handcrafted.npy', 'w')
    np.save(outfile, Feature_i)
    outfile.close()

def GenerateFeature_level1(ligand_name, working_dir):
    small = 0.01
    Feature_i = []
    Cut = 12.0

    LIGELE = ['C','N','O','S','CN','CO','CS','NO','NS','OS','CCl','CBr','CP','CF','CNO','CNS','COS','NOS','CNOS','CNOSPFClBrI','H','CH','NH','OH','SH','CNH','COH','CSH','NOH','NSH','OSH','CNOH','CNSH','COSH','NOSH','CNOSH','CNOSPFClBrIH','CClH','CBrH','CPH','CFH']

    pdb = ligand_name

    for el in LIGELE:
        if os.path.exists(working_dir+'/'+ligand_name+'_'+el+'_level1.PH'):
            InFile = open(working_dir+'/'+ligand_name+'_'+el+'_level1.PH')
            lines = InFile.read().splitlines()
            Bars = []
            for line in lines:
                a,b,c = line.split()
                Bars.append([int(a), float(b), float(c)])
            InFile.close()
            Bar0Birth = []; Bar0Death = []; Bar1Birth = []; Bar1Death = []; Bar2Birth = []; Bar2Death = [];
            for Bar in Bars:
                if Bar[2] < Bar[1]:
                    continue
                if Bar[2] > 12.0 and Bar[0] == 0: continue
                if Bar[2] > 12.0 and Bar[0] > 0: Bar[2] = 12.0
                if Bar[0] == 0 and Bar[2]-Bar[1] >= small:
                    Bar0Birth.append(Bar[1])
                    Bar0Death.append(Bar[2])
                if Bar[0] == 1 and Bar[2]-Bar[1] >= small:
                    Bar1Birth.append(Bar[1])
                    Bar1Death.append(Bar[2])
                if Bar[0] == 2 and Bar[2]-Bar[1] >= small:
                    Bar2Birth.append(Bar[1])
                    Bar2Death.append(Bar[2])
            if len(Bar0Birth) > 0:
                Bar0Birth = np.asarray(Bar0Birth, float)
                Bar0Death = np.asarray(Bar0Death, float)
            if len(Bar1Birth) > 0:
                Bar1Birth = np.asarray(Bar1Birth, float)
                Bar1Death = np.asarray(Bar1Death, float)
            if len(Bar2Birth) > 0:
                Bar2Birth = np.asarray(Bar2Birth, float)
                Bar2Death = np.asarray(Bar2Death, float)
            if len(Bar0Death) > 0:
                Feature_i.append(np.mean(Bar0Death[:]))
                Feature_i.append(np.std(Bar0Death[:]))
                Feature_i.append(np.max(Bar0Death[:]))
                Feature_i.append(np.min(Bar0Death[:]))
                Feature_i.append(np.sum(Bar0Death[:]))
                Feature_i.append(len(Bar0Death))
            else:
                Feature_i.extend([0.]*6)
            if len(Bar1Death) > 0:
                Feature_i.append(np.mean(Bar1Death[:] - Bar1Birth[:]))
                Feature_i.append(np.std(Bar1Death[:] - Bar1Birth[:]))
                Feature_i.append(np.max(Bar1Death[:] - Bar1Birth[:]))
                Feature_i.append(np.min(Bar1Death[:] - Bar1Birth[:]))
                Feature_i.append(np.sum(Bar1Death[:] - Bar1Birth[:]))
                Feature_i.append(Bar1Birth[np.argmax(Bar1Death[:] - Bar1Birth[:])])
                Feature_i.append(Bar1Death[np.argmax(Bar1Death[:] - Bar1Birth[:])])
                Feature_i.append(np.mean(Bar1Birth[:]))
                Feature_i.append(np.std(Bar1Birth[:]))
                Feature_i.append(np.max(Bar1Birth[:]))
                Feature_i.append(np.min(Bar1Birth[:]))
                Feature_i.append(np.sum(Bar1Birth[:]))
                Feature_i.append(np.mean(Bar1Death[:]))
                Feature_i.append(np.std(Bar1Death[:]))
                Feature_i.append(np.max(Bar1Death[:]))
                Feature_i.append(np.min(Bar1Death[:]))
                Feature_i.append(np.sum(Bar1Death[:]))
                Feature_i.append(len(Bar1Death))
            else:
                Feature_i.extend([0.]*18)
            if len(Bar2Death) > 0:
                Feature_i.append(np.mean(Bar2Death[:] - Bar2Birth[:]))
                Feature_i.append(np.std(Bar2Death[:] - Bar2Birth[:]))
                Feature_i.append(np.max(Bar2Death[:] - Bar2Birth[:]))
                Feature_i.append(np.min(Bar2Death[:] - Bar2Birth[:]))
                Feature_i.append(np.sum(Bar2Death[:] - Bar2Birth[:]))
                Feature_i.append(Bar2Birth[np.argmax(Bar2Death[:] - Bar2Birth[:])])
                Feature_i.append(Bar2Death[np.argmax(Bar2Death[:] - Bar2Birth[:])])
                Feature_i.append(np.mean(Bar2Birth[:]))
                Feature_i.append(np.std(Bar2Birth[:]))
                Feature_i.append(np.max(Bar2Birth[:]))
                Feature_i.append(np.min(Bar2Birth[:]))
                Feature_i.append(np.sum(Bar2Birth[:]))
                Feature_i.append(np.mean(Bar2Death[:]))
                Feature_i.append(np.std(Bar2Death[:]))
                Feature_i.append(np.max(Bar2Death[:]))
                Feature_i.append(np.min(Bar2Death[:]))
                Feature_i.append(np.sum(Bar2Death[:]))
                Feature_i.append(len(Bar2Death))
            else:
                Feature_i.extend([0.]*18)
        else:
            Feature_i.extend([0.]*42)
    Feature_i = np.asarray(Feature_i, float)

    outfile = open(working_dir+'/'+ligand_name+'_feature_ligand_level1_handcrafted.npy', 'w')
    np.save(outfile, Feature_i)
    outfile.close()

[((500, 519), 'pickle.load', 'pickle.load', (['InFile'], {}), '(InFile)\n', (511, 519), False, 'import pickle\n'), ((4686, 4714), 'numpy.asarray', 'np.asarray', (['Feature_i', 'float'], {}), '(Feature_i, float)\n', (4696, 4714), True, 'import numpy as np\n'), ((4806, 4833), 'numpy.save', 'np.save', (['outfile', 'Feature_i'], {}), '(outfile, Feature_i)\n', (4813, 4833), True, 'import numpy as np\n'), ((9780, 9808), 'numpy.asarray', 'np.asarray', (['Feature_i', 'float'], {}), '(Feature_i, float)\n', (9790, 9808), True, 'import numpy as np\n'), ((9908, 9935), 'numpy.save', 'np.save', (['outfile', 'Feature_i'], {}), '(outfile, Feature_i)\n', (9915, 9935), True, 'import numpy as np\n'), ((5283, 5356), 'os.path.exists', 'os.path.exists', (["(working_dir + '/' + ligand_name + '_' + el + '_level1.PH')"], {}), "(working_dir + '/' + ligand_name + '_' + el + '_level1.PH')\n", (5297, 5356), False, 'import os\n'), ((1385, 1413), 'numpy.asarray', 'np.asarray', (['Bar0Birth', 'float'], {}), '(Bar0Birth, float)\n', (1395, 1413), True, 'import numpy as np\n'), ((1442, 1470), 'numpy.asarray', 'np.asarray', (['Bar0Death', 'float'], {}), '(Bar0Death, float)\n', (1452, 1470), True, 'import numpy as np\n'), ((1534, 1562), 'numpy.asarray', 'np.asarray', (['Bar1Birth', 'float'], {}), '(Bar1Birth, float)\n', (1544, 1562), True, 'import numpy as np\n'), ((1591, 1619), 'numpy.asarray', 'np.asarray', (['Bar1Death', 'float'], {}), '(Bar1Death, float)\n', (1601, 1619), True, 'import numpy as np\n'), ((1683, 1711), 'numpy.asarray', 'np.asarray', (['Bar2Birth', 'float'], {}), '(Bar2Birth, float)\n', (1693, 1711), True, 'import numpy as np\n'), ((1740, 1768), 'numpy.asarray', 'np.asarray', (['Bar2Death', 'float'], {}), '(Bar2Death, float)\n', (1750, 1768), True, 'import numpy as np\n'), ((6479, 6507), 'numpy.asarray', 'np.asarray', (['Bar0Birth', 'float'], {}), '(Bar0Birth, float)\n', (6489, 6507), True, 'import numpy as np\n'), ((6536, 6564), 'numpy.asarray', 'np.asarray', (['Bar0Death', 'float'], {}), '(Bar0Death, float)\n', (6546, 6564), True, 'import numpy as np\n'), ((6628, 6656), 'numpy.asarray', 'np.asarray', (['Bar1Birth', 'float'], {}), '(Bar1Birth, float)\n', (6638, 6656), True, 'import numpy as np\n'), ((6685, 6713), 'numpy.asarray', 'np.asarray', (['Bar1Death', 'float'], {}), '(Bar1Death, float)\n', (6695, 6713), True, 'import numpy as np\n'), ((6777, 6805), 'numpy.asarray', 'np.asarray', (['Bar2Birth', 'float'], {}), '(Bar2Birth, float)\n', (6787, 6805), True, 'import numpy as np\n'), ((6834, 6862), 'numpy.asarray', 'np.asarray', (['Bar2Death', 'float'], {}), '(Bar2Death, float)\n', (6844, 6862), True, 'import numpy as np\n'), ((1837, 1858), 'numpy.mean', 'np.mean', (['Bar0Death[:]'], {}), '(Bar0Death[:])\n', (1844, 1858), True, 'import numpy as np\n'), ((1893, 1913), 'numpy.std', 'np.std', (['Bar0Death[:]'], {}), '(Bar0Death[:])\n', (1899, 1913), True, 'import numpy as np\n'), ((1948, 1968), 'numpy.max', 'np.max', (['Bar0Death[:]'], {}), '(Bar0Death[:])\n', (1954, 1968), True, 'import numpy as np\n'), ((2003, 2023), 'numpy.min', 'np.min', (['Bar0Death[:]'], {}), '(Bar0Death[:])\n', (2009, 2023), True, 'import numpy as np\n'), ((2058, 2078), 'numpy.sum', 'np.sum', (['Bar0Death[:]'], {}), '(Bar0Death[:])\n', (2064, 2078), True, 'import numpy as np\n'), ((2256, 2292), 'numpy.mean', 'np.mean', (['(Bar1Death[:] - Bar1Birth[:])'], {}), '(Bar1Death[:] - Bar1Birth[:])\n', (2263, 2292), True, 'import numpy as np\n'), ((2327, 2362), 'numpy.std', 'np.std', (['(Bar1Death[:] - Bar1Birth[:])'], {}), '(Bar1Death[:] - Bar1Birth[:])\n', (2333, 2362), True, 'import numpy as np\n'), ((2397, 2432), 'numpy.max', 'np.max', (['(Bar1Death[:] - Bar1Birth[:])'], {}), '(Bar1Death[:] - Bar1Birth[:])\n', (2403, 2432), True, 'import numpy as np\n'), ((2467, 2502), 'numpy.min', 'np.min', (['(Bar1Death[:] - Bar1Birth[:])'], {}), '(Bar1Death[:] - Bar1Birth[:])\n', (2473, 2502), True, 'import numpy as np\n'), ((2537, 2572), 'numpy.sum', 'np.sum', (['(Bar1Death[:] - Bar1Birth[:])'], {}), '(Bar1Death[:] - Bar1Birth[:])\n', (2543, 2572), True, 'import numpy as np\n'), ((2775, 2796), 'numpy.mean', 'np.mean', (['Bar1Birth[:]'], {}), '(Bar1Birth[:])\n', (2782, 2796), True, 'import numpy as np\n'), ((2831, 2851), 'numpy.std', 'np.std', (['Bar1Birth[:]'], {}), '(Bar1Birth[:])\n', (2837, 2851), True, 'import numpy as np\n'), ((2886, 2906), 'numpy.max', 'np.max', (['Bar1Birth[:]'], {}), '(Bar1Birth[:])\n', (2892, 2906), True, 'import numpy as np\n'), ((2941, 2961), 'numpy.min', 'np.min', (['Bar1Birth[:]'], {}), '(Bar1Birth[:])\n', (2947, 2961), True, 'import numpy as np\n'), ((2996, 3016), 'numpy.sum', 'np.sum', (['Bar1Birth[:]'], {}), '(Bar1Birth[:])\n', (3002, 3016), True, 'import numpy as np\n'), ((3051, 3072), 'numpy.mean', 'np.mean', (['Bar1Death[:]'], {}), '(Bar1Death[:])\n', (3058, 3072), True, 'import numpy as np\n'), ((3107, 3127), 'numpy.std', 'np.std', (['Bar1Death[:]'], {}), '(Bar1Death[:])\n', (3113, 3127), True, 'import numpy as np\n'), ((3162, 3182), 'numpy.max', 'np.max', (['Bar1Death[:]'], {}), '(Bar1Death[:])\n', (3168, 3182), True, 'import numpy as np\n'), ((3217, 3237), 'numpy.min', 'np.min', (['Bar1Death[:]'], {}), '(Bar1Death[:])\n', (3223, 3237), True, 'import numpy as np\n'), ((3272, 3292), 'numpy.sum', 'np.sum', (['Bar1Death[:]'], {}), '(Bar1Death[:])\n', (3278, 3292), True, 'import numpy as np\n'), ((3471, 3507), 'numpy.mean', 'np.mean', (['(Bar2Death[:] - Bar2Birth[:])'], {}), '(Bar2Death[:] - Bar2Birth[:])\n', (3478, 3507), True, 'import numpy as np\n'), ((3542, 3577), 'numpy.std', 'np.std', (['(Bar2Death[:] - Bar2Birth[:])'], {}), '(Bar2Death[:] - Bar2Birth[:])\n', (3548, 3577), True, 'import numpy as np\n'), ((3612, 3647), 'numpy.max', 'np.max', (['(Bar2Death[:] - Bar2Birth[:])'], {}), '(Bar2Death[:] - Bar2Birth[:])\n', (3618, 3647), True, 'import numpy as np\n'), ((3682, 3717), 'numpy.min', 'np.min', (['(Bar2Death[:] - Bar2Birth[:])'], {}), '(Bar2Death[:] - Bar2Birth[:])\n', (3688, 3717), True, 'import numpy as np\n'), ((3752, 3787), 'numpy.sum', 'np.sum', (['(Bar2Death[:] - Bar2Birth[:])'], {}), '(Bar2Death[:] - Bar2Birth[:])\n', (3758, 3787), True, 'import numpy as np\n'), ((3990, 4011), 'numpy.mean', 'np.mean', (['Bar2Birth[:]'], {}), '(Bar2Birth[:])\n', (3997, 4011), True, 'import numpy as np\n'), ((4046, 4066), 'numpy.std', 'np.std', (['Bar2Birth[:]'], {}), '(Bar2Birth[:])\n', (4052, 4066), True, 'import numpy as np\n'), ((4101, 4121), 'numpy.max', 'np.max', (['Bar2Birth[:]'], {}), '(Bar2Birth[:])\n', (4107, 4121), True, 'import numpy as np\n'), ((4156, 4176), 'numpy.min', 'np.min', (['Bar2Birth[:]'], {}), '(Bar2Birth[:])\n', (4162, 4176), True, 'import numpy as np\n'), ((4211, 4231), 'numpy.sum', 'np.sum', (['Bar2Birth[:]'], {}), '(Bar2Birth[:])\n', (4217, 4231), True, 'import numpy as np\n'), ((4266, 4287), 'numpy.mean', 'np.mean', (['Bar2Death[:]'], {}), '(Bar2Death[:])\n', (4273, 4287), True, 'import numpy as np\n'), ((4322, 4342), 'numpy.std', 'np.std', (['Bar2Death[:]'], {}), '(Bar2Death[:])\n', (4328, 4342), True, 'import numpy as np\n'), ((4377, 4397), 'numpy.max', 'np.max', (['Bar2Death[:]'], {}), '(Bar2Death[:])\n', (4383, 4397), True, 'import numpy as np\n'), ((4432, 4452), 'numpy.min', 'np.min', (['Bar2Death[:]'], {}), '(Bar2Death[:])\n', (4438, 4452), True, 'import numpy as np\n'), ((4487, 4507), 'numpy.sum', 'np.sum', (['Bar2Death[:]'], {}), '(Bar2Death[:])\n', (4493, 4507), True, 'import numpy as np\n'), ((6931, 6952), 'numpy.mean', 'np.mean', (['Bar0Death[:]'], {}), '(Bar0Death[:])\n', (6938, 6952), True, 'import numpy as np\n'), ((6987, 7007), 'numpy.std', 'np.std', (['Bar0Death[:]'], {}), '(Bar0Death[:])\n', (6993, 7007), True, 'import numpy as np\n'), ((7042, 7062), 'numpy.max', 'np.max', (['Bar0Death[:]'], {}), '(Bar0Death[:])\n', (7048, 7062), True, 'import numpy as np\n'), ((7097, 7117), 'numpy.min', 'np.min', (['Bar0Death[:]'], {}), '(Bar0Death[:])\n', (7103, 7117), True, 'import numpy as np\n'), ((7152, 7172), 'numpy.sum', 'np.sum', (['Bar0Death[:]'], {}), '(Bar0Death[:])\n', (7158, 7172), True, 'import numpy as np\n'), ((7350, 7386), 'numpy.mean', 'np.mean', (['(Bar1Death[:] - Bar1Birth[:])'], {}), '(Bar1Death[:] - Bar1Birth[:])\n', (7357, 7386), True, 'import numpy as np\n'), ((7421, 7456), 'numpy.std', 'np.std', (['(Bar1Death[:] - Bar1Birth[:])'], {}), '(Bar1Death[:] - Bar1Birth[:])\n', (7427, 7456), True, 'import numpy as np\n'), ((7491, 7526), 'numpy.max', 'np.max', (['(Bar1Death[:] - Bar1Birth[:])'], {}), '(Bar1Death[:] - Bar1Birth[:])\n', (7497, 7526), True, 'import numpy as np\n'), ((7561, 7596), 'numpy.min', 'np.min', (['(Bar1Death[:] - Bar1Birth[:])'], {}), '(Bar1Death[:] - Bar1Birth[:])\n', (7567, 7596), True, 'import numpy as np\n'), ((7631, 7666), 'numpy.sum', 'np.sum', (['(Bar1Death[:] - Bar1Birth[:])'], {}), '(Bar1Death[:] - Bar1Birth[:])\n', (7637, 7666), True, 'import numpy as np\n'), ((7869, 7890), 'numpy.mean', 'np.mean', (['Bar1Birth[:]'], {}), '(Bar1Birth[:])\n', (7876, 7890), True, 'import numpy as np\n'), ((7925, 7945), 'numpy.std', 'np.std', (['Bar1Birth[:]'], {}), '(Bar1Birth[:])\n', (7931, 7945), True, 'import numpy as np\n'), ((7980, 8000), 'numpy.max', 'np.max', (['Bar1Birth[:]'], {}), '(Bar1Birth[:])\n', (7986, 8000), True, 'import numpy as np\n'), ((8035, 8055), 'numpy.min', 'np.min', (['Bar1Birth[:]'], {}), '(Bar1Birth[:])\n', (8041, 8055), True, 'import numpy as np\n'), ((8090, 8110), 'numpy.sum', 'np.sum', (['Bar1Birth[:]'], {}), '(Bar1Birth[:])\n', (8096, 8110), True, 'import numpy as np\n'), ((8145, 8166), 'numpy.mean', 'np.mean', (['Bar1Death[:]'], {}), '(Bar1Death[:])\n', (8152, 8166), True, 'import numpy as np\n'), ((8201, 8221), 'numpy.std', 'np.std', (['Bar1Death[:]'], {}), '(Bar1Death[:])\n', (8207, 8221), True, 'import numpy as np\n'), ((8256, 8276), 'numpy.max', 'np.max', (['Bar1Death[:]'], {}), '(Bar1Death[:])\n', (8262, 8276), True, 'import numpy as np\n'), ((8311, 8331), 'numpy.min', 'np.min', (['Bar1Death[:]'], {}), '(Bar1Death[:])\n', (8317, 8331), True, 'import numpy as np\n'), ((8366, 8386), 'numpy.sum', 'np.sum', (['Bar1Death[:]'], {}), '(Bar1Death[:])\n', (8372, 8386), True, 'import numpy as np\n'), ((8565, 8601), 'numpy.mean', 'np.mean', (['(Bar2Death[:] - Bar2Birth[:])'], {}), '(Bar2Death[:] - Bar2Birth[:])\n', (8572, 8601), True, 'import numpy as np\n'), ((8636, 8671), 'numpy.std', 'np.std', (['(Bar2Death[:] - Bar2Birth[:])'], {}), '(Bar2Death[:] - Bar2Birth[:])\n', (8642, 8671), True, 'import numpy as np\n'), ((8706, 8741), 'numpy.max', 'np.max', (['(Bar2Death[:] - Bar2Birth[:])'], {}), '(Bar2Death[:] - Bar2Birth[:])\n', (8712, 8741), True, 'import numpy as np\n'), ((8776, 8811), 'numpy.min', 'np.min', (['(Bar2Death[:] - Bar2Birth[:])'], {}), '(Bar2Death[:] - Bar2Birth[:])\n', (8782, 8811), True, 'import numpy as np\n'), ((8846, 8881), 'numpy.sum', 'np.sum', (['(Bar2Death[:] - Bar2Birth[:])'], {}), '(Bar2Death[:] - Bar2Birth[:])\n', (8852, 8881), True, 'import numpy as np\n'), ((9084, 9105), 'numpy.mean', 'np.mean', (['Bar2Birth[:]'], {}), '(Bar2Birth[:])\n', (9091, 9105), True, 'import numpy as np\n'), ((9140, 9160), 'numpy.std', 'np.std', (['Bar2Birth[:]'], {}), '(Bar2Birth[:])\n', (9146, 9160), True, 'import numpy as np\n'), ((9195, 9215), 'numpy.max', 'np.max', (['Bar2Birth[:]'], {}), '(Bar2Birth[:])\n', (9201, 9215), True, 'import numpy as np\n'), ((9250, 9270), 'numpy.min', 'np.min', (['Bar2Birth[:]'], {}), '(Bar2Birth[:])\n', (9256, 9270), True, 'import numpy as np\n'), ((9305, 9325), 'numpy.sum', 'np.sum', (['Bar2Birth[:]'], {}), '(Bar2Birth[:])\n', (9311, 9325), True, 'import numpy as np\n'), ((9360, 9381), 'numpy.mean', 'np.mean', (['Bar2Death[:]'], {}), '(Bar2Death[:])\n', (9367, 9381), True, 'import numpy as np\n'), ((9416, 9436), 'numpy.std', 'np.std', (['Bar2Death[:]'], {}), '(Bar2Death[:])\n', (9422, 9436), True, 'import numpy as np\n'), ((9471, 9491), 'numpy.max', 'np.max', (['Bar2Death[:]'], {}), '(Bar2Death[:])\n', (9477, 9491), True, 'import numpy as np\n'), ((9526, 9546), 'numpy.min', 'np.min', (['Bar2Death[:]'], {}), '(Bar2Death[:])\n', (9532, 9546), True, 'import numpy as np\n'), ((9581, 9601), 'numpy.sum', 'np.sum', (['Bar2Death[:]'], {}), '(Bar2Death[:])\n', (9587, 9601), True, 'import numpy as np\n'), ((2617, 2655), 'numpy.argmax', 'np.argmax', (['(Bar1Death[:] - Bar1Birth[:])'], {}), '(Bar1Death[:] - Bar1Birth[:])\n', (2626, 2655), True, 'import numpy as np\n'), ((2701, 2739), 'numpy.argmax', 'np.argmax', (['(Bar1Death[:] - Bar1Birth[:])'], {}), '(Bar1Death[:] - Bar1Birth[:])\n', (2710, 2739), True, 'import numpy as np\n'), ((3832, 3870), 'numpy.argmax', 'np.argmax', (['(Bar2Death[:] - Bar2Birth[:])'], {}), '(Bar2Death[:] - Bar2Birth[:])\n', (3841, 3870), True, 'import numpy as np\n'), ((3916, 3954), 'numpy.argmax', 'np.argmax', (['(Bar2Death[:] - Bar2Birth[:])'], {}), '(Bar2Death[:] - Bar2Birth[:])\n', (3925, 3954), True, 'import numpy as np\n'), ((7711, 7749), 'numpy.argmax', 'np.argmax', (['(Bar1Death[:] - Bar1Birth[:])'], {}), '(Bar1Death[:] - Bar1Birth[:])\n', (7720, 7749), True, 'import numpy as np\n'), ((7795, 7833), 'numpy.argmax', 'np.argmax', (['(Bar1Death[:] - Bar1Birth[:])'], {}), '(Bar1Death[:] - Bar1Birth[:])\n', (7804, 7833), True, 'import numpy as np\n'), ((8926, 8964), 'numpy.argmax', 'np.argmax', (['(Bar2Death[:] - Bar2Birth[:])'], {}), '(Bar2Death[:] - Bar2Birth[:])\n', (8935, 8964), True, 'import numpy as np\n'), ((9010, 9048), 'numpy.argmax', 'np.argmax', (['(Bar2Death[:] - Bar2Birth[:])'], {}), '(Bar2Death[:] - Bar2Birth[:])\n', (9019, 9048), True, 'import numpy as np\n')]