Benutzer-Werkzeuge

Webseiten-Werkzeuge


modellingcomponents:eventsandphases

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen Revision Vorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
modellingcomponents:eventsandphases [2017/03/23 08:31]
oliver [<Event>]
modellingcomponents:eventsandphases [2020/03/27 17:12] (aktuell)
oliver [<Phase>]
Zeile 12: Zeile 12:
 ^ Attribute ^ Default ^ Description ^ Required ^ ^ Attribute ^ Default ^ Description ^ Required ^
 ^ Name | | Name of the created phase type, also used as a prefix of created timeseries of condition an value tjaectories.| Yes | ^ 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 | +^ startEvent | | Create a phase based on existing start event for pre- or stepbystep processing. For postprocessing phases are created with an additional suffix "​Global",​ integrated in the condition. | No | 
-^ endEvent | No | Create a phase based on existing start event. Available only for pre- or stepbystep processing. | | +^ endEvent | | Create a phase based on existing start event for pre- or stepbystep processing. For postprocessing phases are created with an additional suffix "​Global",​ integrated in the condition.| No 
-^ 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 |+^ phase | not used | If set to an existing phase and if startEvent/​endEvent is not used, 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 | ^ 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 | ^ 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 |
-^ minwidth | | Only phases with more than minimalwidth frames are created. Phases with less frames are ignored. | 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 | ^ 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 timseries ​defined by the value attribute is tested if its values are higher than the value of this attribute. | 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| | 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 | | No | +^ minwidth | 0 | Only phases with more than "​minwidth"​ frames are created. Phases with less frames are ignored. Be careful: The atttribute must define an integer value.| No | 
-^ maxwidth | Integer.MAX_VALLUE | | No |+^ maxwidth | Integer.MAX_VALLUE | Only phases with less than maxwidth frames are created. Phases with more frames are ignored. Be carefule: The attribute must define an integer value.| No |
  
  
 **Calculated Trajectories** **Calculated Trajectories**
 ^ Name ^ Type ^ Description ^ ^ Name ^ Type ^ Description ^
-^ <​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>​Condition | double traj | If the child element or the attribute ​"​expr"​ (deprecated) ​is used (set to a formula), the values of this timeseries represents the status of each frame. Zero value indicates not included, else included. Typically the formula defines a function which result in the values 0 and 1 only. | 
-^ <​name>​Value | double traj | |+^ <​name>​Value | double traj | If the "​value"​ attribute is used, this timeserie includes the values of the its formula.|
  
 **Determined events and phases** **Determined events and phases**
  
 ^ Name ^ Description ^ ^ Name ^ Description ^
-^ <​name>​Global | if the attributes startEventType != null and endEventType != null or phaseTypeName != null+^ <​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. | 
 **Examples** **Examples**
  
 <code xml> <code xml>
-    <Phase name="​ABC"​ +    <Phase name="​ABC"​>abc &gt; 10.0</Phase>
-           ​condition="​abc &lg; 10.0"/>+
 </​code>​ </​code>​
  
-The following code fragment, creates a phase with minimal ​widht of 10 frames, for frames where the value of the timeserie RShoulderEleDepHDCalDirCosAngle is smaller than 30 degrees.+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.
  
 <code xml> <code xml>
Zeile 51: Zeile 50:
 </​code>​ </​code>​
  
 +The following code fragment creates phases based simply on existing events:
 +
 +<code xml>
 +<Phase name="​RAbduk"​ startEvent="​RHS"​ endEvent="​RTO"​ process="​post" ​
 +       ​calibrateIncludes="​dynamic_calibrate_right_shoulder"​
 +       ​includes="​dummy"/>​
 +</​code>​
 +
 +The following code fragment creates phases based on the given condition but only if they are included completly into phases which are defined by the given start- and end-event.
 +
 +<code xml>
 + <​Phase name="​LEleStartPhase" ​
 +        process="​post"​ minwidth="​10"​
 +        startEvent="​LHS"​ endEvent="​LTO"​
 +        value="​LShoulderEleDepHDCalDirCosAngle*1.0" ​
 +        includes="​ShoulderAbdAdd,​ShoulderAnteRetro">​LShoulderEleDepHDCalDirCosAngle &lt; 30.0</​Phase>​
 +</​code>​
 =====<​Event>​===== =====<​Event>​=====
  
-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. +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. All implemented methods are based on "post processing"​. Future methods cauld be based on other processing methods, e.g. "step by step"
  
 **Attributes** **Attributes**
Zeile 59: Zeile 75:
 ^ Attribute ^ Default ^ Description ^ Required ^ ^ Attribute ^ Default ^ Description ^ Required ^
 ^ name | | Name of the created event type, also used as a prefix of created timeseries of condition an value trajectories. | Yes | ^ 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 | +^ method | min | "​max",​ "​min",​ "​minvelocity",​ "​maxveclocity", "​frame",​ "value" 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ütztenpreprocess ​und process ​sind jedenfalls nicht implementiert! process==in the phase, which it processes, ​step by step | No |+^ process | post Only postprocessing is supportedPreprocessing ​und process step by step are not yet implemented.| 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 | ^ 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 | ^ phase | | better use tolerance instead if possible Phase type name which defines phases, for each the event is set. | No |
 +^ value | | Used from method "​frame"​ and method "​value"​. In the first case it must be an integer value, in the second case a double. | No |
 +^ event | | A new event is created at the position of the given event moved about a given number of frames. | No |
 +
 +** Methods **
 +
 +Available methods defined by the <​event>​-elements attribute "​method":​
 +
 +^ Name ^ Precondition ^ Description ^
 +^ frame | The attribute "​value"​ must be set to an integer between 0 (inclusive) and trial length (exclusive). The attributes "​tolerance"​ and "​phase"​ are not set. | Creates an event at the given position. |
 +^ value | The attribute "​phase"​ must be set. | Create events for each phase of the given type at positions where the given timeserie has the smallest difference to the given value. |
 +^ min  | | In a first step the global minimum or the minimum in the given phases, of the given timeseries is determined. Than phases are created in the range of [minimum; minimum*(1+percentTolerance/​100)]. Last, for each of these phases an event is created at the position, where the timeseries reaches its minimum.|
 +^ max  | | In a first step the global maximum or the maximum in the given phases, of the given timeseries is determined. Than phases are created in the range of [maximum*(1-percentTolerance/​100);​ maximum]. Last, for each of these phases an event is created at the position, where the timeseries reaches its maximum. |
 +^ minvelocity ​ | Attribute "​phase"​ is set. | Same as with method "​min",​ based on the derivative of the given timeserie. |
 +^ maxvelocity ​ | Attribute "​phase"​ is set. | Same as with method "max, based on the derivative of the given timeserie.|
 +^ start | Attribute "​phase"​ is set.| Creates an event at the start of the given phase.|
 +^ end   | Attribute "​phase"​ is set.| Creates an event at the end of the given phase |
 +
 +**Issues**
 +  * For the method "​frame"​ principle possible children elements are not processed.
  
 **Determined events and phases** **Determined events and phases**
Zeile 128: Zeile 163:
 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 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.+"​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. "​Bigger than 60" results in the need of a minimum elevation of 60+40=100 degree to autodetect a REleEndPhase.
  
 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 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.
Zeile 134: Zeile 169:
 The element "​REleEnd"​ determines the maxima of each of these phases: 523, 1636, 1757, 2697. 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.+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 phases ​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: To plot these phases you have to add the following code fragment into your sheet definition:
modellingcomponents/eventsandphases.1490254295.txt.gz · Zuletzt geändert: 2017/03/23 08:31 von oliver