3
我有一個尺寸爲3000 * 3000像素的圖像。我首先找到我感興趣的領域的中心,說在位置(1000,2000)。我想提取R1 = 10像素,R2 = 20像素的環內數據,並找出環內數據的模式。有沒有任何python例程來實現它或者任何聰明和簡潔的方式來實現它?我知道photutils.aperture_photometry
可以得到環的總和,但不是每個像素的任何單個數據點。從半徑爲R1和R2的環形空間內的圖像中提取數據點
import numpy as np
data = np.random.uniform(0,10,size=(3000,3000))
center = (1000,2000) #### in pixel space
R1 = 10 #### pixels
R2 = 20 #### pixels
....