Skip to content

Commit

Permalink
Switched pelton and colecole index for IP modelling in Matlab
Browse files Browse the repository at this point in the history
Allowed line number in index 0 for ctlinedata programs
Updated version to v2.0.1-Release-20240619
  • Loading branch information
rcb547 committed Jun 19, 2024
1 parent cea81db commit 78e5b9a
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 28 deletions.
15 changes: 8 additions & 7 deletions matlab/gatdaem1d_functions/gatdaem1d_forwardmodel.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,34 +11,35 @@

nlayers=length(E.conductivity);
if(nlayers ~= 1+length(E.thickness))
error('Sorry the size of thicknesses must be one less than the size of conductivity');;
error('Sorry the length of thicknesses must be one less than the length of conductivity');;
end

if(nargin == 4)
if(strcmpi(iptypestr,'colecole'))
iptype=0;
elseif(strcmpi(iptypestr,'pelton'))
iptype=1;
elseif(strcmpi(iptypestr,'pelton'))
iptype=2;
else
error('Sorry iptypestr must "colecole" or "pelton"');
error('Sorry for IP modelling iptypestr must be either "colecole" or "pelton"');
end


if(isfield(E,'chargeability'))
if(nlayers ~= length(E.chargeability))
error('Sorry the size of chargeability must equal to the size of conductivity');;
error('Sorry the length of chargeability must equal to the length of conductivity');;
end

if(isfield(E,'timeconstant'))
if(nlayers ~= length(E.timeconstant))
error('Sorry the size of timeconstant must be equal to the size of conductivity');;
error('Sorry the length of timeconstant must be equal to the length of conductivity');;
end
else
error('Sorry you must set the timeconstant');;
end

if(isfield(E,'frequencydependence'))
if(nlayers ~= length(E.frequencydependence))
error('Sorry the size of frequencydependence must equal to the size of conductivity');;
error('Sorry the length of frequencydependence must equal to the length of conductivity');;
end
else
error('Sorry you must set the frequencedependence');;
Expand Down
2 changes: 1 addition & 1 deletion python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
package_dir={'gatdaem1d':'gatdaem1d'},
package_data={'gatdaem1d':['gatdaem1d.so', 'gatdaem1d.dll']},
scripts=[],
version=2.0,
version='2.0.1',
description='Time-domain airborne electromagnetic forward modelling.',
long_description='Time-domain airborne electromagnetic forward modelling. Python interface to C++ library for forward model and derivative calculations for airborne electromagnetic (AEM) systems used in geophysics.',
classifiers=[
Expand Down
6 changes: 3 additions & 3 deletions src/ctlinedata2curtainimage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -924,11 +924,11 @@ int main(int argc, char** argv)
cBlock sb = b.findblock("Section");
std::string headerfile;
if (ib.getvalue("DfnFile", headerfile) == true) {
glog.logmsg("Headerfile = %s'\n",headerfile.c_str());
glog.logmsg("Headerfile = %s\n",headerfile.c_str());
glog.logmsg("Note: in future please use 'HeaderFile = ...' instead of 'DfnFile = ...'\n");
}
else if (ib.getvalue("HeaderFile", headerfile) == true) {
glog.logmsg("Headerfile = %s'\n", headerfile.c_str());
glog.logmsg("Headerfile = %s\n", headerfile.c_str());
}
else {
glog.logmsg("No Headerfile defined, columns numbers to be used'\n");
Expand Down Expand Up @@ -960,7 +960,7 @@ int main(int argc, char** argv)
}
}

if (linefieldindex <= 0) {
if (linefieldindex < 0) {
glog.logmsg("Error: cannot find the line field %s\n",linefieldname.c_str());
return 0;
}
Expand Down
8 changes: 4 additions & 4 deletions src/ctlinedata2georefimage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -569,14 +569,14 @@ int main(int argc, char** argv)
cBlock sb = b.findblock("Section");
std::string headerfile;
if (ib.getvalue("DfnFile", headerfile) == true) {
glog.logmsg("Headerfile = %s'\n", headerfile.c_str());
glog.logmsg("Headerfile = %s\n", headerfile.c_str());
glog.logmsg("Note: in future please use 'HeaderFile = ...' instead of 'DfnFile = ...'\n");
}
else if (ib.getvalue("HeaderFile", headerfile) == true) {
glog.logmsg("Headerfile = %s'\n", headerfile.c_str());
glog.logmsg("Headerfile = %s\n", headerfile.c_str());
}
else {
glog.logmsg("No Headerfile defined, columns numbers to be used'\n");
glog.logmsg("No Headerfile defined, columns numbers to be used\n");
}

int linefieldindex = -1;
Expand Down Expand Up @@ -605,7 +605,7 @@ int main(int argc, char** argv)
}
}

