Beispiel #1
0
#print CAcoord
for entry in res:
    diff_list = entry[2]
    if len(diff_list) != 0 and diff_list != 'no assignment':
        min_value = min(x[1] for x in diff_list)
#		closest = [x for x in diff_list if x[1] == min_value]
#		if entry[1] != closest[0][0]:
#			print entry[1], closest[0][0]
#		print entry[1],  [[x[0], x[1]] for x in diff_list]

#print CAcoord
#print CAm1coord

### Get the NMR spectrum

header, data = papua.readnmrPipe(args['data_file'])

dic = papua.fdata2dic(header)
xn = dic['FDSIZE']
yn = dic['FDSPECNUM']
zn = dic['FDF3SIZE']

data3D = np.reshape(data, (zn, yn, xn))  # data is in 1HN, 13Ca, 15NH order

xsw_hz = dic['FDF2SW']  #H
ysw_hz = dic['FDF3SW']  #C
zsw_hz = dic['FDF1SW']  #N

xobs_mhz = dic['FDF2OBS']
yobs_mhz = dic['FDF3OBS']
zobs_mhz = dic['FDF1OBS']
Beispiel #2
0
    parser.add_argument('-lev',
                        '--number_of_levels',
                        help='Number of levels',
                        default=10)
    parser.add_argument('-fac', '--factor', help='Contour factor', default=1.4)
    parser.add_argument('-base', '--base', help='Base contour', default=0)
    args = vars(parser.parse_args())

    #        input_file = args['input_file']
    #	output_file = args['output_file']
    return args


args = getArgs()

header, data = papua.readnmrPipe(args['input_file'])

if args['base']:
    base = args['base']
else:
    base = np.amax(data) / 15

dic = papua.fdata2dic(header)

dim = dic['FDDIMCOUNT']

#Number of points in F2 (x dimension)
xn = dic['FDSIZE']
yn = dic['FDSPECNUM']
#fdquad = dic['FDQUADFLAG']
#fdtrans = dic['FDTRANSPOSED']