“Autogalaxy”的版本间差异
跳到导航
跳到搜索
(创建页面,内容为“PyAutoGalaxy is an open-source Python 3.8+ package for analysing the morphologies and structures of large multi-wavelength galaxy samples. 详见 https://pyautogala…”) |
(→Grid) |
||
(未显示同一用户的5个中间版本) | |||
第4行: | 第4行: | ||
==学习笔记== |
==学习笔记== |
||
===Array2d/Mask2D/Kernel2D=== |
|||
*array_2d |
|||
:为图像数据定义的一类二维数组类,包含了pixelsize信息,并可以同时包含mask信息 |
*Array2D:为图像数据定义的一类二维数组类,包含了pixelsize信息,并可以同时包含mask信息 |
||
ima_2d = aa.Array2D.no_mask(values=Agemap[0],shape_native=Agemap[0].shape,pixel_scales=0.5) |
ima_2d = aa.Array2D.no_mask(values=Agemap[0],shape_native=Agemap[0].shape,pixel_scales=0.5) |
||
mask_2d = aa.Mask2D(mask=~mask,shape_native=Agemap[0].shape,pixel_scales=0.5) |
|||
noise_2d = aa.Array2D.no_mask(values=vflux**0.5+0.01,shape_native=Agemap[0].shape,pixel_scales=0.5) |
noise_2d = aa.Array2D.no_mask(values=vflux**0.5+0.01,shape_native=Agemap[0].shape,pixel_scales=0.5) |
||
* Mask2D中 True值是指被mask掉 (下面例子中mask是一个booltype的ndarray,True是指保留) |
|||
ima_2d = ima_2d.apply_mask(mask=mask_2d) |
|||
noise_2d = noise_2d.apply_mask(mask=mask_2d) |
|||
* psf是Kernel2D类型 |
|||
psf_2d = ag.Kernel2D.from_gaussian(shape_native=(10, 10), sigma=1.5, pixel_scales=0.5) |
psf_2d = ag.Kernel2D.from_gaussian(shape_native=(10, 10), sigma=1.5, pixel_scales=0.5) |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
imaging=ag.Imaging(image=ima_2d,noise_map=noise_2d,psf=psf_2d) |
imaging=ag.Imaging(image=ima_2d,noise_map=noise_2d,psf=psf_2d) |
||
*可以直接对imaging对象做mask |
|||
imaging = imaging.apply_mask(mask=mask_2d) |
|||
*Imagingplotter |
|||
:visuals_2d (Visuals2D) – Contains 2D visuals that can be overlaid on 2D plots. |
|||
:include_2d (Include2D) – Specifies which attributes of the Imaging are extracted and plotted as visuals for 2D plots. |
|||
===Grid=== |
|||
*生成grid |
|||
grid_2d = ag.Grid2D.uniform(shape_native=Agemap[0].shape, pixel_scales=0.5) |
|||
* 从图像获得 |
|||
grid=imaging.grid |
2023年2月21日 (二) 03:16的最新版本
PyAutoGalaxy is an open-source Python 3.8+ package for analysing the morphologies and structures of large multi-wavelength galaxy samples.
详见 https://pyautogalaxy.readthedocs.io/
学习笔记
Array2d/Mask2D/Kernel2D
- Array2D:为图像数据定义的一类二维数组类,包含了pixelsize信息,并可以同时包含mask信息
ima_2d = aa.Array2D.no_mask(values=Agemap[0],shape_native=Agemap[0].shape,pixel_scales=0.5) mask_2d = aa.Mask2D(mask=~mask,shape_native=Agemap[0].shape,pixel_scales=0.5) noise_2d = aa.Array2D.no_mask(values=vflux**0.5+0.01,shape_native=Agemap[0].shape,pixel_scales=0.5)
- Mask2D中 True值是指被mask掉 (下面例子中mask是一个booltype的ndarray,True是指保留)
ima_2d = ima_2d.apply_mask(mask=mask_2d) noise_2d = noise_2d.apply_mask(mask=mask_2d)
- psf是Kernel2D类型
psf_2d = ag.Kernel2D.from_gaussian(shape_native=(10, 10), sigma=1.5, pixel_scales=0.5)
详见 https://pyautogalaxy.readthedocs.io/en/latest/api/_autosummary/autogalaxy.Array2D.html
imaging
- 基于array_2d生成的图像类,必须同时具有原始图像数据,和noisemap,同时psf信息可选
imaging=ag.Imaging(image=ima_2d,noise_map=noise_2d,psf=psf_2d)
- 可以直接对imaging对象做mask
imaging = imaging.apply_mask(mask=mask_2d)
- Imagingplotter
- visuals_2d (Visuals2D) – Contains 2D visuals that can be overlaid on 2D plots.
- include_2d (Include2D) – Specifies which attributes of the Imaging are extracted and plotted as visuals for 2D plots.
Grid
- 生成grid
grid_2d = ag.Grid2D.uniform(shape_native=Agemap[0].shape, pixel_scales=0.5)
- 从图像获得
grid=imaging.grid