private void filter() {
FilterSettings filtSet = new FilterSettings();
filtSet.createDefault(this.currentAnalysis.getSignalFrequency().getFrequency().doubleValue());
// primer grafico -> señal cruda
XYChart rawSignal = new XYChart("Señal Original", "Muestras", "Amplitud (%)");
rawSignal.setShowLegend(false);
rawSignal.addSeries("Tren de Pulsos", this.currentAnalysis.getRawSignal().getSegment().toDoubleArray(), 1);
this.rawSignalChart = rawSignal.plot();
// onda filtrada
this.segment = FilterProcessor.filterPulseWave(this.currentAnalysis.getRawSignal().getSegment(), filtSet);
if (this.currentAnalysis.getRawSignal().isInverted()) {
this.segment = this.segment.invert();
}
// segundo grafico -> señal invertida y filtrada
this.filteredSignalModel = new XYChart("Señal Filtrada", "Muestras", "Amplitud (%)");
this.filteredSignalModel.addSeries("Tren de Pulsos", this.segment.toDoubleArray(), 1);
this.filteredSignalModel.setShowLegend(false);
this.filteredSignalChart = this.filteredSignalModel.plot();
}