CCF_Widget.py 文件源码

python
阅读 18 收藏 0 点赞 0 评论 0

项目:gullikson-scripts 作者: kgullikson88 项目源码 文件源码
def plot_Trun(self):
        star = self.star
        inst_date = self.inst_date

        data = self.selected_df
        idx = data.groupby(['T']).apply(lambda x: x['ccf_max'].idxmax())
        highest = data.ix[idx].copy()
        source = ColumnDataSource(data=highest)
        self.current_source = source

        p = figure(
            title="{} - {}".format(star, inst_date),
            plot_width=800, plot_height=400,
            tools="pan,wheel_zoom,tap,hover,reset",
            title_text_font_size="20pt",
        )
        p.circle("T", "ccf_max",
                 size=10,
                 nonselection_alpha=0.6,
                 source=source
        )
        p.xaxis[0].axis_label = 'Temperature (K)'
        p.yaxis[0].axis_label = 'CCF Peak Value'

        hover = p.select(dict(type=HoverTool))
        hover.tooltips = OrderedDict([
            ("Temperature", "@T"),
            ("vsini", "@vsini"),
            ("[Fe/H]", "@feh"),
            ("log(g)", "@logg"),
            ("Radial Velocity (km/s)", "@vel_max"),
            ("ccf peak height", "@ccf_max"),
        ])
        return p, highest
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号