Members/chinone/覚書


contents


N_side, N_pix, resolution

npix.png

read map

FITS_READ_MAP(only I)

  fits_read_map, file_in, temperature, N_obs, header

FITS_READ_COMBINED_MAP (I,Q,U)

WMAP_READ_MAP (I,Q,U,S)

  wmap_read_map, file_in, Info, Temp=temp, QPol=qpol, UPol=upol, SpSig=spsig, NObs=nobs, Covar=covar, NPixels=npix

ud_grade

mapの解像度変更

「nside=512」から「nside=8」へ変更

file_in='map_512.fits'
read_fits_map, file_in, mymap

ud_grade, mymap, mymap2, nside_out=8, order_out='NESTED'

pix2ang_nest

「NESTED」schemeで書かれたHEALPixのindexを(theta,phi)に変換する。 出力は要素 npix=12x nside^2 個のarray。

nside = 512
ipix = findgen(12*nside^2)
pix2ang_nest, nside, ipix, theta, phi

spherical harmonic

(theta,phi,l,m)からshperical harmonicsを計算。 出力は入力したtheta,phiの要素の数と同じ数のarray。当然複素数。

l=1
m=1
spher_harm(theta,phi,l,m)

headfits

hprint,headfits( filein )

map_nest2ring

NESTED->RING

ring_map = map_nest2ring( nested_map )

cartview, gnomview, mollview, orthview

Cartesian cylindrical(full sky)

pro cartview0

  n = 3l
  nside = 2l^n
  npix = 12l * nside^2l

  map = ( dindgen( npix)+1l)/npix

  cartview, map, /online, res=45, graticule=[45,30], rot=[10,20,30], pysize=250,$
            title='Cartesian cylindrical(full sky)',  subtitle='cartview', ps=1

end

plot_cartesian_sample.png

Gnomic projection

pro gnomview0

  n = 3l
  nside = 2l^n
  npix = 12l * nside^2l

  map = ( dindgen( npix)+1l)/npix

  gnomview, map, /online, res=45, graticule=[45,30], rot=[10,20,30], pysize=250,$
            title='Gnomic projection', subtitle='gnomview', ps=1

end

plot_gnomic_sample.png

Mollweide projection

pro mollview1

  n = 3l
  nside = 2l^n
  npix = 12l * nside^2l

  map = ( dindgen( npix)+1l)/npix

  mollview, map, /online, graticule=[45,30], rot=[10,20,30], $
            title='Mollweide projection', subtitle='mollview', ps=1
  draw_mollewide_circle, 10, 20, 10, color=255, ps=0.5

end

plot_mollweide_sample.png

Orthographic projection

pro orthview0

  n = 3l
  nside = 2l^n
  npix = 12l * nside^2l

  map = ( dindgen( npix)+1l)/npix

  orthview, map, /online, graticule=[45,30], rot=[10,20,30],$
            title='Orthographic projection', subtitle='orthview', ps=1

end

plot_orthographic_sample.png

disc_coords

idl cen v1.23付属品

 filein = '/home/chinone/workspace/IDL/WMAP/data/lambda/ILC/wmap_ilc_3yr_v2.fits'
 npix = getsize_fits( filein, nside=nside)

 fits_read_map, filein, temperature, nobs, header
 temperature = map_nest2ring( temperature )

 l = 56.75
 b = 88.05
 glactc, ra, dec, 2000, l, b, 2l, /degree

 disc_coords, disclon, disclat, listpix, ra, dec, 5l, nside=nside
 new_temperature = temperature[listpix]

 viewmoll, temperature, /online, nside=nside, rot=[0,0,0], graticule=[45,30]
 viewmoll, temperature, /online, nside=nside, rot=[l,b,0], graticule=[45,30]
 viewcart, new_temperature, /online, nside=nside, pix_in=listpix, rot=[l,b,0], graticule=[45,10], res=0.8, ps=0

IDL以外

PS出力

TeXやPPTに挿入する為にPSファイルに変換する。

pro fits2ps
  filein = dialog_pickfile()
;  filein = ''
  read_fits_map, filein, value, NSIDE=nside
  npix = getsize_fits( filein, NSIDE=nside)

;  mollview, filein, MIN=-0.2d, MAX=0.2d, PS=1, TITLE=" ", SUBTITLE=" "
;  mollview, filein, MAX=,UNITS='micro K', /HIST_EQUAL, TITLE=" ",SUBTITLE=" ",  PS=1
;  mollview, filein, MIN=33.0d,MAX=200.0d,UNITS='micro K', TITLE=" ",SUBTITLE=" ",  PS=1
;  mollview, filein, TITLE=" ",SUBTITLE=" ", UNIT='spectral index',MAX=-2.0d, MIN=-6.0d, PS=0
  mollview, filein, TITLE=" ",SUBTITLE=" ", UNIT=' ', PS=1
;  mollview, filein, TITLE=" ",SUBTITLE=" ", UNIT=' ', PS=1

end

なぜか上下反転している。そこで

  • PPTに挿入する場合は、PNGに変換するので、
    convert -antialias -density 150x150 -rotate -90 hoge.ps hoge.png
    何故「-90」?。これで「1535x958」のイメージができる。「density」指定無しで「737x460」。

smoothing

指定したFWHMでマップを再構成する。Healpix付属品。 「ud_grade」で解像度を落とすのとは意味が違う。 使い方はコマンドラインから

smoothing -d parameter_file
infile=./wmap_imap_r10_yr3_W3_v2.fits
nlmax=1024
fwhm_arcmin=60
outfile=./wmap_imap_r10_yr3_W3_v2_smoothed_60arcmin.fits

r10 W band

plot_cartesian_r10.png

r10 -> FWHM 10 amin W band

plot_cartesian_r10_10.png

r10 -> FWHM 60 amin W band

plot_cartesian_r10_60.png

Smoothed W band(60amin)

plot_cartesian_60.png