~ubuntu-branches/ubuntu/trusty/travis/trusty-proposed

« back to all changes in this revision

Viewing changes to src/xdf.cpp

  • Committer: Package Import Robot
  • Author(s): Daniel Leidert
  • Date: 2014-01-18 20:07:16 UTC
  • mfrom: (1.1.8)
  • Revision ID: package-import@ubuntu.com-20140118200716-whsmcg7fa1eyqecq
Tags: 140117-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*****************************************************************************
2
 
    TRAVIS - Trajectory Analyzer and Visualizer
3
 
    http://www.travis-analyzer.de/
4
 
 
5
 
    Copyright (c) 2009-2013 Martin Brehm
6
 
                  2012-2013 Martin Thomas
7
 
 
8
 
    This file written by Martin Brehm.
9
 
 
10
 
    This program is free software: you can redistribute it and/or modify
11
 
    it under the terms of the GNU General Public License as published by
12
 
    the Free Software Foundation, either version 3 of the License, or
13
 
    (at your option) any later version.
14
 
 
15
 
    This program is distributed in the hope that it will be useful,
16
 
    but WITHOUT ANY WARRANTY; without even the implied warranty of
17
 
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
 
    GNU General Public License for more details.
19
 
 
20
 
    You should have received a copy of the GNU General Public License
21
 
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
22
 
*****************************************************************************/
23
 
 
24
 
#include "xdf.h"
25
 
#include "globalvar.h"
26
 
#include "maintools.h"
27
 
 
28
 
 
29
 
CXDF::CXDF()
30
 
{
31
 
        m_iDeriv = 0;
32
 
        m_bACF = false;
33
 
        m_bACFFFT = false;
34
 
        m_sName = NULL;
35
 
        m_sShortName = NULL;
36
 
        m_faData = NULL;
37
 
        m_baDataEnabled = NULL;
38
 
}
39
 
 
40
 
 
41
 
CXDF::~CXDF()
42
 
{
43
 
}
44
 
 
45
 
 
46
 
void CXDF::ParseDeriv()
47
 
{
48
 
//      int ti;
49
 
 
50
 
        if (!g_bAdvanced2)
51
 
                m_iDeriv = 0;
52
 
                        else m_iDeriv = AskUnsignedInteger("    Use values (0), 1st time derivative (1), or 2nd time derivative (2) of the values? [0] ",0);
53
 
 
54
 
        if (m_iDeriv != 0)
55
 
        {
56
 
                g_bDeriv = true;
57
 
                m_bDerivAbs = AskYesNo("    Take the absolute values of the derivatives (y/n)? [no] ",false);
58
 
                m_bACF = AskYesNo("    Autocorrelate derived values (y/n)? [no] ",false);
59
 
                if (m_bACF)
60
 
                {
61
 
                        eprintf("\n    This feature is not working yet.\n\n");
62
 
                        m_bACF = false;
63
 
                }
64
 
/*              if (m_bACF)
65
 
                {
66
 
                        m_iACFDepth = AskUnsignedInteger("    Enter depth of the autocorrelation in time steps: [10000] ",10000);
67
 
                        ti = CalcFFTSize(m_iACFDepth,false);
68
 
                        if (m_iACFDepth != ti)
69
 
                        {
70
 
                                mprintf(WHITE,"\nThe next \"fast\" size for autocorrelation is %d. Using this instead of %d as depth.\n",ti,m_iACFDepth);
71
 
                                m_iACFDepth = ti;
72
 
                        }
73
 
 
74
 
                        m_bACFFFT = AskYesNo("    Calculate the fourier transform of the autocorrelation (y/n)? [yes] ",true);
75
 
                        if (m_bACFFFT)
76
 
                        {
77
 
                                m_bWindowFunction = AskYesNo("    Apply window function (Cos^2) to Autocorrelation function (y/n)? [yes] ",true);
78
 
                                m_fSpecWaveNumber = AskFloat("    Calculate spectrum up to which wave number (cm^-1) (0=full spectrum)? [4000cm^-1] ",4000.0);
79
 
                                m_iMirror = AskUnsignedInteger("    No mirroring (0), short-time enhancing (1) or long-time enhancing (2)? [0] ",0);
80
 
                                m_iZeroPadding = AskUnsignedInteger("    Zero Padding: How many zeros to insert? [%d] ",m_iACFDepth*3,m_iACFDepth*3);
81
 
 
82
 
                                ti = CalcFFTSize(m_iACFDepth+m_iZeroPadding,false);
83
 
                                if (m_iACFDepth+m_iZeroPadding != ti)
84
 
                                {
85
 
                                        mprintf(WHITE,"\nThe next \"fast\" size for FFT is %d. Using %d zeros for zero padding.\n",ti,ti-m_iACFDepth);
86
 
                                        m_iZeroPadding = ti-m_iACFDepth;
87
 
                                }
88
 
 
89
 
                                m_bACF_DB = AskYesNo("    Convert intensity axis of spectrum to decibel (y/n)? [no] ",false);
90
 
                        }
91
 
                }*/
92
 
        }
93
 
}
94
 
 
95
 
 
96
 
void CXDF::InitDeriv()
97
 
{
98
 
        int z2;
99
 
        CxFloatArray *ptfa;
100
 
 
101
 
        try { m_pfaDerivBuffer = new CxDoubleArray*[3]; } catch(...) { m_pfaDerivBuffer = NULL; }
102
 
        if (m_pfaDerivBuffer == NULL) NewException((double)3*sizeof(CxDoubleArray*),__FILE__,__LINE__,__PRETTY_FUNCTION__);
103
 
        
104
 
        for (z2=0;z2<3;z2++)
105
 
        {
106
 
                try { m_pfaDerivBuffer[z2] = new CxDoubleArray("CXDF::m_pfaDerivBuffer[z2]"); } catch(...) { m_pfaDerivBuffer[z2] = NULL; }
107
 
                if (m_pfaDerivBuffer[z2] == NULL) NewException((double)sizeof(CxDoubleArray),__FILE__,__LINE__,__PRETTY_FUNCTION__);
108
 
                
109
 
                if (m_bSelf)
110
 
                        m_pfaDerivBuffer[z2]->SetSize(((CMolecule*)g_oaMolecules[g_iFixMol])->m_laSingleMolIndex.GetSize()*m_iCombinations);
111
 
                                else m_pfaDerivBuffer[z2]->SetSize(((CMolecule*)g_oaMolecules[g_iFixMol])->m_laSingleMolIndex.GetSize()*((CMolecule*)g_oaMolecules[m_iShowMol])->m_laSingleMolIndex.GetSize()*m_iCombinations);
112
 
 
113
 
        }
114
 
        if (m_bACF)
115
 
        {
116
 
                if (m_bSelf)
117
 
                {
118
 
                        try { m_pfaACFBuffer = new CxFloatArray*[((CMolecule*)g_oaMolecules[g_iFixMol])->m_laSingleMolIndex.GetSize()*m_iCombinations]; } catch(...) { m_pfaACFBuffer = NULL; }
119
 
                        if (m_pfaACFBuffer == NULL) NewException((double)((CMolecule*)g_oaMolecules[g_iFixMol])->m_laSingleMolIndex.GetSize()*m_iCombinations*sizeof(CxFloatArray*),__FILE__,__LINE__,__PRETTY_FUNCTION__);
120
 
                        
121
 
                        for (z2=0;z2<((CMolecule*)g_oaMolecules[g_iFixMol])->m_laSingleMolIndex.GetSize()*m_iCombinations;z2++)
122
 
                        {
123
 
                                try { ptfa = new CxFloatArray("CXDF::InitDeriv():ptfa"); } catch(...) { ptfa = NULL; }
124
 
                                if (ptfa == NULL) NewException((double)sizeof(CxFloatArray),__FILE__,__LINE__,__PRETTY_FUNCTION__);
125
 
                                
126
 
                                if (g_iTrajSteps != -1)
127
 
                                {
128
 
                                        ptfa->SetMaxSize((long)(g_iTrajSteps*1.1));
129
 
                                        ptfa->SetGrow((long)(g_iTrajSteps*0.1));
130
 
                                } else ptfa->SetGrow(1000);
131
 
                                m_pfaACFBuffer[z2] = ptfa;
132
 
                        }
133
 
                } else
134
 
                {
135
 
                        try { m_pfaACFBuffer = new CxFloatArray*[((CMolecule*)g_oaMolecules[g_iFixMol])->m_laSingleMolIndex.GetSize()*((CMolecule*)g_oaMolecules[m_iShowMol])->m_laSingleMolIndex.GetSize()*m_iCombinations]; } catch(...) { m_pfaACFBuffer = NULL; }
136
 
                        if (m_pfaACFBuffer == NULL) NewException((double)((CMolecule*)g_oaMolecules[g_iFixMol])->m_laSingleMolIndex.GetSize()*((CMolecule*)g_oaMolecules[m_iShowMol])->m_laSingleMolIndex.GetSize()*m_iCombinations*sizeof(CxFloatArray*),__FILE__,__LINE__,__PRETTY_FUNCTION__);
137
 
                        
138
 
                        for (z2=0;z2<((CMolecule*)g_oaMolecules[g_iFixMol])->m_laSingleMolIndex.GetSize()*((CMolecule*)g_oaMolecules[m_iShowMol])->m_laSingleMolIndex.GetSize()*m_iCombinations;z2++)
139
 
                        {
140
 
                                try { ptfa = new CxFloatArray("CXDF::InitDeriv():ptfa"); } catch(...) { ptfa = NULL; }
141
 
                                if (ptfa == NULL) NewException((double)sizeof(CxFloatArray),__FILE__,__LINE__,__PRETTY_FUNCTION__);
142
 
                                
143
 
                                if (g_iTrajSteps != -1)
144
 
                                {
145
 
                                        ptfa->SetMaxSize((long)(g_iTrajSteps*1.1));
146
 
                                        ptfa->SetGrow((long)(g_iTrajSteps*0.1));
147
 
                                } else ptfa->SetGrow(1000);
148
 
                                m_pfaACFBuffer[z2] = ptfa;
149
 
                        }
150
 
                }
151
 
        }
152
 
}
153
 
 
154
 
 
155
 
