Windows <Prev Next>

Import From Table

This window is used to import parameters for a set of states or transitions from a spreadsheet or other table, and gives an easy way to set up a lot of objects at once. It can be used on State, Transition Moment, Perturbation and Nuclear Spin - Nuclear Spin objects. To invoke it, right click on the object you want to work on (the template object) in the Constants Window and select "Import...".


To import parameters or settings for a set of objects, set up a text file looking like this,
with one line per object:
v=*,Origin,B,D
0,15724.5949,2.892498E-0002,6.2323E-0009
1,15848.7499,2.877430E-0002,6.3444E-0009
Items can be separated by commas, to give a CSV file as above, tabs, or spaces, and can also be copied and pasted from a spreadsheet. (Leave the file name field blank to use the clipboard.) The first item in the top line is the template for the state name; the * in the template is replaced by the first item on the subsequent lines to make up the state name for each line. If the template is simply "v", the template is found by replacing any digits on the end of name of the template state with *.

The subsequent items on the first line give the names of the parameters or settings in successive columns. As a convenience parameters may be prefixed by "-" to change the sign of the value read, or followed by "^2" to take the square root of the value read. Empty columns are ignored; unrecognised names will give a warning message.

When importing transitions, perturbations or spin-spin objects, the first two non-blank columns on each line are state names, with the same logic as above used to work out each state name:
v=*,v=*,Strength^2
0,0,4.09E-5
0,1,0.0001555
Note that importing settings that change the displayed name of the object may give unexpected results.


Select the filename to use; leave the adjacent text box blank to use the clipboard
EditButton Edit the selected file
Overwrite Select to permit updating parameters on already existing objects
CreateCheck Select to permit creation of new objects
TestButton Test the import; a report of what would be done will appear, as in the example above.
ApplyButton Apply the import, updating and creating objects as selected above. The actions taken are shown as above.
CancelButton Close the window