aboutsummaryrefslogtreecommitdiffstats
path: root/mass_profile
diff options
context:
space:
mode:
authorAaron LI <aaronly.me@outlook.com>2017-02-07 13:57:07 +0800
committerAaron LI <aaronly.me@outlook.com>2017-02-07 13:57:07 +0800
commit44eb911f400467a4326fd80a26ea07115eba3aca (patch)
treef9602eb602e1067f504439567e7bbf382b54f79e /mass_profile
parent5d25b7d41bc9ef7d2e65bf6429e211111c10664d (diff)
downloadchandra-acis-analysis-44eb911f400467a4326fd80a26ea07115eba3aca.tar.bz2
Fix undeclared variables in projector.hpp
Diffstat (limited to 'mass_profile')
-rw-r--r--mass_profile/projector.hpp4
-rw-r--r--mass_profile/spline.h11
2 files changed, 8 insertions, 7 deletions
diff --git a/mass_profile/projector.hpp b/mass_profile/projector.hpp
index fda6cdb..4ef4b32 100644
--- a/mass_profile/projector.hpp
+++ b/mass_profile/projector.hpp
@@ -193,7 +193,7 @@ namespace opt_utilities
double v = calc_v(x, nsph, nrad) * pow(cm_per_pixel, 3);
if(pcfunc)
{
- cfunc = (*pcfunc)((x[nsph+1] + x[nsph]) / 2.0);
+ double cfunc = (*pcfunc)((x[nsph+1] + x[nsph]) / 2.0);
projected[nrad] += (unprojected[nsph] * unprojected[nsph] *
cfunc * v / ne_np_ratio);
}
@@ -202,7 +202,7 @@ namespace opt_utilities
projected[nrad] += unprojected[nsph] * unprojected[nsph] * v;
}
}
- area = pi * (x[nrad+1]*x[nrad+1] - x[nrad]*x[nrad]);
+ double area = pi * (x[nrad+1]*x[nrad+1] - x[nrad]*x[nrad]);
projected[nrad] /= area;
projected[nrad] += bkg;
}
diff --git a/mass_profile/spline.h b/mass_profile/spline.h
index 8bc0225..9645845 100644
--- a/mass_profile/spline.h
+++ b/mass_profile/spline.h
@@ -1,5 +1,6 @@
-#ifndef SPLINEH
-#define SPLINEH
+#ifndef SPLINE_H
+#define SPLINE_H
+
#include <vector>
#include <cstdlib>
#include <cassert>
@@ -58,7 +59,7 @@ public:
double b=(x-x_list[n1])/h;
return a*y_list[n1]+b*y_list[n2]+((a*a*a-a)*y2_list[n1]+
(b*b*b-b)*y2_list[n2])*(h*h)/6.;
-
+
}
void gen_spline(T y2_0,T y2_N)
@@ -95,7 +96,7 @@ public:
{
qn=.5;
un=(3./(x_list[n-1]-x_list[n-2]))*(y2_N-(y_list[n-1]-y_list[n-2])/(x_list[n-1]-x_list[n-2]));
-
+
}
y2_list[n-1]=(un-qn*u[n-2])/(qn*y2_list[n-2]+1.);
for(int i=n-2;i>=0;--i)
@@ -106,4 +107,4 @@ public:
};
-#endif
+#endif /* SPLINE_H */