Commit 546a9051 authored by laura.gassner's avatar laura.gassner

Merge branch 'import_Seitosh' into 'Seitosh/import'

Import seitosh

libstfinv now supports semicolons as an alternative to commas being used as field separators in parameter values.

See merge request !4
parents 5020ca0c 7acaa0a8
...@@ -12,7 +12,7 @@ The [**manual**](https://git.scc.kit.edu/GPIAG-Software/IFOS2D/wikis/home) is in ...@@ -12,7 +12,7 @@ The [**manual**](https://git.scc.kit.edu/GPIAG-Software/IFOS2D/wikis/home) is in
# Download and Newsletter # Download and Newsletter
Release: [![build status](https://git.scc.kit.edu/GPIAG-Software/IFOS2D/badges/master/build.svg)](https://git.scc.kit.edu/GPIAG-Software/IFOS2D/commits/master) Beta: [![build status](https://git.scc.kit.edu/GPIAG-Software/IFOS2D/badges/develop/build.svg)](https://git.scc.kit.edu/GPIAG-Software/IFOS2D/commits/develop) Release: [![build status](https://git.scc.kit.edu/GPIAG-Software/IFOS2D/badges/master/build.svg)](https://git.scc.kit.edu/GPIAG-Software/IFOS2D/commits/master) Beta: [![build status](https://git.scc.kit.edu/GPIAG-Software/IFOS2D/badges/develop/build.svg)](https://git.scc.kit.edu/GPIAG-Software/IFOS2D/commits/develop)
You can download the [**latest Release 2.0.2**](https://git.scc.kit.edu/GPIAG-Software/IFOS2D/tags/Release_2.0.2) or the current [**Beta-Version**](https://git.scc.kit.edu/GPIAG-Software/IFOS2D/tree/develop). You can download the [**latest Release 2.0.3**](https://git.scc.kit.edu/GPIAG-Software/IFOS2D/tags/Release_2.0.3) or the current [**Beta-Version**](https://git.scc.kit.edu/GPIAG-Software/IFOS2D/tree/develop).
To receive news and updates please [register](http://www.gpi.kit.edu/Software-FWI.php) on the email list [IFOS@lists.kit.edu](http://www.gpi.kit.edu/Software-FWI.php). To receive news and updates please [register](http://www.gpi.kit.edu/Software-FWI.php) on the email list [IFOS@lists.kit.edu](http://www.gpi.kit.edu/Software-FWI.php).
Please use this list also to ask questions or to report problems or bugs. Please use this list also to ask questions or to report problems or bugs.
...@@ -29,11 +29,12 @@ ...@@ -29,11 +29,12 @@
* *
* REVISIONS and CHANGES * REVISIONS and CHANGES
* - 06/05/2011 V1.0 Thomas Forbriger * - 06/05/2011 V1.0 Thomas Forbriger
* - 18/01/2016 V1.1 rename function to secomtospace
* *
* ============================================================================ * ============================================================================
*/ */
#define STFINV_PARAMETERHANDLER_CC_VERSION \ #define STFINV_PARAMETERHANDLER_CC_VERSION \
"STFINV_PARAMETERHANDLER_CC V1.0" "STFINV_PARAMETERHANDLER_CC V1.1"
#include <algorithm> #include <algorithm>
#include <stfinv/parameterhandler.h> #include <stfinv/parameterhandler.h>
...@@ -50,7 +51,7 @@ std::string stfinv::tools::clipstring(std::string& s, const std::string& delim) ...@@ -50,7 +51,7 @@ std::string stfinv::tools::clipstring(std::string& s, const std::string& delim)
s.erase(); s.erase();
} }
return(result); return(result);
} // std::string stfinv::tools::clipstring^ } // std::string stfinv::tools::clipstring()
/*----------------------------------------------------------------------*/ /*----------------------------------------------------------------------*/
...@@ -71,11 +72,12 @@ stfinv::tools::Tparamap stfinv::tools::makeparamap(const std::string& p, ...@@ -71,11 +72,12 @@ stfinv::tools::Tparamap stfinv::tools::makeparamap(const std::string& p,
/*----------------------------------------------------------------------*/ /*----------------------------------------------------------------------*/
std::string stfinv::tools::commatospace(std::string s) std::string stfinv::tools::secomtospace(std::string s)
{ {
std::replace(s.begin(), s.end(), ',', ' '); std::replace(s.begin(), s.end(), ',', ' ');
std::replace(s.begin(), s.end(), ';', ' ');
return(s); return(s);
} // std::string stfinv::tools::commatospace(const std::string& s) } // std::string stfinv::tools::secomtospace(const std::string& s)
/*----------------------------------------------------------------------*/ /*----------------------------------------------------------------------*/
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
* *
* REVISIONS and CHANGES * REVISIONS and CHANGES
* - 06/05/2011 V1.0 Thomas Forbriger * - 06/05/2011 V1.0 Thomas Forbriger
* - 18/01/2016 V1.1 rename function to secomtospace
* *
* ============================================================================ * ============================================================================
*/ */
...@@ -37,7 +38,7 @@ ...@@ -37,7 +38,7 @@
#ifndef STFINV_PARAMETERHANDLER_H_VERSION #ifndef STFINV_PARAMETERHANDLER_H_VERSION
#define STFINV_PARAMETERHANDLER_H_VERSION \ #define STFINV_PARAMETERHANDLER_H_VERSION \
"STFINV_PARAMETERHANDLER_H V1.0" "STFINV_PARAMETERHANDLER_H V1.1"
#include <string> #include <string>
#include <map> #include <map>
...@@ -85,13 +86,14 @@ namespace stfinv { ...@@ -85,13 +86,14 @@ namespace stfinv {
/*----------------------------------------------------------------------*/ /*----------------------------------------------------------------------*/
/*! replace comma by whitespace /*! replace commas and semicolons by whitespace
* \ingroup group_tools * \ingroup group_tools
* *
* \param s input string * \param s input string
* \return input string with all commas replaced by whitespace * \return input string with all commas replaced by whitespace and
* all semicolons replaced by whitespace
*/ */
std::string commatospace(std::string s); std::string secomtospace(std::string s);
/*----------------------------------------------------------------------*/ /*----------------------------------------------------------------------*/
......
...@@ -255,7 +255,7 @@ namespace stfinv { ...@@ -255,7 +255,7 @@ namespace stfinv {
// taper definition // taper definition
// ---------------- // ----------------
{ {
std::istringstream is(stfinv::tools::commatospace( std::istringstream is(stfinv::tools::secomtospace(
this->parameter("irtap","0.,1.,2.,3."))); this->parameter("irtap","0.,1.,2.,3.")));
is >> Mtt1 >> Mtt2 >> Mtt3 >> Mtt4; is >> Mtt1 >> Mtt2 >> Mtt3 >> Mtt4;
} }
......
...@@ -19,6 +19,10 @@ remainder may consist of several control parameters being separated by colons ...@@ -19,6 +19,10 @@ remainder may consist of several control parameters being separated by colons
or may come along with a parameter value. The value is separated from the or may come along with a parameter value. The value is separated from the
parameter by an equal sign (=). parameter by an equal sign (=).
Where several values in an argument to a parameter must be separated (like in
the 'irtap' option of the Fourier domain procedures) white space ( ), commas
(,), and semicolons (;) are allowed as field delimiters, at your convenience.
Examples: Examples:
- To select Fourier domain least squares and shift the returned source - To select Fourier domain least squares and shift the returned source
correction filter wavelet by 0.4s and switch on verbose mode, pass the correction filter wavelet by 0.4s and switch on verbose mode, pass the
......
...@@ -51,4 +51,9 @@ transformed to the Fourier domain again. The values of the taper are: ...@@ -51,4 +51,9 @@ transformed to the Fourier domain again. The values of the taper are:
1 if t2 < t < t3 1 if t2 < t < t3
0.5+0.5*cos(pi*(t-t3)/(t3-t4)) if t3 <= t <= t4 0.5+0.5*cos(pi*(t-t3)/(t3-t4)) if t3 <= t <= t4
0 if t > t4 0 if t > t4
Time values are given in the same unit in which the sampling interval is given
in the input time series. I.e. if sampling interval is specified as a fraction
of seconds (which is standard) then all time values passed as parameters are
also given as fractions or multiples of seconds.
# ----- END OF stfinvfourier_description_usage.txt ----- # ----- END OF stfinvfourier_description_usage.txt -----
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
-----------------------------------------------------------------------------------------*/ -----------------------------------------------------------------------------------------*/
/* ---------------------------------------------------------------------- /* ----------------------------------------------------------------------
* This is program IFOS Version 2.0.2 * This is program IFOS Version 2.0.3
* Inversion of Full Observerd Seismograms * Inversion of Full Observerd Seismograms
* *
* ----------------------------------------------------------------------*/ * ----------------------------------------------------------------------*/
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
void info(FILE *fp){ void info(FILE *fp){
fprintf(fp," ***********************************************************\n"); fprintf(fp," ***********************************************************\n");
fprintf(fp," This is program IFOS2D. Version 2.0.2 \n"); fprintf(fp," This is program IFOS2D. Version 2.0.3 \n");
fprintf(fp," Parallel 2-D elastic Full Waveform Inversion code. \n"); fprintf(fp," Parallel 2-D elastic Full Waveform Inversion code. \n");
fprintf(fp," \n"); fprintf(fp," \n");
fprintf(fp," ***********************************************************\n"); fprintf(fp," ***********************************************************\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment