Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix surface density, add cumulative surface density #161

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions usr/dehnen/falcON/src/public/lib/profile.cc
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ mr(0), rr(0), sd(0), vl(0), vr(0), sl(0), ba(0), ph(0), al(0)
Mvr += xi * (mi*vp);
add_outer_product2(Mxx,xi,mi);
}
sd[i] = M / (Pi * i? square(R[ir[i+1]]) - square(R[ir[i-1]])
sd[i] = M / Pi / (i? square(R[ir[i+1]]) - square(R[ir[i-1]])
: square(R[ir[i+1]]) );
vl[i] = Mvl/M;
vr[i] = abs(Mvr)/M;
Expand All @@ -361,7 +361,7 @@ mr(0), rr(0), sd(0), vl(0), vr(0), sl(0), ba(0), ph(0), al(0)
M += mi;
add_outer_product2(Mxx,xi,mi);
}
sd[i] = M / (Pi * i? square(R[ir[i+1]]) - square(R[ir[i-1]])
sd[i] = M / Pi / (i? square(R[ir[i+1]]) - square(R[ir[i-1]])
: square(R[ir[i+1]]) );
symmetrize2(Mxx);
double ab = Mxx[0][0]-Mxx[1][1];
Expand Down
9 changes: 7 additions & 2 deletions usr/dehnen/falcON/src/public/manip/projprof.cc
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ namespace falcON { namespace Manipulate {
};
//////////////////////////////////////////////////////////////////////////////
inline void projprof::print_line(bool V) const {
OUT <<"#--------------------------------------------------";
OUT <<"#-----------------------------------------------------------------";
if(V)
OUT<<"----------------------------------------------------";
OUT <<'\n';
Expand Down Expand Up @@ -171,8 +171,12 @@ namespace falcON { namespace Manipulate {
else OUT<<'\n';
if(X0) OUT<<"# xcen = "<<(*X0)<<'\n';
if(V0) OUT<<"# vcen = "<<(*V0)<<'\n';
OUT << "# Nb = " << PP.Nb() << '\n';
OUT << "# N = " << PP.N() << '\n';
OUT << "# Mtot = " << PP.Mtot() << '\n';
OUT <<"#\n"
<<"# radius Sigma";
OUT<<" Sigma_cum";
if(PP.has_vels())
OUT<<" <v_l> <v_rot> sigma_l";
OUT <<" b/a PA";
Expand All @@ -182,7 +186,8 @@ namespace falcON { namespace Manipulate {
print_line(PP.has_vels());
for(int i=0; i!=PP.N(); ++i) {
OUT << std::setw(12) << PP.rad(i) <<' '
<< std::setw(12) << PP.Sig(i) <<' ';
<< std::setw(12) << PP.Sig(i) <<' '
<< std::setw(12) << PP.Mr(i) / (Pi * square(PP.rad(i))) <<' ';
if(PP.has_vels())
OUT<< std::setw(12) << PP.vlos(i)<<' '
<< std::setw(12) << PP.vrot(i)<<' '
Expand Down