aboutsummaryrefslogtreecommitdiffstats
path: root/mass_profile/shuffle_T.py
blob: 24e7393c9b58a7ae5b5e170df5e8dc5db1874db7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/python

import sys
import scipy

output_file=open(sys.argv[2],'w')
for i in open(sys.argv[1]):
    r,re,c,s=i.strip().split()
    c=float(c)
    s=float(s)

    if c>0 and s>0:
        c1=-1
        while c1<=0:
            c1=scipy.random.normal(0,1)*s+c

        output_file.write("%s\t%s\t%s\t%s\n"%(r,re,c1,s))