Skip to content

Commit 73a47f6

Browse files
author
Martin D. Weinberg
committed
Added deprojection support to Cylinder
1 parent 2ef3aba commit 73a47f6

2 files changed

Lines changed: 258 additions & 38 deletions

File tree

src/Cylinder.H

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,18 @@ class MixtureBasis;
4646
4747
@param dweight is the relative weight of the second component in the double-exponential disk basis construction (default: 1.0)
4848
49+
@param dmodel is the disk model type for deprojection and EOF conditioning. See Cylinder::DiskType for options.
50+
51+
@param mtype is the spherical model type for conditioning the basis. See EmpCylSL::EmpModel for options.
52+
53+
@param dtype is the density model type for conditioning the basis. See Cylinder::DiskType for options.
54+
55+
@param rwidth is the radial width of the error function truncation for disk basis construction (default: 0.0, which implies no truncation)
56+
57+
@param rtrunc is the radial truncation radius for disk basis construction (default: 0.1)
58+
59+
@param rfactor is the radial scale factor for disk basis construction (default: 1.0, which implies no scaling)
60+
4961
@param lmaxfid is the maximum spherical harmonic index for EOF construction
5062
5163
@param nmaxfid is the maximum radial index for EOF construction
@@ -121,7 +133,7 @@ class MixtureBasis;
121133
122134
@param cmapz is the vertical coordinate mapping type
123135
124-
@param mtype is the deprojected model type for conditioning the
136+
@param mtype is the spherical model type for conditioning the
125137
basis. See ExpCylSL::mtype for options.
126138
127139
@param ppower is the power-law index for the Power spherical model
@@ -170,6 +182,7 @@ private:
170182
//
171183
double rcylmin, rcylmax, zmax, acyl, bias;
172184
double aratio, hratio, dweight; // Disk basis construction parameters for double-exponential disk
185+
double rwidth, rtrunc, rfactor; // Disk basis construction parameters for numerical deprojection
173186
double Mfac, HERNA; // Disk bulge parameters: mass fraction and Hernquist scale length
174187

175188
int nmaxfid, lmaxfid, mmax, mlim, nint;
@@ -355,7 +368,7 @@ protected:
355368
//! Power-law index for deprojected spherical model for basis conditioning
356369
double ppow = 2.0;
357370

358-
//! Deprojection model for basis conditioning
371+
//! Spherical model for basis conditioning
359372
std::string mtype = "Exponential";
360373

361374
//! Write basis-specific parameters to HDF5 covariance file
@@ -365,6 +378,9 @@ protected:
365378
enum class DiskType
366379
{ constant, gaussian, mn, exponential, doubleexpon, diskbulge, python };
367380

381+
//! The string name of the deprojection model
382+
std::string dmodel;
383+
368384
//! Map human strings to disk target typenums
369385
const std::map<std::string, DiskType> dtlookup =
370386
{ {"constant", DiskType::constant},
@@ -393,6 +409,29 @@ protected:
393409
//! The string name of the disk density function type for basis conditioning
394410
std::string dtype;
395411

412+
//@{
413+
//! DeprojType support
414+
415+
//! Disk models used for deprojection
416+
enum class DeprojType
417+
{ mn, toomre, python, exponential};
418+
419+
//! Current model
420+
DeprojType PTYPE;
421+
422+
//! Python module name for disk density function if using Python deprojection
423+
std::string pyproj;
424+
425+
//! Look up by string
426+
const std::map<std::string, DeprojType> dplookup =
427+
{ {"mn", DeprojType::mn},
428+
{"toomre", DeprojType::toomre},
429+
{"python", DeprojType::python},
430+
{"exponential", DeprojType::exponential}
431+
};
432+
//@}
433+
434+
396435
//! Dtype cache check for consistency between cache and current parameters
397436
bool checkMetaData();
398437

0 commit comments

Comments
 (0)