void CXDF::Autocorrelate()
156
 
{
157
 
        int n, z, z2;
158
 
        double tfs;
159
 
        CAutoCorrelation *ac;
160
 
        CxFloatArray *ptfa;
161
 
 
162
 
        if (m_bSelf)
163
 
                n = ((CMolecule*)g_oaMolecules[g_iFixMol])->m_laSingleMolIndex.GetSize()*m_iCombinations;
164
 
                        else n = ((CMolecule*)g_oaMolecules[g_iFixMol])->m_laSingleMolIndex.GetSize()*((CMolecule*)g_oaMolecules[m_iShowMol])->m_laSingleMolIndex.GetSize()*m_iCombinations;
165
 
 
166
 
        tfs = n/60.0;
167
 
        mprintf("    Autocorrelating cached values...\n");
168
 
        mprintf(WHITE,"      [");
169
 
 
170
 
        try { ptfa = new CxFloatArray("CXDF::Autocorrelate():ptfa"); } catch(...) { ptfa = NULL; }
171
 
        if (ptfa == NULL) NewException((double)sizeof(CxFloatArray),__FILE__,__LINE__,__PRETTY_FUNCTION__);
172
 
        
173
 
        ptfa->SetSize(m_pfaACFBuffer[0]->GetSize());
174
 
 
175
 
        try { ac = new CAutoCorrelation(); } catch(...) { ac = NULL; }
176
 
        if (ac == NULL) NewException((double)sizeof(CAutoCorrelation),__FILE__,__LINE__,__PRETTY_FUNCTION__);
177
 
        
178
 
        ac->Init(m_pfaACFBuffer[0]->GetSize(),m_iACFDepth,true);
179
 
        m_faACF.SetSize(m_iACFDepth);
180
 
        for (z=0;z<m_iACFDepth;z++)
181
 
                m_faACF[z] = 0;
182
 
        for (z=0;z<n;z++)
183
 
        {
184
 
                if (fmod(z,tfs) < 1.0)
185
 
                        mprintf(WHITE,"#");
186
 
 
187
 
                ac->AutoCorrelate(m_pfaACFBuffer[z],ptfa);
188
 
                for (z2=0;z2<m_iACFDepth;z2++)
189
 
                        m_faACF[z2] += (double)(*ptfa)[z2];
190
 
        }
191
 
        delete ac;
192
 
        delete ptfa;
193
 
        for (z=1;z<m_iACFDepth;z++)
194
 
                m_faACF[z] /= m_faACF[0];
195
 
        m_faACF[0] = 1.0f;
196
 
        mprintf(WHITE,"]\n");
197
 
}
 
