eisgenerator 1.0.x
normalize.h
1//SPDX-License-Identifier: LGPL-3.0-or-later
2/* * eisgenerator - a shared library and application to generate EIS spectra
3 * Copyright (C) 2022-2024 Carl Philipp Klemm <carl@uvos.xyz>
4 *
5 * This file is part of eisgenerator.
6 *
7 * eisgenerator is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * eisgenerator is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with eisgenerator. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21#pragma once
22#include <vector>
23#include <string>
24
25#include "eistype.h"
26#include "model.h"
27
28
29namespace eis
30{
31
43void normalize(std::vector<eis::DataPoint>& data);
44
53std::vector<eis::DataPoint> reduceRegion(const std::vector<eis::DataPoint>& data, fvalue gradThreshFactor = 0.01, bool useSecondDeiv = false);
54
64void eraseSingularites(std::vector<eis::DataPoint>& data);
65
68}
69
void normalize(std::vector< eis::DataPoint > &data)
Normalizes the data to [0,1].
std::vector< eis::DataPoint > reduceRegion(const std::vector< eis::DataPoint > &data, fvalue gradThreshFactor=0.01, bool useSecondDeiv=false)
Reduces the data by removing "uninteresting" regions.
void eraseSingularites(std::vector< eis::DataPoint > &data)
Removes INF and NAN from the dataset by interpolating from neighboring points.
eisgenerator Copyright (C) 2021 Carl Klemm
Definition basicmath.h:26