Example #1
0
 /**
  * Collect plot data
  */
 protected function collectPlotData()
 {
     $data = $this->Object->data();
     $num = $this->Object->num();
     for ($i = 1; $i < $num; ++$i) {
         if (abs($data[$i - 1] - $data[$i]) < $this->Filter) {
             $this->PlotData[(string) $data[$i - 1]] = $data[$i];
         }
     }
 }
Example #2
0
 /**
  * Init data
  * @param \Runalyze\Model\HRV\Entity $hrv
  */
 protected function initHRVData(Model\HRV\Entity $hrv)
 {
     if (count($this->XAxisData) == $hrv->num()) {
         $this->XAxis = DataCollector::X_AXIS_TIME;
         $this->Data = array_combine($this->XAxisData, $this->filterData($hrv->data()));
     } else {
         $this->XAxis = DataCollector::X_AXIS_INDEX;
         $this->Data = $this->filterData($hrv->data());
     }
 }
Example #3
0
 /**
  * Finish proportional statistics
  */
 protected function finishProportionStatistics()
 {
     $this->pNN50 = $this->NN50 / $this->Object->num();
     $this->pNN20 = $this->NN20 / $this->Object->num();
 }
Example #4
0
 /**
  * Keys to insert
  * @return array
  */
 protected function keys()
 {
     return array_merge(array(self::ACCOUNTID), Entity::allProperties());
 }
Example #5
0
 /**
  * @return boolean
  */
 public function hasHRV()
 {
     return !$this->HRV->isEmpty();
 }