| lang = python
| script =
#python Python modules.
import os
import glob
from time import asctime, localtime
# relax modules.
from lib.io import sort_filenames
# Set path to data.
data = '/sbinlab2/tlinnet/software/NMR-relax/relax_trunk/test_suite/shared_data/dispersion/Hansen'
# Do for 500.
###############################################
# Change directory.
os.chdir(data + os.sep + '500_MHz')
# Get the file list, and sort the file list Alphanumericalphanumeric.
flist500 = glob.glob('*.in_sparky')
flist500 = sort_filenames(filenames=flist500)
# Make ID.
ID500 = []
for f in flist500: ID500.append("500_"+f.split(".in_sparky")[0])
# Then Readread.
spectrum.read_intensities(file=flist500, spectrum_id=ID500)
flist500rep = sort_filenames(filenames=flist500rep)
# Make ID.
ID500rep = []
for f in flist500rep: ID500rep.append("500_"+f.split(".in.bis_sparky")[0]+'b')
# Then Readread.
spectrum.read_intensities(file=flist500rep, spectrum_id=ID500rep)
# Then map replicated.
for b_id in ID500rep:
a_id = b_id[:-1]
spectrum.replicated(spectrum_ids=[a_id, b_id])
# Then check.
print cdp.replicates
# Then repeat for 800.
###############################################
# Change directory.
os.chdir(data + os.sep + '800_MHz')
# Get the file list, and sort the file list Alphanumericalphanumeric.
flist800 = glob.glob('*.in_sparky')
flist800 = sort_filenames(filenames=flist800)
# Make ID.
ID800 = []
for f in flist800: ID800.append("800_"+f.split(".in_sparky")[0])
# Then Readread.
spectrum.read_intensities(file=flist800, spectrum_id=ID800)
flist800rep = sort_filenames(filenames=flist800rep)
# Make ID.
ID800rep = []
for f in flist800rep: ID800rep.append("800_"+f.split(".in.bis_sparky")[0]+'b')
# Then Readread.
spectrum.read_intensities(file=flist800rep, spectrum_id=ID800rep)
# Then map replicated.
for b_id in ID800rep:
a_id = b_id[:-1]
spectrum.replicated(spectrum_ids=[a_id, b_id])
# Then check.
print cdp.replicates
################################################
print len(ID500), len(ID500rep), len(ID800), len(ID800rep)
# Then set spectrum properties.
all_ID = ID500 + ID500rep + ID800 + ID800rep
for cur_id in all_ID:
# Split from name.
sfrq_str, vcpmg_str = cur_id.split("_")