Sersic1D系列¶
- class astropy.modeling.functional_models.Sersic1D(amplitude=1, r_eff=1, n=4, **kwargs)[源代码]¶
基类:
astropy.modeling.core.Fittable1DModel
一维Sersic表面亮度分布。
- 参数
- amplitude浮动
ru eff下的表面亮度。
- r_eff浮动
有效(半光)半径
- n浮动
Sersic指数。
- 其他参数
- fixed口述,可选
字典
{{parameter_name: boolean}}
在拟合过程中不能改变的参数。True表示参数保持不变。或者fixed
可以使用参数的属性。- tied可选的
字典
{{parameter_name: callable}}
链接到其他参数的参数。字典值是提供链接关系的可调用项。或者tied
可以使用参数的属性。- bounds可选的
字典
{{parameter_name: value}}
参数的上下界。键是参数名。值是一个长度为2的列表或元组,为参数提供所需的范围。或者min
和max
可以使用参数的属性。- eqcons可选列表
长度函数列表
n
这样的话eqcons[j](x0,*args) == 0.0
在一个成功优化的问题中。- ineqcons可选列表
长度函数列表
n
这样的话ieqcons[j](x0,*args) >= 0.0
是一个成功优化的问题。
参见
笔记
模型公式:
\[i(R)=i_e\exp\Left\{-b_n\Left [\left(\frac{{r}}{{r_{{e}}}}\right)^{{(1/n)}}-1\right] \右\}\]常数 \(b_n\) 定义为 \(r_e\) 包含总光度的一半,可以用数值求解。
\[\伽马(2n)=2 \伽马(bĩn,2n)\]工具书类
实例
import numpy as np from astropy.modeling.models import Sersic1D import matplotlib.pyplot as plt plt.figure() plt.subplot(111, xscale='log', yscale='log') s1 = Sersic1D(amplitude=1, r_eff=5) r=np.arange(0, 100, .01) for n in range(1, 10): s1.n = n plt.plot(r, s1(r), color=str(float(n) / 15)) plt.axis([1e-1, 30, 1e-2, 1e3]) plt.xlabel('log Radius') plt.ylabel('log Surface Brightness') plt.text(.25, 1.5, 'n=1') plt.text(.25, 300, 'n=10') plt.xticks([]) plt.yticks([]) plt.show()
属性摘要
此属性用于指示evaluate方法所需的单元或单元集,并返回将输入映射到单元(或
None
如果接受任何单位)。描述此类型模型的参数的名称。
方法总结
evaluate
(r,幅度,r_效应,n)一维Sersic剖面函数。
属性文档
- amplitude = Parameter('amplitude', value=1.0)¶
- input_units¶
- n = Parameter('n', value=4.0)¶
- param_names = ('amplitude', 'r_eff', 'n')¶
描述此类型模型的参数的名称。
此元组中的参数与初始化特定类型的模型时应传入的顺序相同。某些类型的模型,如多项式模型,根据模型的某些其他属性(如阶数)有不同数量的参数。
定义自定义模型类时,此属性的值由
Parameter
在类中定义的body属性。
- r_eff = Parameter('r_eff', value=1.0)¶
方法文件