Skip to content

Commit 22656b3

Browse files
author
Martin D. Weinberg
committed
Added asymptotic form of the spherical deprojection of the exponential disk as an option to EmpCylSL
1 parent f6e55e9 commit 22656b3

3 files changed

Lines changed: 12 additions & 2 deletions

File tree

expui/BiorthBasis.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1610,6 +1610,8 @@ namespace BasisClasses
16101610
EmpCylSL::mtype = EmpCylSL::Exponential;
16111611
if (mtype.compare("exponential")==0)
16121612
EmpCylSL::mtype = EmpCylSL::Exponential;
1613+
else if (mtype.compare("expdeproj")==0)
1614+
EmpCylSL::mtype = EmpCylSL::ExpDeproj;
16131615
else if (mtype.compare("gaussian")==0)
16141616
EmpCylSL::mtype = EmpCylSL::Gaussian;
16151617
else if (mtype.compare("plummer")==0)
@@ -1620,7 +1622,7 @@ namespace BasisClasses
16201622
} else {
16211623
if (myid==0) std::cout << "No EmpCylSL EmpModel named <"
16221624
<< mtype << ">, valid types are: "
1623-
<< "Exponential, Gaussian, Plummer, Power "
1625+
<< "Exponential, ExpDeproj, Gaussian, Plummer, Power "
16241626
<< "(not case sensitive)" << std::endl;
16251627
throw std::runtime_error("Cylindrical:initialize: EmpCylSL bad parameter");
16261628
}

exputil/EmpCylSL.cc

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,11 @@ double EmpCylSL::PPOW = 4.0;
6969
bool EmpCylSL::NewCoefs = true;
7070

7171

72-
EmpCylSL::EmpModel EmpCylSL::mtype = Exponential;
72+
EmpCylSL::EmpModel EmpCylSL::mtype = ExpDeproj;
7373

7474
std::map<EmpCylSL::EmpModel, std::string> EmpCylSL::EmpModelLabs =
7575
{ {Exponential, "Exponential"},
76+
{ExpDeproj, "ExpDeproj" },
7677
{Gaussian, "Gaussian" },
7778
{Plummer, "Plummer" },
7879
{Power, "Power" },
@@ -552,6 +553,9 @@ double EmpCylSL::massR(double R)
552553
case Exponential:
553554
ans = 1.0 - (1.0 + R)*exp(-R);
554555
break;
556+
case ExpDeproj:
557+
ans = erf(sqrt(R)) - 2.0/3.0*sqrt(R/M_PI)*exp(-R)*(3.0 + 2.0*R);
558+
break;
555559
case Gaussian:
556560
arg = 0.5*R*R;
557561
ans = 1.0 - exp(-arg);
@@ -589,6 +593,9 @@ double EmpCylSL::densR(double R)
589593
case Exponential:
590594
ans = exp(-R)/(4.0*M_PI*R);
591595
break;
596+
case ExpDeproj:
597+
ans = exp(-R)/(3.0*M_PI*sqrt(R*M_PI));
598+
break;
592599
case Gaussian:
593600
arg = 0.5*R*R;
594601
ans = exp(-arg)/(4.0*M_PI*R);

include/EmpCylSL.H

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,7 @@ public:
364364
//! Type of density model to use
365365
enum EmpModel {
366366
Exponential,
367+
ExpDeproj,
367368
Gaussian,
368369
Plummer,
369370
Power,

0 commit comments

Comments
 (0)