In [1]:
import apogee.modelspec.moog
from apogee.modelatm import atlas9
import apogee.spec.plot as splot

A quick check of the resolution at which we need to run MOOG for the APOGEE resolution ($ R \approx 22,500$)

Let's generate a spectrum at $T_{\mathrm{eff}} = 4500 K$, $\log g = 2.5$ and solar abundances


In [2]:
atm= atlas9.Atlas9Atmosphere(teff=4500.,logg=2.5,metals=0.,am=0.,cm=0.)
synspec_jonres= apogee.modelspec.moog.synth(modelatm=atm,
                                            linelist='moog.201405291900.vac',lsf='combo',cont='aspcap',
                                            vmacro=6.,isotopes='solar',
                                            dw=0.1)
synspec_hires= apogee.modelspec.moog.synth(modelatm=atm,
                                            linelist='moog.201405291900.vac',lsf='combo',cont='aspcap',
                                            vmacro=6.,isotopes='solar',
                                            dw=0.01)


/Library/Python/2.7/site-packages/numpy/core/fromnumeric.py:2507: VisibleDeprecationWarning: `rank` is deprecated; use the `ndim` attribute or function instead. To find the rank of a matrix see `numpy.linalg.matrix_rank`.
  VisibleDeprecationWarning)

                                                                                

In [3]:
for panel in apogee.spec.plot.highres(synspec_jonres[0],synspec_hires[0],(synspec_hires[0]-synspec_jonres[0])*10.+0.25,
                                      yrange=[0.1,1.2],color=['b','g','gold'],labelLines=True,cleanZero=False,fig_width=14.):
    show()


/Library/Python/2.7/site-packages/numpy/lib/nanfunctions.py:220: RuntimeWarning: All-NaN axis encountered
  warnings.warn("All-NaN axis encountered", RuntimeWarning)

Residuals everywhere


In [4]:
print numpy.nanstd(synspec_hires[0]-synspec_jonres[0]), numpy.nanmax(numpy.fabs(synspec_hires[0]-synspec_jonres[0]))


9.65936363077e-05 0.00066356771543

In [5]:
plot(synspec_hires[0]-synspec_jonres[0])


Out[5]:
[<matplotlib.lines.Line2D at 0x10e9f6090>]

In [5]: