“Marvin”的版本间差异

来自Shiyin's note
跳到导航 跳到搜索
→‎mask
→‎Maps
第21行: 第21行:
*读取dap中的map
*读取dap中的map
:map的data model 可以参看 https://sdss-marvin.readthedocs.io/en/latest/datamodel/mpl10.html?highlight=property%20name#dap-datamodel
:map的data model 可以参看 https://sdss-marvin.readthedocs.io/en/latest/datamodel/mpl10.html?highlight=property%20name#dap-datamodel

ha = dapmap['gflux ha']
gflux=dapmap.getMap('spx_mflux',channel=None)


* 速度弥散度的改正 inst_sigma_correction() #marvin.tools.quantities.map.Map.inst_sigma_correction
* 速度弥散度的改正 inst_sigma_correction() #marvin.tools.quantities.map.Map.inst_sigma_correction

2021年11月28日 (日) 14:07的版本

安装

  • pip install sdss-marvin
  • pip install -U sdss-marvin

配置

  • 注意设置一些环境变量,关键是要找到dapall文件
setenv SAS_BASE_DIR $HOME/MaNGA
setenv MANGA_SPECTRO_REDUX $SAS_BASE_DIR/mangawork/manga/spectro/redux 
setenv MANGA_SPECTRO_ANALYSIS $SAS_BASE_DIR/mangawork/manga/spectro/analysis
  • mode
import marvin
marvin.config.mode = 'local'   # or 'remote',‘auto’
marvin.config.access = 'collab' # 'DR15'
marvin.config.setRelease("MPL-10")
  • collab模式下要设置.netrc文件

功能

Maps

  • 读取dap中的map
map的data model 可以参看 https://sdss-marvin.readthedocs.io/en/latest/datamodel/mpl10.html?highlight=property%20name#dap-datamodel
       ha = dapmap['gflux ha']
       gflux=dapmap.getMap('spx_mflux',channel=None)
  • 速度弥散度的改正 inst_sigma_correction() #marvin.tools.quantities.map.Map.inst_sigma_correction
Ha_sig=dapmap.getMap('emline_gsigma',channel='ha')
#Ha_sigcorr=dapmap.getMap('emline_gsigmacorr',channel='ha')
Ha_vdis=Ha.inst_sigma_correction()
st_sig=dapmap.getMap('stellar_sigma')
#st_sigcorr=dapmap.getMap('stellar_sigmacorr',channel='fit')
st_vdis=st_sig.inst_sigma_correction()

mask

  • DAP中的map类都有pixmap的类属性,可以help查看
  • 比如获得ha的map之后,可以用ha.pixmask.schema查看
pixmask的第0位是'NOCOV',就是是否天区覆盖,gflux 并没有设置这个bitmask,但是画图同样可以显示NOCOV天区,原因是因为用了ivar==0判据
np.where(gflux.ivar == 0)[0].shape