如何使用查看器从树中提取信息?

问题描述 投票:0回答:0
from astropy.io import fits
import matplotlib.pyplot as plt 
from astrodendro import Dendrogram, pp_catalog
import numpy as np

fname = "/home/citlali/Documentos/Servicio/m/m8093-1901/manga-8093-1901.Pipe3D.cube.fits.gz"


image = fits.open(fname)
DATOS = image["FLUX_ELINES"].data
img = DATOS[45, :, :]
d = Dendrogram.compute(img, min_value=0, min_delta=0, min_npix=0.1)
d.trunk[0]
v = d.viewer()
v.show()

这是我的代码,当我绘制时,我得到了这个,我可以在其中选择我想要的任何区域(例如,红色和绿色)。所以,我正在寻找提取这些地区的信息,但我不知道该怎么做。如果有人知道某个功能,我将不胜感激。它也必须是自动化的。

谢谢。

python data-structures graphics astropy viewer
© www.soinside.com 2019 - 2024. All rights reserved.