if (linefieldindex <= 0) {
if (linefieldindex < 0) {
glog.logmsg("Error: cannot find the line field %s\n", linefieldname.c_str());
return 0;
}
Expand Down
6 changes: 3 additions & 3 deletions src/ctlinedata2sgrid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -469,11 +469,11 @@ int main(int argc, char** argv)

std::string headerfile;
if (ib.getvalue("DfnFile", headerfile) == true) {
glog.logmsg("Headerfile = %s'\n", headerfile.c_str());
glog.logmsg("Headerfile = %s\n", headerfile.c_str());
glog.logmsg("Note: in future please use 'HeaderFile = ...' instead of 'DfnFile = ...'\n");
}
else if (ib.getvalue("HeaderFile", headerfile) == true) {
glog.logmsg("Headerfile = %s'\n", headerfile.c_str());
glog.logmsg("Headerfile = %s\n", headerfile.c_str());
}
else {
glog.logmsg("No Headerfile defined, columns numbers to be used'\n");
Expand Down Expand Up @@ -505,7 +505,7 @@ int main(int argc, char** argv)
}
}

if (linefieldindex <= 0) {
if (linefieldindex < 0) {
glog.logmsg("Error: cannot find the line field %s\n", linefieldname.c_str());
return 0;
}
Expand Down
4 changes: 2 additions & 2 deletions src/ctlinedata2slicegrids.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -267,11 +267,11 @@ class cSliceGridder {

HeaderFile = undefinedvalue<std::string>();
if (b.getvalue("DfnFile", HeaderFile) == true) {
glog.logmsg("Headerfile = %s'\n", HeaderFile.c_str());
glog.logmsg("Headerfile = %s\n", HeaderFile.c_str());
glog.logmsg("Note: in future please use 'HeaderFile = ...' instead of 'DfnFile = ...'\n");
}
else if (b.getvalue("HeaderFile", HeaderFile) == true) {
glog.logmsg("Headerfile = %s'\n", HeaderFile.c_str());
glog.logmsg("Headerfile = %s\n", HeaderFile.c_str());
}
else {
glog.logmsg("No Headerfile defined, columns numbers to be used'\n");
Expand Down
2 changes: 1 addition & 1 deletion src/gaaem_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ Author: Ross C. Brodie, Geoscience Australia.
#ifndef _gaaem_version_H
#define _gaaem_version_H

constexpr auto GAAEM_VERSION = "v2.0.0-Release-20240424";
constexpr auto GAAEM_VERSION = "v2.0.1-Release-20240619";

#endif
14 changes: 7 additions & 7 deletions visualstudio/ctlinedata2curtainimage/ctlinedata2curtainimage.sln
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Express 2013 for Windows Desktop
VisualStudioVersion = 12.0.31101.0
# Visual Studio Version 17
VisualStudioVersion = 17.9.34728.123
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ctlinedata2curtainimage", "ctlinedata2curtainimage.vcxproj", "{F2C8E4EA-11EA-4AB5-9D36-624F29CE131D}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ctlinedata2curtainimage", "ctlinedata2curtainimage.vcxproj", "{C63C0B65-EB12-41CF-A77C-C3EE5B3C7560}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{F2C8E4EA-11EA-4AB5-9D36-624F29CE131D}.Debug|x64.ActiveCfg = Debug|x64
{F2C8E4EA-11EA-4AB5-9D36-624F29CE131D}.Debug|x64.Build.0 = Debug|x64
{F2C8E4EA-11EA-4AB5-9D36-624F29CE131D}.Release|x64.ActiveCfg = Release|x64
{F2C8E4EA-11EA-4AB5-9D36-624F29CE131D}.Release|x64.Build.0 = Release|x64
{C63C0B65-EB12-41CF-A77C-C3EE5B3C7560}.Debug|x64.ActiveCfg = Debug|x64
{C63C0B65-EB12-41CF-A77C-C3EE5B3C7560}.Debug|x64.Build.0 = Debug|x64
{C63C0B65-EB12-41CF-A77C-C3EE5B3C7560}.Release|x64.ActiveCfg = Release|x64
{C63C0B65-EB12-41CF-A77C-C3EE5B3C7560}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down

0 comments on commit 78e5b9a

Please sign in to comment.