AsciiImport File Format Rules
See the example file, and copy thatformat. These instructions provide further details if all else fails...
The trajectory and analogue data may appear in separate files, or thesame file - whichever you prefer.
There is a second example "warnings"file which will be "succesfully" read by the PlugIn, though it will generatea lot of warnings. It illustrates the format which is allowed - thoughnot recommended !
Section Headings
Sections are headed by a name in upper case :-
SECTIONNAME
AsciiImport recognises sections headed TRAJECTORIES and ANALOG. Othersetions may exist in the file, and will be ignored.
- The section heading may be anywhere on the line. Any text before or afterthe heading on the same line is ignored.
- Sections may appear in any order in the file.
- Sections other than those recognised by AsciiImport may appear. They willbe ignored.
Frequency Line
The next line after the heading line contains the frequency of the datain Hz. This data is not used by ASCII Import, and is ignored, though thisline must exist in both the TRAJECTORY and the ANALOGUE section (even ifit's blank)Labels line
The second line in the Trajectories/Analogue section must contain the labelsof your data.- Spaces are not allowed in these labels.
- Spaces or tabs must separate each label.
Trajectory Labels
If the label matches an existing trajectory, the data in the trajectorywill be overwritten. If not, a new trajectory will be constructed and addedto the trial.The trajectory labels may optionally have a trajectory "type" appendedto the label, inside round brackets "(" and ")". Again, this should beadded at least to the X component label - the others are ignored in fact.
Spaces must not be included.
The "type" should be one of the following :-
POINT
ANGLE
FORCE
MOMENT
POWER
SCALAR
The case of the letters is not important.
Other type strings will be ignored, and the type will be assumed tobe POINT.
X Y Z line
The line following the trajectories is also ignored by ASCII Import, thoughthe line must be there (even if it's blank). This is to provide ASCIIDumpcompatability.Analogue Labels
For analogue channels, The labels line must begin with two separate words- normally "Sample" and "#". This is to ensure compatability with ASCIIDump.In fact ASCII Import ignores these two words, but there must be two wordspresent (e.g. "A" and "B" would be okay).- There must follow a label for each channel.
- The labels must not contain spaces.
- Analogue labels must not contain a "type" part in brackets.
The labels must match those found in the workstation trial (Workstationdoes not allow the generation of new analgue channels).
If a label is found which is not present in the trial, it, and subsequentlabels (and corresponding data values) will be ignored.Data Values
Data follow the labels line for each section.- Frame numbers may appear in any order. Lines are read from top to bottom.Each new line overwrites existing data in the trial. Workstation may extendthe trial to cope with frame numbers beond the previous frame limits ofthe trial, but the trial will not be shortened to the maximum and minimumframe numbers found in your text file. It's quite easy to save a specifiedrange of frames from Workstation, if that's what you want.
- Each line of numbers corresponds to a single frame or sample number.
- The first number on the line is the frame or sample number. This must bea positive integer. It may also be zero in the case of the analogue data.
- The following numbers on the line can be any decimal numerical format.
- The data values must follow the order of the headings on the labels line.
- There must be three numbers for each trajectory label, in the order X,Y, Z.
- The program will try to read enough numbers from each line to correspondto each of the headings that it succesfully read. Further entries on theline will be ignored.
- If the program fails to read a number for a trajectory point component(e.g. there's a word instead) it will insert an invalid point for thatframe.
- If the program fails to read an analogue data value, it's ignored, andthe rest of the line is ignored.
The data section must be finished with a blank line (or the end of thefile).Comments
In general, the file reading code will try to interpret any comments, butit will ignore them and continue reading the next line if it can't interpretthe text.
You can always put comments after the section heading, though you mustleave a space between the section heading and your comment.
You can also put comments at the end of each data line, so long asthere are enough numbers for the number of trajectories or analogue channelssuccesfully read from the labels line.
Putting alphabetic text in the middle of a line of analogue data willcause the rest of the line to be ignored.