How to use the muse-js.channelNames.slice function in muse-js

To help you get started, we’ve selected a few muse-js examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github NeuroJS / angular-muse / src / app / time-series / time-series.component.ts View on Github external
const samplingFrequency = 256;

@Component({
  selector: 'time-series',
  templateUrl: 'time-series.component.html',
  styleUrls: ['time-series.component.css'],
})
export class TimeSeriesComponent implements OnInit, OnDestroy, AfterViewInit {

  @Input() data: Observable;

  filter = false;

  readonly channels = 4;
  readonly channelNames = channelNames.slice(0, this.channels);
  readonly amplitudes = [];
  readonly uVrms = [0, 0, 0, 0];
  readonly uMeans = [0, 0, 0, 0];

  readonly options = this.chartService.getChartSmoothieDefaults({
    millisPerPixel: 8,
    maxValue: 1000,
    minValue: -1000
  });
  readonly colors = this.chartService.getColors();
  readonly canvases = Array(this.channels).fill(0).map(() => new SmoothieChart(this.options));

  private readonly lines = Array(this.channels).fill(0).map(() => new TimeSeries());
  private readonly bandpassFilters: BandpassFilter[] = [];

  constructor(private view: ElementRef, private chartService: ChartService) {

muse-js

Muse 2016 EEG Headset JavaScript Library

MIT
Latest version published 3 years ago

Package Health Score

49 / 100
Full package analysis

Similar packages