Changes
Jump to navigation
Jump to search
← Older edit
Newer edit →
Tutorial for sorting data stored as numpy to on-resonance R1rho analysis
29 bytes added
,
10:30, 17 November 2015
→Create data files for relax
:
Converted the 1_prepare_data.py script to be Python 3 compatible.
{{collapsible script
| type = Python 2
/3
script
| title = The <code>1_prepare_data.py</code> script.
| lang = python
# Loop over the experiments, collect all data
for field in fields:
print
(
"\n
%s
"
,
%
field
)
# Make a dic inside
all_data['%s'%field]['np_%s'%file_name] = file_name_path_data_np
print
("%s %s" % (
file_name, file_name_path_data_np.shape
))
# Collect residues
RFfields = all_data['%s'%field]['np_RFfields'][0]
print
(
"\nfield: %3.3f"%field
)
for i, RF_field_strength_kHz in enumerate(RFfields):
#print
(
"RF_field_strength_kHz: %3.3f"%RF_field_strength_kHz
)
# Generate file name
f_name = "sfrq_%i_MHz_RFfield_%1.3f_kHz.in"%(field, RF_field_strength_kHz)
cur_file = open(f_name, "w")
cur_file.write("# resi rate rate_err\n")
exp_string = "%11.7f %11.7f %s\n"%(field, RF_field_strength_kHz, f_name) print
(
exp_string
,
)
f_exp.write(exp_string)
Bugman
Trusted,
Bureaucrats
4,223
edits
Navigation menu
Personal tools
Create account
Log in
Namespaces
Page
Discussion
Variants
Views
Read
View source
View history
More
Search
Navigation
Main page
Homepage
Installation guides
Community portal
Recent changes
Random page
Help
Tools
Upload file
Special pages
Printable version