Dies ist eine alte Version des Dokuments!
A <phase>-element determines a phase based on a condition formula given as the content of the element. If the value of the formula is bigger than 0, the corresponding frame is part of the phase.
Ether the „condition“ attribute or the attributes „startevent“ and „endevent“ must be used.
|Name||Name of the created phase type, also used as a prefix of created timeseries of condition an value tjaectories.||Yes|
|startEvent||Create a phase based on existing start event. Available only for pre- or stepbystep processing.||No|
|endEvent||Create a phase based on existing start event. Available only for pre- or stepbystep processing.|
|phase||not used||If set to an existing phase, a frame es included only if the frame is additionally also included in the given phase.||No|
|process||stepbystep||Available values: stepbystep, post, pre; The „process phase“, in which the time phase is created. If the condition attribute is used, the condition traj wrapper is calculated step-by-step, but the phases are created also in the postprocess phase. If start-/end-event is used, the phases are created with the first frame.||No|
|value||Used only, if process phase == stepbystep and condition is used. Phases created by the condition are excluded, if for the double timeseries defined by this attribute the values are bigger than the value of the maxvalue attribute or smallen than the value of the minvalue attribute.||No|
|contiguous||true||Used only if startEventTypeName == endEventTypeName. If set to false, an event is used eather as start- or end-event to create non contiguous phases.||No|
|maxvalue||Double.MAX_VALUE||The timserie defined by the „value“ attribute is tested if it contains a value higher than the value of this attribute. If this is the case the complete phase is excluded. This attribute is respected only, if the process-flag is set to „post“.||No|
|minvalue||-Double.MAX_VALUE||The timeserie defined by the value attribute is tested, if it contains a value lower than the value of this attribute. If this is the case the complete phase is excluded. This attribute is respected only, if the process-flag is set to „post“.||No|
|minwidth||0||Only phases with more than minwidth frames are created. Phases with less frames are ignored.||No|
|maxwidth||Integer.MAX_VALLUE||Only phases with less than maxwidth frames are created. Phases with more frames are ignored.||No|
|<name>Condition||double traj||If the condition attribute is used, the values of this timeseries represents the status of each frame. Zero value indicates not included, else included.|
|<name>Value||double traj||If the „value“ attribute is used, this timeserie includes the values of the its formula.|
Determined events and phases
|<name>Global||if the attributes startEventType != null and endEventType != null or phaseTypeName != null, than corresponding phases with this name are created and the condition that only frames which are included in these phases are used.|
<Phase name="ABC" condition="abc ≶ 10.0"/>
The following code fragment, creates a phase with minimal width of 10 frames, for frames where the value of the timeserie RShoulderEleDepHDCalDirCosAngle is smaller than 30 degrees.
<Phase name="REleStart" process="post" minwidth="10" value="RGlenohumeralEleDepHDCalDirCos" includes="dynamic_abduk_events">RShoulderEleDepHDCalDirCosAngle < 30.0</Phase>
The following code fragment creates a phases based simply on existing events:
<Phase name="RAbduk" startEvent="RHS" endEvent="RTO" process="post" calibrateIncludes="dynamic_calibrate_right_shoulder" includes="dummy"/>
A <Event>-element defines an event, based on the values of a double trajectorie (only), as its child and optional based on a given phase type name.
|name||Name of the created event type, also used as a prefix of created timeseries of condition an value trajectories.||Yes|
|method||min||„max“, „min“, „minvelocity“, „maxveclocity“ and if the attribute phase is set additional the methods „start“ and „end“||No|
|process (or deprectaed name calcphase)||Vielleicht werde ich überhaupt nur postprocess unterstützten. preprocess und process sind jedenfalls nicht implementiert! process==in the phase, which it processes, step by step||No|
|tolerance||If set local maxima/minima are determined by first creating phases with values between global min/max and min*(1+tolerance/100) or max*(1-tolerance/100)||No|
|phase||better use tolerance instead if possible Phase type name which defines phases, for each the event is set.||No|
Determined events and phases
|<name>Intervals||phase||Phases defined around the trial maximum plus/minus a given tolerance value.|
|<name>||event||In each determined phase an event is created at position with max or min value as configured by the method attribute.|
<!-- be careful: the event is set to the minimum, that means, that this position is 90Grad only if this position is reached in the RoM --> <Event name="ABC" method="min">180.0-RElbowFlex2Angle</Event>
Notes If the method „minvelocity“ or „maxvelocity“ is used, than a trajectory with the derivation is determined and saved in the trial. But this is a not wanted implementation detail and it will be gone in the future.
If the content is the name of a timeserie only, a classcast exeception is thrown.
A complex example
Have a look at the following plot. It shows an elevation/depression movement with three repetitions:
For all repetitions of the movement in the phase defined by RHS and RTO events the elevation phase should be extracted. The position of RHS is 482 and the position from RTO is 2697.
Have a look at the following code fragment which solves this problem:
<Phase name="REleStartPhase" process="post" minwidth="10" startEvent="RHS" endEvent="RTO" includes="ShoulderAbdAdd">RShoulderEleDepHDCalDirCosAngle < 30.0</Phase> <Event name="REleStart" phase="REleStartPhase" method="min" includes="ShoulderAbdAdd" process="post">RShoulderEleDepHDCalDirCosAngle*1.0</Event> <Phase name="REleEndPhase" process="post" minwidth="40" startEvent="RHS" endEvent="RTO" includes="ShoulderAbdAdd">RShoulderEleDepHDCalDirCosAngle > 60.0</Phase> <Event name="REleEnd" phase="REleEndPhase" method="max" includes="ShoulderAbdAdd" process="post">RShoulderEleDepHDCalDirCosAngle*1.0</Event> <Phase name="RElePhase" startEvent="REleStart" endEvent="REleEnd" process="post" contiguous="false" includes="ShoulderAbdAdd">RShoulderEleDepHDCalDirCosAngle < 90.0</Phase>
The first element defines a phase with name „REleStartPhase“ with the following assumptions:
This result in two phases: [926;1341], [2156;2618]. You can see the first movement is excluded because of the first assumption.
The element „REleStart“ determines for each of the phases above an event at the position where the curve has its minimum. So we have the start positions of the wanted elevation phases: 1164, 2399
„REleEndPhase“ looks for phases where the y-values of the curve are bigger than 60 and also the assumption defined by RHS and RTO and a min length of 40 frames.
The interesting thing is that this results in four instead of three phases: [482;836], [1436;1634], [1637;2054] and [2691;2697]. The second phase is split because of a gap in the curve.
The element „REleEnd“ determines the maxima of each of these phases: 523, 1636, 1757, 2697.
From the events „REleStart“ and „REleEnd“ the element „RElePhase“ determines two phases: [2399;2764], [1164;1520]. The nice thing is that the algorithm creates phases without gaps and the additional condition that the pases include frames only if the values of the curve are less than 90 degrees.
To plot these phases you have to add the following code fragment into your sheet definition:
<View> <Phases> <Phase name="RElePhase"/> </Phases> <Alignment phase="RElePhase" normalization="RElePhase"/> </View>