Impro

来自Shiyin's note
Shen讨论 | 贡献2015年1月1日 (四) 09:53的版本
跳到导航 跳到搜索

John Moustakas写的一系列IDL code,有很多有用的程序

  • im_filtermag
调用kcorrect中的filter文件,计算光谱积分后得到的各个波段的星等。参见由光谱到星等
  • BALMER_TEMPERATURE
Compute the temperature dependence of the Balmer decrement
  • BELL_MASS()
计算恒星质量 Bell et al. color-based method.
  • GANG_PLOT_POS
画图用的,类似于multiplot,但是好像更简单。用法
 struct=gang_plot_pos(nrow,ncol,col,row, [XTICKFORMAT=,YTICKFORMAT=,                       OFFSET=,SIZE=, /POSITION_ONLY]
 plot,findgen(10),  _EXTRA=gang_plot_pos(2,1,0)  plot,findgen(10)^2,_EXTRA=gang_plot_pos(2,1,1)
  • findex
计算一个浮点的位置,可用于插值,例子
 u=randomu(iseed,200000) & u=u(sort(u)) 
 v=randomu(iseed,10)   
 fx=findex(u,v);计算v这个数字(数组)在排序之后的u数组中间的位置
 v2=interpolate(u,fx)插值 ;interpolate是IDL内置的插值函数
 print,v,v2 ;可以看到v2几乎等于v