Commit 271eb05b authored by Daniel Leidert's avatar Daniel Leidert

New upstream version 190101

parent 24446daa
......@@ -2,9 +2,9 @@
# TRAVIS - Trajectory Analyzer and Visualizer
# http://www.travis-analyzer.de/
#
# Copyright (c) 2009-2017 Martin Brehm
# 2012-2017 Martin Thomas
# 2009-2017 Barbara Kirchner
# Copyright (c) 2009-2019 Martin Brehm
# 2012-2019 Martin Thomas
# 2016-2019 Sascha Gehrke
#
# This file written by Martin Brehm.
#
......
......@@ -3,11 +3,11 @@
*** TRAVIS - Trajectory Analyzer and Visualizer ***
***************************************************
http://www.travis-analyzer.de/
http://www.travis-analyzer.de/
Copyright (c) 2009-2017 Martin Brehm, University of Halle (Saale)
2012-2017 Martin Thomas
2009-2017 Barbara Kirchner, University of Bonn
Copyright (c) 2009-2019 Martin Brehm
2012-2019 Martin Thomas
2016-2019 Sascha Gehrke
Please read our article:
......
/*****************************************************************************
TRAVIS - Trajectory Analyzer and Visualizer
http://www.travis-analyzer.de/
Copyright (c) 2009-2017 Martin Brehm
2012-2017 Martin Thomas
Copyright (c) 2009-2019 Martin Brehm
2012-2019 Martin Thomas
2016-2019 Sascha Gehrke
This file written by Martin Brehm.
This file was written by Martin Brehm.
---------------------------------------------------------------------------
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -19,6 +24,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*****************************************************************************/
......@@ -29,6 +35,20 @@
#include "travis.h"
const char *GetRevisionInfo_2df(unsigned int len) {
static char buf[256];
GET_REVISION_INFO( buf, len );
return buf;
}
const char *GetSourceVersion_2df() {
static char buf[256];
GET_SOURCE_VERSION( buf );
return buf;
}
C2DF::C2DF()
{
m_sLabelX = NULL;
......@@ -43,14 +63,28 @@ C2DF::C2DF()
m_iPlotType = 1;
m_iSmoothGrade = 1;
m_iInterpolationOrder = 2;
m_fPlotExp = g_pDatabase->GetFloat("/PLOT2D/DEFAULTS/PLOT_EXP");
if (g_pDatabase != NULL)
m_fPlotExp = g_pDatabase->GetFloat("/PLOT2D/DEFAULTS/PLOT_EXP");
else
m_fPlotExp = 0.5;
m_iExpLegend = 1;
m_iColorScale = 1;
m_iGPInterpolation = 5;
m_bContourLines = true;
m_fAspectRatio = 1.0;
m_bDrawMesh = true;
if (g_pDatabase != NULL)
m_iPlotPixel = g_pDatabase->GetInt("/PLOT2D/DEFAULTS/IMAGE_RES");
else
m_iPlotPixel = 1000;
m_iPlotPixel = g_pDatabase->GetInt("/PLOT2D/DEFAULTS/IMAGE_RES");
if (g_pDatabase != NULL)
m_iContourLines = g_pDatabase->GetInt("/PLOT2D/DEFAULTS/CONTOUR_LINES");
else
m_iContourLines = 30;
m_oaCircles.SetName("C2DF::m_oaCircles");
}
......@@ -157,7 +191,7 @@ void C2DF::CorrectRadialDist(int channel)
{
for (z=0;z<m_iRes[0];z++)
{
d = mypow(m_fMinVal[0]+(z+1.0)/m_iRes[0]*(m_fMaxVal[0]-m_fMinVal[0]),3) - mypow(m_fMinVal[0]+((double)z)/m_iRes[0]*(m_fMaxVal[0]-m_fMinVal[0]),3);
d = pow3(m_fMinVal[0]+(z+1.0)/m_iRes[0]*(m_fMaxVal[0]-m_fMinVal[0])) - pow3(m_fMinVal[0]+((double)z)/m_iRes[0]*(m_fMaxVal[0]-m_fMinVal[0]));
for (z2=0;z2<m_iRes[1];z2++)
{
m_pBin[z2*m_iRes[0]+z] /= d;
......@@ -167,7 +201,7 @@ void C2DF::CorrectRadialDist(int channel)
{
for (z2=0;z2<m_iRes[1];z2++)
{
d = mypow(m_fMinVal[1]+(z2+1.0)/m_iRes[1]*(m_fMaxVal[1]-m_fMinVal[1]),3) - mypow(m_fMinVal[1]+((double)z2)/m_iRes[1]*(m_fMaxVal[1]-m_fMinVal[1]),3);
d = pow3(m_fMinVal[1]+(z2+1.0)/m_iRes[1]*(m_fMaxVal[1]-m_fMinVal[1])) - pow3(m_fMinVal[1]+((double)z2)/m_iRes[1]*(m_fMaxVal[1]-m_fMinVal[1]));
for (z=0;z<m_iRes[0];z++)
{
m_pBin[z2*m_iRes[0]+z] /= d;
......@@ -188,7 +222,7 @@ void C2DF::CorrectLiRadialDist(int channel)
{
for (z=0;z<m_iRes[0];z++)
{
d = mypow(m_fMinVal[0]+(z+1.0)/m_iRes[0]*(m_fMaxVal[0]-m_fMinVal[0]),2) - mypow(m_fMinVal[0]+((double)z)/m_iRes[0]*(m_fMaxVal[0]-m_fMinVal[0]),2);
d = pow2(m_fMinVal[0]+(z+1.0)/m_iRes[0]*(m_fMaxVal[0]-m_fMinVal[0])) - pow2(m_fMinVal[0]+((double)z)/m_iRes[0]*(m_fMaxVal[0]-m_fMinVal[0]));
for (z2=0;z2<m_iRes[1];z2++)
{
m_pBin[z2*m_iRes[0]+z] /= d;
......@@ -198,7 +232,7 @@ void C2DF::CorrectLiRadialDist(int channel)
{
for (z2=0;z2<m_iRes[1];z2++)
{
d = mypow(m_fMinVal[1]+(z2+1.0)/m_iRes[1]*(m_fMaxVal[1]-m_fMinVal[1]),2) - mypow(m_fMinVal[1]+((double)z2)/m_iRes[1]*(m_fMaxVal[1]-m_fMinVal[1]),2);
d = pow2(m_fMinVal[1]+(z2+1.0)/m_iRes[1]*(m_fMaxVal[1]-m_fMinVal[1])) - pow2(m_fMinVal[1]+((double)z2)/m_iRes[1]*(m_fMaxVal[1]-m_fMinVal[1]));
for (z=0;z<m_iRes[0];z++)
{
m_pBin[z2*m_iRes[0]+z] /= d;
......@@ -218,12 +252,12 @@ void C2DF::UnCorrectRadialDist(int channel)
{
for (z=0;z<m_iRes[0];z++)
for (z2=0;z2<m_iRes[1];z2++)
m_pBin[z2*m_iRes[0]+z] *= (double)(mypow(m_fMinVal[0]+(z+1.0)/m_iRes[0]*(m_fMaxVal[0]-m_fMinVal[0]),3) - mypow(m_fMinVal[0]+((double)z)/m_iRes[0]*(m_fMaxVal[0]-m_fMinVal[0]),3));
m_pBin[z2*m_iRes[0]+z] *= (double)(pow3(m_fMinVal[0]+(z+1.0)/m_iRes[0]*(m_fMaxVal[0]-m_fMinVal[0])) - pow3(m_fMinVal[0]+((double)z)/m_iRes[0]*(m_fMaxVal[0]-m_fMinVal[0])));
} else
{
for (z=0;z<m_iRes[0];z++)
for (z2=0;z2<m_iRes[1];z2++)
m_pBin[z2*m_iRes[0]+z] *= (double)(mypow(m_fMinVal[1]+(z2+1.0)/m_iRes[1]*(m_fMaxVal[1]-m_fMinVal[1]),3) - mypow(m_fMinVal[1]+((double)z2)/m_iRes[1]*(m_fMaxVal[1]-m_fMinVal[1]),3));
m_pBin[z2*m_iRes[0]+z] *= (double)(pow3(m_fMinVal[1]+(z2+1.0)/m_iRes[1]*(m_fMaxVal[1]-m_fMinVal[1])) - pow3(m_fMinVal[1]+((double)z2)/m_iRes[1]*(m_fMaxVal[1]-m_fMinVal[1])));
}
BTOUT;
}
......@@ -409,6 +443,43 @@ void C2DF::AddToBin_IntY(double x, int y, double val)
}
void C2DF::AddToBin_IntY(double x, int y)
{
BXIN;
double rx;
int ix;
if ((x < m_fMinVal[0]) || (x > m_fMaxVal[0]))
{
m_fSkipEntries++;
BXOUT;
return;
}
m_fBinEntries++;
rx = (x-m_fMinVal[0])*m_fFac[0] - 0.5;
ix = (int)floor(rx);
if (ix < 0)
{
ix = 0;
rx = 0;
} else if (ix > m_iRes[0]-2)
{
ix = m_iRes[0]-2;
rx = 1.0;
} else
rx -= ix;
m_pBin[ ix + y * m_iRes[0]] += (1.0-rx);
m_pBin[(ix+1) + y * m_iRes[0]] += rx ;
m_fCountY[y]++;
m_fCountX[ix ] += (1.0-rx);
m_fCountX[ix+1] += rx;
BXOUT;
}
/*void C2DF::AddToSingleBin(double x, double y, double val)
{
......@@ -542,12 +613,18 @@ void C2DF::Create()
m_fBinEntries = 0;
m_fSkipEntries = 0;
if (m_pStepsY != NULL)
delete[] m_pStepsY;
try { m_pStepsY = new unsigned long[m_iRes[1]]; } catch(...) { m_pStepsY = NULL; }
if (m_pStepsY == NULL) NewException((double)m_iRes[1]*sizeof(unsigned long),__FILE__,__LINE__,__PRETTY_FUNCTION__);
if (m_fCountX != NULL)
delete[] m_fCountX;
try { m_fCountX = new double[m_iRes[0]]; } catch(...) { m_fCountX = NULL; }
if (m_fCountX == NULL) NewException((double)m_iRes[0]*sizeof(double),__FILE__,__LINE__,__PRETTY_FUNCTION__);
if (m_fCountY != NULL)
delete[] m_fCountY;
try { m_fCountY = new double[m_iRes[1]]; } catch(...) { m_fCountY = NULL; }
if (m_fCountY == NULL) NewException((double)m_iRes[1]*sizeof(double),__FILE__,__LINE__,__PRETTY_FUNCTION__);
......@@ -560,8 +637,10 @@ void C2DF::Create()
m_fCountY[z] = 0;
}
try { m_pBin = new double[m_iRes[0]*m_iRes[1]]; } catch(...) { m_fCountY = NULL; }
if (m_fCountY == NULL) NewException((double)m_iRes[0]*m_iRes[1]*sizeof(double),__FILE__,__LINE__,__PRETTY_FUNCTION__);
if (m_pBin != NULL)
delete[] m_pBin;
try { m_pBin = new double[m_iRes[0]*m_iRes[1]]; } catch(...) { m_pBin = NULL; }
if (m_pBin == NULL) NewException((double)m_iRes[0]*m_iRes[1]*sizeof(double),__FILE__,__LINE__,__PRETTY_FUNCTION__);
for (z=0;z<m_iRes[0]*m_iRes[1];z++)
m_pBin[z] = 0;
......@@ -912,7 +991,7 @@ void C2DF::WriteGnuplotInput(const char *prefix, const char *name, const char *s
mfprintf(b,"# Draw contour lines (0 = No, 1 = Yes)\n");
mfprintf(b,"s_contour = %d\n",m_bContourLines?1:0);
mfprintf(b,"# Number of contour levels\n");
mfprintf(b,"s_ncontour = %lu\n",g_pDatabase->GetInt("/PLOT2D/DEFAULTS/CONTOUR_LINES"));
mfprintf(b,"s_ncontour = %lu\n",m_iContourLines);
mfprintf(b,"\n");
mfprintf(b,"# Plotting function\n");
if (m_iColorScale == 4) // Plus-Minus-Plot
......@@ -3256,7 +3335,7 @@ void C2DF::WriteMathematicaNb(const char *prefix, const char *name, const char *
mfprintf(a," \" \", \"see\", \" \", \"\\\"\\<Axis Properties\\>\\\"\"}], \" \", \"\\[Rule]\", \" \", \n");
mfprintf(a," \"\\\"\\<Mesh Properties\\>\\\"\"}]}]}], \"*)\"}], \"\\[IndentingNewLine]\", \n");
mfprintf(a," RowBox[{\n");
mfprintf(a," RowBox[{\"drawmesh\", \"=\", \"1\"}], \";\"}]}]], \"Input\"]\n");
mfprintf(a," RowBox[{\"drawmesh\", \"=\", \"%d\"}], \";\"}]}]], \"Input\"]\n",m_bDrawMesh?1:0);
mfprintf(a,"}, Open ]],\n");
mfprintf(a,"\n");
......@@ -3279,7 +3358,7 @@ void C2DF::WriteMathematicaNb(const char *prefix, const char *name, const char *
mfprintf(a," \"that\", \" \", \"will\", \" \", \"be\", \" \", \"displayed\"}], \" \", \"*)\"}], \n");
mfprintf(a," \"\\[IndentingNewLine]\", \n");
mfprintf(a," RowBox[{\n");
mfprintf(a," RowBox[{\"contours\", \"=\", \"%lu\"}], \";\"}]}]], \"Input\"],\n",g_pDatabase->GetInt("/PLOT2D/DEFAULTS/CONTOUR_LINES"));
mfprintf(a," RowBox[{\"contours\", \"=\", \"%lu\"}], \";\"}]}]], \"Input\"],\n",m_iContourLines);
mfprintf(a,"\n");
mfprintf(a,"Cell[BoxData[\n");
mfprintf(a," RowBox[{\n");
......@@ -5273,7 +5352,7 @@ void C2DF::NormalizeUniform(double fac)
r1 = m_fMinVal[0] + ((double)zx) / m_iRes[0] * (m_fMaxVal[0] - m_fMinVal[0]);
r2 = m_fMinVal[0] + (zx+1.0) / m_iRes[0] * (m_fMaxVal[0] - m_fMinVal[0]);
vol = 2.0/3.0*Pi * ( mypow(r2,3) * dca - mypow(r1,3) * dca );
vol = 2.0/3.0*Pi * ( pow3(r2) * dca - pow3(r1) * dca );
m_pBin[zy*m_iRes[0]+zx] *= fac / vol;
}
......
/*****************************************************************************
TRAVIS - Trajectory Analyzer and Visualizer
http://www.travis-analyzer.de/
Copyright (c) 2009-2017 Martin Brehm
2012-2017 Martin Thomas
Copyright (c) 2009-2019 Martin Brehm
2012-2019 Martin Thomas
2016-2019 Sascha Gehrke
This file written by Martin Brehm.
This file was written by Martin Brehm.
---------------------------------------------------------------------------
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -19,6 +24,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*****************************************************************************/
......@@ -83,6 +89,7 @@ public:
void AddToBin(double x, double y, double val);
void AddToBin_IntX(int x, double y, double val);
void AddToBin_IntY(double x, int y, double val);
void AddToBin_IntY(double x, int y);
// void AddToBin_IntX_fast(int x, double y);
// void AddToSingleBin(double x, double y, double val);
void NormalizeBin(double mi, double ma);
......@@ -136,6 +143,8 @@ public:
int m_iSmoothGrade;
int m_iInterpolationOrder;
double m_fPlotExp;
unsigned long m_iContourLines;
bool m_bDrawMesh;
int m_iExpLegend;
int m_iColorScale;
int m_iGPInterpolation;
......
/*****************************************************************************
TRAVIS - Trajectory Analyzer and Visualizer
http://www.travis-analyzer.de/
Copyright (c) 2009-2017 Martin Brehm
2012-2017 Martin Thomas
Copyright (c) 2009-2019 Martin Brehm
2012-2019 Martin Thomas
2016-2019 Sascha Gehrke
This file written by Martin Brehm.
This file was written by Martin Brehm.
---------------------------------------------------------------------------
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -19,6 +24,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*****************************************************************************/
......@@ -34,7 +40,7 @@
#include "2df.h"
#include "xmemfile.h"
#include "xstring.h"
#include "cc_cubeframe.h"
#include "bqb.h"
#include "fastatof.h"
......@@ -779,7 +785,7 @@ public:
{
for (z=0;z<m_iRes[0];z++)
{
d = (T)(mypow(m_fMinVal[0]+(z+1.0)/m_iRes[0]*(m_fMaxVal[0]-m_fMinVal[0]),3) - mypow(m_fMinVal[0]+((double)z)/m_iRes[0]*(m_fMaxVal[0]-m_fMinVal[0]),3));
d = (T)(pow3(m_fMinVal[0]+(z+1.0)/m_iRes[0]*(m_fMaxVal[0]-m_fMinVal[0])) - pow3(m_fMinVal[0]+((double)z)/m_iRes[0]*(m_fMaxVal[0]-m_fMinVal[0])));
// mprintf(" %d: %10G %10G\n",z,d,1.0/d);
for (z2=0;z2<m_iRes[1];z2++)
{
......@@ -793,7 +799,7 @@ public:
{
for (z2=0;z2<m_iRes[1];z2++)
{
d = (T)(mypow(m_fMinVal[1]+(z2+1.0)/m_iRes[1]*(m_fMaxVal[1]-m_fMinVal[1]),3) - mypow(m_fMinVal[1]+((double)z2)/m_iRes[1]*(m_fMaxVal[1]-m_fMinVal[1]),3));
d = (T)(pow3(m_fMinVal[1]+(z2+1.0)/m_iRes[1]*(m_fMaxVal[1]-m_fMinVal[1])) - pow3(m_fMinVal[1]+((double)z2)/m_iRes[1]*(m_fMaxVal[1]-m_fMinVal[1])));
// mprintf(" %d: %10G %10G\n",z2,d,1.0/d);
for (z=0;z<m_iRes[0];z++)
{
......@@ -807,7 +813,7 @@ public:
{
for (z3=0;z3<m_iRes[2];z3++)
{
d = (T)(mypow(m_fMinVal[2]+(z3+1.0)/m_iRes[2]*(m_fMaxVal[2]-m_fMinVal[2]),3) - mypow(m_fMinVal[2]+((double)z3)/m_iRes[2]*(m_fMaxVal[2]-m_fMinVal[2]),3));
d = (T)(pow3(m_fMinVal[2]+(z3+1.0)/m_iRes[2]*(m_fMaxVal[2]-m_fMinVal[2])) - pow3(m_fMinVal[2]+((double)z3)/m_iRes[2]*(m_fMaxVal[2]-m_fMinVal[2])));
// mprintf(" %d: %10G %10G\n",z3,d,1.0/d);
for (z=0;z<m_iRes[0];z++)
{
......@@ -1137,10 +1143,10 @@ public:
char buf[256], *p, *q;
T su, tf;
fgets(buf,256,a);
fgets(buf,256,a);
(void)fgets(buf,256,a);
(void)fgets(buf,256,a);
fgets(buf,256,a);
(void)fgets(buf,256,a);
p = buf;
while (*p == ' ')
p++;
......@@ -1150,7 +1156,7 @@ public:
ac = atoi(buf);
fgets(buf,256,a);
(void)fgets(buf,256,a);
p = buf;
while (*p == ' ')
p++;
......@@ -1159,7 +1165,7 @@ public:
*p = 0;
rx = atoi(buf);
fgets(buf,256,a);
(void)fgets(buf,256,a);
p = buf;
while (*p == ' ')
p++;
......@@ -1168,7 +1174,7 @@ public:
*p = 0;
ry = atoi(buf);
fgets(buf,256,a);
(void)fgets(buf,256,a);
p = buf;
while (*p == ' ')
p++;
......@@ -1178,7 +1184,7 @@ public:
rz = atoi(buf);
for (z=0;z<ac;z++)
fgets(buf,256,a);
(void)fgets(buf,256,a);
if (feof(a))
{
......@@ -1226,7 +1232,7 @@ public:
while (!feof(a))
{
_read:
fgets(buf,256,a);
(void)fgets(buf,256,a);
if (feof(a))
break;
p = buf;
......@@ -1308,7 +1314,7 @@ public:
while (!feof(a))
{
_read:
fgets(buf,256,a);
(void)fgets(buf,256,a);
if (feof(a))
break;
p = buf;
......@@ -1448,14 +1454,14 @@ public:
}
void ReadCubeData(CCubeFrame *cfr, bool verbose)
void ReadCubeData(CBQBCubeFrame *cfr, bool verbose)
{
BTIN;
int ix, iy, iz;
T su;
if (verbose)
mprintf(">>> ReadCubeData(CCubeFrame*) >>>\n");
mprintf(">>> ReadCubeData(CBQBCubeFrame*) >>>\n");
if (verbose)
{
......@@ -1561,7 +1567,7 @@ public:
}
if (verbose)
mprintf("<<< ReadCubeData(CCubeFrame*) <<<\n");
mprintf("<<< ReadCubeData(CBQBCubeFrame*) <<<\n");
BTOUT;
}
......@@ -1575,10 +1581,10 @@ public:
T su, tf;
mf->Seek(0);
mf->fgets(buf,256);
mf->fgets(buf,256);
(void)mf->fgets(buf,256);
(void)mf->fgets(buf,256);
mf->fgets(buf,256);
(void)mf->fgets(buf,256);
p = buf;
while (*p == ' ')
p++;
......@@ -1588,7 +1594,7 @@ public:
ac = atoi(buf);
mf->fgets(buf,256);
(void)mf->fgets(buf,256);
p = buf;
while (*p == ' ')
p++;
......@@ -1597,7 +1603,7 @@ public:
*p = 0;
rx = atoi(buf);
mf->fgets(buf,256);
(void)mf->fgets(buf,256);
p = buf;
while (*p == ' ')
p++;
......@@ -1606,7 +1612,7 @@ public:
*p = 0;
ry = atoi(buf);
mf->fgets(buf,256);
(void)mf->fgets(buf,256);
p = buf;
while (*p == ' ')
p++;
......@@ -1616,7 +1622,7 @@ public:
rz = atoi(buf);
for (z=0;z<ac;z++)
mf->fgets(buf,256);
(void)mf->fgets(buf,256);
if (mf->Eof())
{
......@@ -1664,7 +1670,7 @@ public:
while (!mf->Eof())
{
_read:
mf->fgets(buf,256);
(void)mf->fgets(buf,256);
if (mf->Eof())
break;
p = buf;
......@@ -1751,7 +1757,7 @@ public:
while (!mf->Eof())
{
_read:
mf->fgets(buf,256);
(void)mf->fgets(buf,256);
if (mf->Eof())
break;
p = buf;
......
/*****************************************************************************
TRAVIS - Trajectory Analyzer and Visualizer
http://www.travis-analyzer.de/
Copyright (c) 2009-2017 Martin Brehm
2012-2017 Martin Thomas
Copyright (c) 2009-2019 Martin Brehm
2012-2019 Martin Thomas
2016-2019 Sascha Gehrke
This file was written by Martin Brehm.
This file written by Martin Brehm.
---------------------------------------------------------------------------
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -19,6 +24,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*****************************************************************************/
......@@ -30,12 +36,27 @@
#include "maintools.h"
const char *GetRevisionInfo_acf(unsigned int len) {
static char buf[256];
GET_REVISION_INFO( buf, len );
return buf;
}
const char *GetSourceVersion_acf() {
static char buf[256];
GET_SOURCE_VERSION( buf );
return buf;
}
CACF::CACF()
{
BTIN;
m_pData = NULL;
m_pCounter = NULL;
m_iShowMol = -1;
// m_bSplitCart = false;
// m_b2ndDerivative = false;
m_oaCache.SetName("CACF::m_oaCache");
m_oaCCRMatrix.SetName("CACF::m_oaCCRMatrix");
......@@ -156,7 +177,7 @@ void CACF::Window()
BTIN;
int z;
for (z=0;z<m_iSize;z++)
m_pData[z] *= (double)mypow(cos((double)z/m_iSize*Pi),2);
m_pData[z] *= (double)pow2(cos((double)z/m_iSize*Pi));
BTOUT;
}
......@@ -258,6 +279,9 @@ void CACF::Parse()
double tf;
CFFT tfft;
eprintf("CACF::Parse(): Internal Error: This code is no longer in use.\n");
abort();
if (m_iShowMol != -1)
{
_atoms:
......@@ -327,6 +351,12 @@ _r0done:;
m_bMassWeight = AskYesNo(" Weight the autocorrelation functions by atomic mass (y/n)? [yes] ",true);
m_bWindowFunction = AskYesNo(" Apply window function (Cos^2) to Autocorrelation function (y/n)? [yes] ",true);
// mprintf("\n");
// if (g_bPowerSpec)
// m_bSplitCart = AskYesNo(" Split this power spectrum into cartesian contributions x, y, z, xy, xz, yz (y/n)? [no] ",false);
// else
// m_bSplitCart = AskYesNo(" Split this autocorrelation into cartesian contributions x, y, z, xy, xz, yz (y/n)? [no] ",false);
// m_bSpectrum = AskYesNo(" Also calculate power spectrum (= Fourier Transform of velocity ACF) (y/n)? [yes] ",true);
m_bSpectrum = g_bPowerSpec;
......
/*****************************************************************************
TRAVIS - Trajectory Analyzer and Visualizer
http://www.travis-analyzer.de/
Copyright (c) 2009-2017 Martin Brehm
2012-2017 Martin Thomas
Copyright (c) 2009-2019 Martin Brehm
2012-2019 Martin Thomas
2016-2019 Sascha Gehrke
This file was written by Martin Brehm.
This file written by Martin Brehm.
---------------------------------------------------------------------------
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -19,6 +24,7 @@
You should have received a copy of the GNU General Public License