/**
  * 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];
         }
     }
 }
Exemple #2
0
 /**
  * Init data
  * @param \Runalyze\Model\HRV\Object $hrv
  */
 protected function initHRVData(Model\HRV\Object $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());
     }
 }
Exemple #3
0
 /**
  * Keys to insert
  * @return array
  */
 protected function keys()
 {
     return array_merge(array(self::ACCOUNTID), Object::allProperties());
 }
Exemple #4
0
 /**
  * @return boolean
  */
 public function hasHRV()
 {
     return !$this->HRV->isEmpty();
 }
Exemple #5
0
 /**
  * Finish proportional statistics
  */
 protected function finishProportionStatistics()
 {
     $this->pNN50 = $this->NN50 / $this->Object->num();
     $this->pNN20 = $this->NN20 / $this->Object->num();
 }