Select Git revision
HP_analysis.ipynb
options.h 6.33 KiB
//SPDX-License-Identifier: LGPL-3.0-or-later
/* * eisgenerator - a shared libary and application to generate EIS spectra
* Copyright (C) 2022-2024 Carl Philipp Klemm <carl@uvos.xyz>
*
* This file is part of eisgenerator.
*
* eisgenerator is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* eisgenerator is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with eisgenerator. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include <string>
#include <argp.h>
#include "log.h"
#define xstr(s) str(s)
#define str(s) #s
const char *argp_program_version = "eisgenerator-" xstr(VERSION_MAJOR) "." xstr(VERSION_MINOR) "." xstr(VERSION_PATCH);
const char *argp_program_bug_address = "<carl@uvos.xyz>";
static char doc[] = "Application that generates EIS spectra from model strings";
static char args_doc[] = "";
static struct argp_option options[] =
{
{"verbose", 'v', 0, 0, "Show debug messages" },
{"quiet", 'q', 0, 0, "only output data" },
{"param", 's', "[COUNT]", 0, "parameter sweep steps" },
{"model", 'm', "[STRING]", 0, "set model string" },
{"omega", 'o', "[START~END]", 0, "set omega range" },
{"extrapolate", 'a', "[START~END]", 0, "extrapolate a spectra simulated on the omega range to the one given here" },
{"omegasteps", 'c', "[COUNT]", 0, "set omega range steps" },
{"linear", 'l', 0, 0, "use linear instead of logarithmic steps" },
{"normalize", 'n', 0, 0, "normalize values" },
{"reduce", 'r', 0, 0, "reduce values to \"interesting\" range" },
{"hz", 'h', 0, 0, "freqency values as temporal frequency instead of angular frequency"},
{"invert", 'i', 0, 0, "inverts the imaginary axis"},
{"noise", 'x', "[AMPLITUDE]", 0, "add noise to output"},
{"input-type", 't', "[STRING]", 0, "set input string type, possible values: eis, boukamp, relaxis, madap"},
{"mode", 'f', "[STRING]", 0, "mode, possible values: export, code, script, find-range, export-ranges"},
{"range-distance", 'd', "[DISTANCE]", 0, "distance from a previous point where a range is considered \"new\""},
{"parallel", 'p', 0, 0, "run on multiple threads"},
{"skip-linear", 'e', 0, 0, "dont output param sweeps that create linear nyquist plots"},
{"default-to-range", 'b', 0, 0, "if a element has no paramters, default to assigning it a range instead of a single value"},
{"no-compile", 'z', 0, 0, "dont compile the model into a shared object"},
{"save", 'y', "[FILENAME]", 0, "place to save sweeps"},
{ 0 }
};
enum
{
INPUT_TYPE_EIS,
INPUT_TYPE_BOUKAMP,
INPUT_TYPE_RELAXIS,
INPUT_TYPE_MADAP,
INPUT_TYPE_UNKOWN
};
enum
{