diff options
Diffstat (limited to 'vmodels')
-rw-r--r-- | vmodels/beta1d.hpp | 1 | ||||
-rw-r--r-- | vmodels/bl.hpp | 5 | ||||
-rw-r--r-- | vmodels/bpl.hpp | 1 | ||||
-rw-r--r-- | vmodels/bremss.hpp | 1 | ||||
-rw-r--r-- | vmodels/constant.hpp | 4 | ||||
-rw-r--r-- | vmodels/dbeta1d.hpp | 1 | ||||
-rw-r--r-- | vmodels/dualgauss1d.hpp | 1 | ||||
-rw-r--r-- | vmodels/gauss1d.hpp | 1 | ||||
-rw-r--r-- | vmodels/lin1d.hpp | 1 | ||||
-rw-r--r-- | vmodels/nbeta1d.hpp | 1 | ||||
-rw-r--r-- | vmodels/nfw.hpp | 4 | ||||
-rw-r--r-- | vmodels/nfw_int.hpp | 4 | ||||
-rw-r--r-- | vmodels/poly1d.hpp | 10 | ||||
-rw-r--r-- | vmodels/powerlaw.hpp | 4 | ||||
-rw-r--r-- | vmodels/quad_pl.hpp | 4 | ||||
-rw-r--r-- | vmodels/rquarter.hpp | 66 | ||||
-rw-r--r-- | vmodels/vt_temperature.hpp | 7 |
17 files changed, 94 insertions, 22 deletions
diff --git a/vmodels/beta1d.hpp b/vmodels/beta1d.hpp index 8d4d714..fe49a0b 100644 --- a/vmodels/beta1d.hpp +++ b/vmodels/beta1d.hpp @@ -60,6 +60,7 @@ namespace opt_utilities private: std::string do_get_information()const { +#include <model_doc/beta1d.info> return ""; } }; diff --git a/vmodels/bl.hpp b/vmodels/bl.hpp index dc2a0da..6561e28 100644 --- a/vmodels/bl.hpp +++ b/vmodels/bl.hpp @@ -61,9 +61,8 @@ namespace opt_utilities private: std::string do_get_information()const { - return "broken linear model\n" - "y=k1*(x-x_b)+y_b for x<x_b\n" - "y=k2*(x-x_b)+y_b otherwise\n"; +#include <model_doc/bl.info> + return ""; } }; } diff --git a/vmodels/bpl.hpp b/vmodels/bpl.hpp index a1f43aa..78c1fa1 100644 --- a/vmodels/bpl.hpp +++ b/vmodels/bpl.hpp @@ -64,6 +64,7 @@ namespace opt_utilities std::string do_get_information()const { #include <model_doc/bpl.info> + return ""; } }; } diff --git a/vmodels/bremss.hpp b/vmodels/bremss.hpp index 6d9f317..c7f6652 100644 --- a/vmodels/bremss.hpp +++ b/vmodels/bremss.hpp @@ -46,6 +46,7 @@ namespace opt_utilities private: std::string do_get_information()const { +#include <model_doc/bremss.info> return ""; } }; diff --git a/vmodels/constant.hpp b/vmodels/constant.hpp index 888ef8e..fc61f4e 100644 --- a/vmodels/constant.hpp +++ b/vmodels/constant.hpp @@ -49,8 +49,8 @@ namespace opt_utilities private: std::string do_get_information()const { - return "Constant\n" - "y=C\n"; +#include <model_doc/constant.info> + return ""; } }; } diff --git a/vmodels/dbeta1d.hpp b/vmodels/dbeta1d.hpp index 40f881d..6f5d1ad 100644 --- a/vmodels/dbeta1d.hpp +++ b/vmodels/dbeta1d.hpp @@ -73,6 +73,7 @@ namespace opt_utilities private: std::string do_get_information()const { +#include <model_doc/dbeta1d.info> return ""; } }; diff --git a/vmodels/dualgauss1d.hpp b/vmodels/dualgauss1d.hpp index 221fe54..aba5df0 100644 --- a/vmodels/dualgauss1d.hpp +++ b/vmodels/dualgauss1d.hpp @@ -58,6 +58,7 @@ namespace opt_utilities private: std::string do_get_information()const { +#include <model_doc/dualgauss1d.info> return ""; } }; diff --git a/vmodels/gauss1d.hpp b/vmodels/gauss1d.hpp index da9c5df..641b3f7 100644 --- a/vmodels/gauss1d.hpp +++ b/vmodels/gauss1d.hpp @@ -51,6 +51,7 @@ namespace opt_utilities private: std::string do_get_information()const { +#include <model_doc/gauss1d.info> return ""; } }; diff --git a/vmodels/lin1d.hpp b/vmodels/lin1d.hpp index 701e8e3..53424c3 100644 --- a/vmodels/lin1d.hpp +++ b/vmodels/lin1d.hpp @@ -55,6 +55,7 @@ namespace opt_utilities std::string do_get_information()const { #include <model_doc/lin1d.info> + return ""; } }; } diff --git a/vmodels/nbeta1d.hpp b/vmodels/nbeta1d.hpp index cbf0bc2..28097ab 100644 --- a/vmodels/nbeta1d.hpp +++ b/vmodels/nbeta1d.hpp @@ -58,6 +58,7 @@ namespace opt_utilities private: std::string do_get_information()const { +#include <model_doc/nbeta1d.info> return ""; } }; diff --git a/vmodels/nfw.hpp b/vmodels/nfw.hpp index a46ed87..5b78f4e 100644 --- a/vmodels/nfw.hpp +++ b/vmodels/nfw.hpp @@ -45,8 +45,8 @@ namespace opt_utilities private: std::string do_get_information()const { - return "NFW mass profile\n" - "y=rho0/(x/rs*(1+x/rs)^2)\n"; +#include <model_doc/nfw.info> + return ""; } }; } diff --git a/vmodels/nfw_int.hpp b/vmodels/nfw_int.hpp index b3e8b54..de7024f 100644 --- a/vmodels/nfw_int.hpp +++ b/vmodels/nfw_int.hpp @@ -45,8 +45,8 @@ namespace opt_utilities private: std::string do_get_information()const { - return "integrated NFW mass profile\n" - "y=rho0/(x/rs*(1+x/rs)^2)\n"; +#include <model_doc/nfw_int.info> + return ""; } }; } diff --git a/vmodels/poly1d.hpp b/vmodels/poly1d.hpp index 113ef83..1fc81d3 100644 --- a/vmodels/poly1d.hpp +++ b/vmodels/poly1d.hpp @@ -67,14 +67,8 @@ namespace opt_utilities private: std::string do_get_information()const { - std::ostringstream ostr; - ostr<<n<<"-order polynorminal model\n"; - for(int i=0;i<n;++i) - { - ostr<<"a"<<i<<"*x^"<<i<<"+"; - } - ostr<<"a"<<n<<"*x^"<<n; - return ostr.str(); +#include <model_doc/poly1d.info> + return ""; } }; } diff --git a/vmodels/powerlaw.hpp b/vmodels/powerlaw.hpp index c30dbb6..ac6ec80 100644 --- a/vmodels/powerlaw.hpp +++ b/vmodels/powerlaw.hpp @@ -45,8 +45,8 @@ namespace opt_utilities private: std::string do_get_information()const { - return "Simple power law model\n" - "y=A*x^gamma\n"; +#include <model_doc/powerlaw.info> + return ""; } }; } diff --git a/vmodels/quad_pl.hpp b/vmodels/quad_pl.hpp index a0a25a4..14ad752 100644 --- a/vmodels/quad_pl.hpp +++ b/vmodels/quad_pl.hpp @@ -47,8 +47,8 @@ namespace opt_utilities private: std::string do_get_information()const { - return "Simple power law model\n" - "y=A*x^gamma\n"; +#include <model_doc/quad_pl.info> + return ""; } }; } diff --git a/vmodels/rquarter.hpp b/vmodels/rquarter.hpp new file mode 100644 index 0000000..7f37924 --- /dev/null +++ b/vmodels/rquarter.hpp @@ -0,0 +1,66 @@ +/** + \file lin1d.hpp + \brief linear + \author Junhua Gu + */ + + +#ifndef VRQUARTER_MODEL_H_ +#define VRQUARTER_MODEL_H_ +#define OPT_HEADER +#include <core/fitter.hpp> +#include <misc/optvec.hpp> +#include <cmath> + +namespace opt_utilities +{ + template <typename T> + class rquarter + :public model<optvec<T>,optvec<T>,optvec<T>,std::string> + { + typedef optvec<T> Tv; + private: + rquarter<T>* do_clone()const + { + return new rquarter<T>(*this); + } + + const char* do_get_type_name()const + { + return "de Vaucoulurs 1/4 law"; + } + public: + rquarter() + { + this->push_param_info(param_info<Tv>("I0",1)); + this->push_param_info(param_info<Tv>("Re",10)); + this->push_param_info(param_info<Tv>("bkg",0)); + } + + public: + Tv do_eval(const Tv& x,const Tv& param) + { + Tv result(x.size()); + + + //return x*get_element(param,0)+get_element(param,1); + for(size_t i=0;i!=x.size();++i) + { + result[i]=param[0]*exp(-7.67*(pow(x[i]/param[1],.25)-T(1.)))+param[2]; + } + return result; + } + + private: + std::string do_get_information()const + { +#include <model_doc/rquarter.info> + return ""; + } + }; +} + + + +#endif +//EOF diff --git a/vmodels/vt_temperature.hpp b/vmodels/vt_temperature.hpp index f6fb55e..0778794 100644 --- a/vmodels/vt_temperature.hpp +++ b/vmodels/vt_temperature.hpp @@ -50,7 +50,12 @@ public: } return result; } - + + std::string do_get_information()const + { +#include <model_doc/vt_temperature.info> + return ""; + } }; #endif |