1
/*****************************************************************************
 
2
    TRAVIS - Trajectory Analyzer and Visualizer
 
3
    http://www.travis-analyzer.de/
 
4
 
 
5
    Copyright (c) 2009-2014 Martin Brehm
 
6
                  2012-2014 Martin Thomas
 
7
 
 
8
    This file written by Martin Brehm.
 
9
 
 
10
    This program is free software: you can redistribute it and/or modify
 
11
    it under the terms of the GNU General Public License as published by
 
12
    the Free Software Foundation, either version 3 of the License, or
 
13
    (at your option) any later version.
 
14
 
 
15
    This program is distributed in the hope that it will be useful,
 
16
    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
17
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
18
    GNU General Public License for more details.
 
19
 
 
20
    You should have received a copy of the GNU General Public License
 
21
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
22
*****************************************************************************/
 
23
 
 
24
#include "xdf.h"
 
25
#include "globalvar.h"
 
26
#include "maintools.h"
 
27
 
 
28
 
 
29
CXDF::CXDF()
 
30
{
 
31
        m_iDeriv = 0;
 
32
        m_bACF = false;
 
33
        m_bACFFFT = false;
 
34
        m_sName = NULL;
 
35
        m_sShortName = NULL;
 
36
        m_faData = NULL;
 
37
        m_baDataEnabled = NULL;
 
38
}
 
39
 
 
40
 
 
41
CXDF::~CXDF()
 
42
{
 
43
}
 
44
 
 
45
 
 
46
void CXDF::ParseDeriv()
 
47
{
 
48
//      int ti;
 
49
 
 
50
        if (!g_bAdvanced2)
 
51
                m_iDeriv = 0;
 
52
                        else m_iDeriv = AskUnsignedInteger("    Use values (0), 1st time derivative (1), or 2nd time derivative (2) of the values? [0] ",0);
 
53
 
 
54
        if (m_iDeriv != 0)
 
55
        {
 
56
                g_bDeriv = true;
 
57
                m_bDerivAbs = AskYesNo("    Take the absolute values of the derivatives (y/n)? [no] ",false);
 
58
                m_bACF = AskYesNo("    Autocorrelate derived values (y/n)? [no] ",false);
 
59
                if (m_bACF)
 
60
                {
 
61
                        eprintf("\n    This feature is not working yet.\n\n");
 
62
                        m_bACF = false;
 
63
                }
 
64
/*              if (m_bACF)
 
65
                {
 
66
                        m_iACFDepth = AskUnsignedInteger("    Enter depth of the autocorrelation in time steps: [10000] ",10000);
 
67
                        ti = CalcFFTSize(m_iACFDepth,false);
 
68
                        if (m_iACFDepth != ti)
 
69
                        {
 
70
                                mprintf(WHITE,"\nThe next \"fast\" size for autocorrelation is %d. Using this instead of %d as depth.\n",ti,m_iACFDepth);
 
71
                                m_iACFDepth = ti;
 
72
                        }
 
73
 
 
74
                        m_bACFFFT = AskYesNo("    Calculate the fourier transform of the autocorrelation (y/n)? [yes] ",true);
 
75
                        if (m_bACFFFT)
 
76
                        {
 
77
                                m_bWindowFunction = AskYesNo("    Apply window function (Cos^2) to Autocorrelation function (y/n)? [yes] ",true);
 
78
                                m_fSpecWaveNumber = AskFloat("    Calculate spectrum up to which wave number (cm^-1) (0=full spectrum)? [4000cm^-1] ",4000.0);
 
79
                                m_iMirror = AskUnsignedInteger("    No mirroring (0), short-time enhancing (1) or long-time enhancing (2)? [0] ",0);
 
80
                                m_iZeroPadding = AskUnsignedInteger("    Zero Padding: How many zeros to insert? [%d] ",m_iACFDepth*3,m_iACFDepth*3);
 
81
 
 
82
                                ti = CalcFFTSize(m_iACFDepth+m_iZeroPadding,false);
 
83
                                if (m_iACFDepth+m_iZeroPadding != ti)
 
84
                                {
 
85
                                        mprintf(WHITE,"\nThe next \"fast\" size for FFT is %d. Using %d zeros for zero padding.\n",ti,ti-m_iACFDepth);
 
86
                                        m_iZeroPadding = ti-m_iACFDepth;
 
87
                                }
 
88
 
 
89
                                m_bACF_DB = AskYesNo("    Convert intensity axis of spectrum to decibel (y/n)? [no] ",false);
 
90
                        }
 
91
                }*/
 
92
        }
 
93
}
 
