/** * 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]; } } }
/** * 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()); } }
/** * Keys to insert * @return array */ protected function keys() { return array_merge(array(self::ACCOUNTID), Object::allProperties()); }
/** * @return boolean */ public function hasHRV() { return !$this->HRV->isEmpty(); }
/** * Finish proportional statistics */ protected function finishProportionStatistics() { $this->pNN50 = $this->NN50 / $this->Object->num(); $this->pNN20 = $this->NN20 / $this->Object->num(); }