94
 
 
95
 
 
96
void CXDF::InitDeriv()
 
97
{
 
98
        int z2;
 
99
        CxFloatArray *ptfa;
 
100
 
 
101
        try { m_pfaDerivBuffer = new CxDoubleArray*[3]; } catch(...) { m_pfaDerivBuffer = NULL; }
 
102
        if (m_pfaDerivBuffer == NULL) NewException((double)3*sizeof(CxDoubleArray*),__FILE__,__LINE__,__PRETTY_FUNCTION__);
 
103
        
 
104
        for (z2=0;z2<3;z2++)
 
105
        {
 
106
                try { m_pfaDerivBuffer[z2] = new CxDoubleArray("CXDF::m_pfaDerivBuffer[z2]"); } catch(...) { m_pfaDerivBuffer[z2] = NULL; }
 
107
                if (m_pfaDerivBuffer[z2] == NULL) NewException((double)sizeof(CxDoubleArray),__FILE__,__LINE__,__PRETTY_FUNCTION__);
 
108
                
 
109
                if (m_bSelf)
 
110
                        m_pfaDerivBuffer[z2]->SetSize(((CMolecule*)g_oaMolecules[g_iFixMol])->m_laSingleMolIndex.GetSize()*m_iCombinations);
 
111
                                else m_pfaDerivBuffer[z2]->SetSize(((CMolecule*)g_oaMolecules[g_iFixMol])->m_laSingleMolIndex.GetSize()*((CMolecule*)g_oaMolecules[m_iShowMol])->m_laSingleMolIndex.GetSize()*m_iCombinations);
 
112
 
 
113
        }
 
114
        if (m_bACF)
 
115
        {
 
116
                if (m_bSelf)
 
117
                {
 
118
                        try { m_pfaACFBuffer = new CxFloatArray*[((CMolecule*)g_oaMolecules[g_iFixMol])->m_laSingleMolIndex.GetSize()*m_iCombinations]; } catch(...) { m_pfaACFBuffer = NULL; }
 
119
                        if (m_pfaACFBuffer == NULL) NewException((double)((CMolecule*)g_oaMolecules[g_iFixMol])->m_laSingleMolIndex.GetSize()*m_iCombinations*sizeof(CxFloatArray*),__FILE__,__LINE__,__PRETTY_FUNCTION__);
 
120
                        
 
121
                        for (z2=0;z2<((CMolecule*)g_oaMolecules[g_iFixMol])->m_laSingleMolIndex.GetSize()*m_iCombinations;z2++)
 
122
                        {
 
123
                                try { ptfa = new CxFloatArray("CXDF::InitDeriv():ptfa"); } catch(...) { ptfa = NULL; }
 
124
                                if (ptfa == NULL) NewException((double)sizeof(CxFloatArray),__FILE__,__LINE__,__PRETTY_FUNCTION__);
 
125
                                
 
126
                                if (g_iTrajSteps != -1)
 
127
                                {
 
128
                                        ptfa->SetMaxSize((long)(g_iTrajSteps*1.1));
 
129
                                        ptfa->SetGrow((long)(g_iTrajSteps*0.1));
 
130
                                } else ptfa->SetGrow(1000);
 
131
                                m_pfaACFBuffer[z2] = ptfa;
 
132
                        }
 
133
                } else
 
134
                {
 
135
                        try { m_pfaACFBuffer = new CxFloatArray*[((CMolecule*)g_oaMolecules[g_iFixMol])->m_laSingleMolIndex.GetSize()*((CMolecule*)g_oaMolecules[m_iShowMol])->m_laSingleMolIndex.GetSize()*m_iCombinations]; } catch(...) { m_pfaACFBuffer = NULL; }
 
136
                        if (m_pfaACFBuffer == NULL) NewException((double)((CMolecule*)g_oaMolecules[g_iFixMol])->m_laSingleMolIndex.GetSize()*((CMolecule*)g_oaMolecules[m_iShowMol])->m_laSingleMolIndex.GetSize()*m_iCombinations*sizeof(CxFloatArray*),__FILE__,__LINE__,__PRETTY_FUNCTION__);
 
137
                        
 
138
                        for (z2=0;z2<((CMolecule*)g_oaMolecules[g_iFixMol])->m_laSingleMolIndex.GetSize()*((CMolecule*)g_oaMolecules[m_iShowMol])->m_laSingleMolIndex.GetSize()*m_iCombinations;z2++)
 
139
                        {
 
140
                                try { ptfa = new CxFloatArray("CXDF::InitDeriv():ptfa"); } catch(...) { ptfa = NULL; }
 
141
                                if (ptfa == NULL) NewException((double)sizeof(CxFloatArray),__FILE__,__LINE__,__PRETTY_FUNCTION__);
 
142
                                
 
143
                                if (g_iTrajSteps != -1)
 
144
                                {
 
145
                                        ptfa->SetMaxSize((long)(g_iTrajSteps*1.1));
 
146
                                        ptfa->SetGrow((long)(g_iTrajSteps*0.1));
 
147
                                } else ptfa->SetGrow(1000);
 
148
                                m_pfaACFBuffer[z2] = ptfa;
 
149
                        }
 
150
                }
 
151
        }
 
152
}
 
153
 
 
154
 
 
155
void CXDF::Autocorrelate()
 
156
{
 
157
        int n, z, z2;
 
158
        double tfs;
 
159
        CAutoCorrelation *ac;
 
160
        CxFloatArray *ptfa;
 
161
 
 
162
        if (m_bSelf)
 
163
                n = ((CMolecule*)g_oaMolecules[g_iFixMol])->m_laSingleMolIndex.GetSize()*m_iCombinations;
 
164
                        else n = ((CMolecule*)g_oaMolecules[g_iFixMol])->m_laSingleMolIndex.GetSize()*((CMolecule*)g_oaMolecules[m_iShowMol])->m_laSingleMolIndex.GetSize()*m_iCombinations;
 
165
 
 
166
        tfs = n/60.0;
 
167
        mprintf("    Autocorrelating cached values...\n");
 
168
        mprintf(WHITE,"      [");
 
169
 
 
170
        try { ptfa = new CxFloatArray("CXDF::Autocorrelate():ptfa"); } catch(...) { ptfa = NULL; }
 
171
        if (ptfa == NULL) NewException((double)sizeof(CxFloatArray),__FILE__,__LINE__,__PRETTY_FUNCTION__);
 
172
        
 
173
        ptfa->SetSize(m_pfaACFBuffer[0]->GetSize());
 
174
 
 
175
        try { ac = new CAutoCorrelation(); } catch(...) { ac = NULL; }
 
176
        if (ac == NULL) NewException((double)sizeof(CAutoCorrelation),__FILE__,__LINE__,__PRETTY_FUNCTION__);
 
177
        
 
178
        ac->Init(m_pfaACFBuffer[0]->GetSize(),m_iACFDepth,true);
 
179
        m_faACF.SetSize(m_iACFDepth);
 
180
        for (z=0;z<m_iACFDepth;z++)
 
181
                m_faACF[z] = 0;
 
182
        for (z=0;z<n;z++)
 
183
        {
 
184
                if (fmod(z,tfs) < 1.0)
 
185
                        mprintf(WHITE,"#");
 
186
 
 
187
                ac->AutoCorrelate(m_pfaACFBuffer[z],ptfa);
 
188
                for (z2=0;z2<m_iACFDepth;z2++)
 
189
                        m_faACF[z2] += (double)(*ptfa)[z2];
 
190
        }
 
191
        delete ac;
 
192
        delete ptfa;
 
193
        for (z=1;z<m_iACFDepth;z++)
 
194
                m_faACF[z] /= m_faACF[0];
 
195
        m_faACF[0] = 1.0f;
 
196
        mprintf(WHITE,"]\n");
 
197
}