In [46]:
try:
    reload(mwstreams.GD1)
    reload(mwstreams.Ophiuchus)
except NameError:
    import mwstreams.GD1
    import mwstreams.Ophiuchus
from galpy.potential import MWPotential2014, LogarithmicHaloPotential
lp= LogarithmicHaloPotential(normalize=1.,q=0.9)
from matplotlib import pyplot
from galpy.util import bovy_plot

Quick models of tidal streams

GD1


In [21]:
gd1= mwstreams.GD1.GD1()
gd1mw= mwstreams.GD1.GD1()
gd1.orbitFit(lp,ro=8.5,tintJ=3.,ntintJ=3000,_logpfidfit=True)
gd1mw.orbitFit(MWPotential2014,ro=8.,tintJ=3.,ntintJ=3000,_mwpotfidfit=True)
gd1.setupStream(leading=True,initTrailingEnd=True)
gd1.setupStream(leading=False,initLeadingEnd=True)
gd1mw.setupStream(leading=True,initTrailingEnd=True)
gd1mw.setupStream(leading=False,initLeadingEnd=True)

In [47]:
figsize(10,10)
subplot(2,2,1)
gd1.plotData(d1='phi1',d2='phi2',xrange=[-80.,20.],yrange=[-4.,2.],gcf=True)
gd1.plotOrbitFit(d1='phi1',d2='phi2',overplot=True,color='k')
line1= pyplot.gca().lines[-1]
gd1mw.plotOrbitFit(d1='phi1',d2='phi2',overplot=True,color='k',ls='--')
line2= pyplot.gca().lines[-1]
pyplot.legend([line1,line2],
              (r'$\mathrm{Log.\ Pot.}$',
               r'$\mathrm{MWPotential2014}$'),
               loc='lower right',#bbox_to_anchor=(.91,.375),
               numpoints=2,
               prop={'size':14},
               frameon=False)
subplot(2,2,2)
gd1.plotData(d1='phi1',d2='dist',xrange=[-80.,20.],yrange=[5.,15.],gcf=True)
gd1.plotOrbitFit(d1='phi1',d2='dist',overplot=True,color='k')
gd1mw.plotOrbitFit(d1='phi1',d2='dist',overplot=True,color='k',ls='--')
subplot(2,2,3)
gd1.plotData(d1='phi1',d2='pmphi1',xrange=[-80.,20.],yrange=[-15.,5.],color='r',gcf=True)
gd1.plotData(d1='phi1',d2='pmphi2',xrange=[-80.,20.],yrange=[-15.,5.],color='b',overplot=True)
gd1.plotOrbitFit(d1='phi1',d2='pmphi1',overplot=True,color='k')
gd1.plotOrbitFit(d1='phi1',d2='pmphi2',overplot=True,color='k')
gd1mw.plotOrbitFit(d1='phi1',d2='pmphi1',overplot=True,color='k',ls='--')
gd1mw.plotOrbitFit(d1='phi1',d2='pmphi2',overplot=True,color='k',ls='--')
subplot(2,2,4)
gd1.plotData(d1='phi1',d2='vlos',xrange=[-80.,20.],yrange=[-400.,200.],gcf=True)
gd1.plotOrbitFit(d1='phi1',d2='vlos',overplot=True,color='k')
gd1mw.plotOrbitFit(d1='phi1',d2='vlos',overplot=True,color='k',ls='--')
bovy_plot.bovy_end_print('GD1-orbit-fit.png')

In [48]:
figsize(10,10)
subplot(2,2,1)
gd1.plotData(d1='phi1',d2='phi2',xrange=[-80.,20.],yrange=[-4.,2.],gcf=True)
gd1.plotOrbitFit(d1='phi1',d2='phi2',overplot=True,color='k',ls='--')
line1= pyplot.gca().lines[-1]
gd1.plotStreamTrack(d1='phi1',d2='phi2',overplot=True,color='k')
line2= pyplot.gca().lines[-1]
pyplot.legend([line2,line1],
              (r'$\mathrm{Log.\ Pot.\ Stream\ tracks}$',
               r'$\mathrm{Orbit\ Fit}$'),
               loc='lower right',#bbox_to_anchor=(.91,.375),
               numpoints=2,
               prop={'size':14},
               frameon=False)
subplot(2,2,2)
gd1.plotData(d1='phi1',d2='dist',xrange=[-80.,20.],yrange=[5.,15.],gcf=True)
gd1.plotOrbitFit(d1='phi1',d2='dist',overplot=True,color='k',ls='--')
gd1.plotStreamTrack(d1='phi1',d2='dist',overplot=True,color='k')
subplot(2,2,3)
gd1.plotData(d1='phi1',d2='pmphi1',xrange=[-80.,20.],yrange=[-15.,5.],color='r',gcf=True)
gd1.plotData(d1='phi1',d2='pmphi2',xrange=[-80.,20.],yrange=[-15.,5.],color='b',overplot=True)
gd1.plotStreamTrack(d1='phi1',d2='pmphi1',overplot=True,color='k')
gd1.plotStreamTrack(d1='phi1',d2='pmphi2',overplot=True,color='k')
gd1.plotOrbitFit(d1='phi1',d2='pmphi1',overplot=True,color='k',ls='--')
gd1.plotOrbitFit(d1='phi1',d2='pmphi2',overplot=True,color='k',ls='--')
subplot(2,2,4)
gd1.plotData(d1='phi1',d2='vlos',xrange=[-80.,20.],yrange=[-400.,200.],gcf=True)
gd1.plotStreamTrack(d1='phi1',d2='vlos',overplot=True,color='k')
gd1.plotOrbitFit(d1='phi1',d2='vlos',overplot=True,color='k',ls='--')
bovy_plot.bovy_end_print('GD1-logpot-stream.png')

In [49]:
figsize(10,10)
subplot(2,2,1)
gd1mw.plotData(d1='phi1',d2='phi2',xrange=[-80.,20.],yrange=[-4.,2.],gcf=True)
gd1mw.plotOrbitFit(d1='phi1',d2='phi2',overplot=True,color='k',ls='--')
line1= pyplot.gca().lines[-1]
gd1mw.plotStreamTrack(d1='phi1',d2='phi2',overplot=True,color='k')
line2= pyplot.gca().lines[-1]
pyplot.legend([line2,line1],
              (r'$\mathrm{MWPotential2014\ Stream\ tracks}$',
               r'$\mathrm{Orbit\ Fit}$'),
               loc='lower right',#bbox_to_anchor=(.91,.375),
               numpoints=2,
               prop={'size':14},
               frameon=False)
subplot(2,2,2)
gd1mw.plotData(d1='phi1',d2='dist',xrange=[-80.,20.],yrange=[5.,15.],gcf=True)
gd1mw.plotOrbitFit(d1='phi1',d2='dist',overplot=True,color='k',ls='--')
gd1mw.plotStreamTrack(d1='phi1',d2='dist',overplot=True,color='k')
subplot(2,2,3)
gd1mw.plotData(d1='phi1',d2='pmphi1',xrange=[-80.,20.],yrange=[-15.,5.],color='r',gcf=True)
gd1mw.plotData(d1='phi1',d2='pmphi2',xrange=[-80.,20.],yrange=[-15.,5.],color='b',overplot=True)
gd1mw.plotStreamTrack(d1='phi1',d2='pmphi1',overplot=True,color='k')
gd1mw.plotStreamTrack(d1='phi1',d2='pmphi2',overplot=True,color='k')
gd1mw.plotOrbitFit(d1='phi1',d2='pmphi1',overplot=True,color='k',ls='--')
gd1mw.plotOrbitFit(d1='phi1',d2='pmphi2',overplot=True,color='k',ls='--')
subplot(2,2,4)
gd1mw.plotData(d1='phi1',d2='vlos',xrange=[-80.,20.],yrange=[-400.,200.],gcf=True)
gd1mw.plotStreamTrack(d1='phi1',d2='vlos',overplot=True,color='k')
gd1mw.plotOrbitFit(d1='phi1',d2='vlos',overplot=True,color='k',ls='--')
bovy_plot.bovy_end_print('GD1-mwp14-stream.png')

Ophiuchus


In [63]:
oph= mwstreams.Ophiuchus.Ophiuchus()
ophmw= mwstreams.Ophiuchus.Ophiuchus()
oph.orbitFit(lp,ro=8.5,tintJ=.3,ntintJ=3000,_logpfidfit=True)
ophmw.orbitFit(MWPotential2014,ro=8.,tintJ=0.3,ntintJ=3000,_mwpotfidfit=True)
oph.setupStream(leading=True,initTrailingEnd=True)
oph.setupStream(leading=False,initLeadingEnd=True)
ophmw.setupStream(leading=True,initTrailingEnd=True)
ophmw.setupStream(leading=False,initLeadingEnd=True)

In [67]:
figsize(10,10)
subplot(2,2,1)
oph.plotData(d1='ll',d2='bb',gcf=True)
oph.plotOrbitFit(d1='ll',d2='bb',overplot=True,color='k')
line1= pyplot.gca().lines[-1]
ophmw.plotOrbitFit(d1='ll',d2='bb',overplot=True,color='k',ls='--')
line2= pyplot.gca().lines[-1]
pyplot.legend([line1,line2],
              (r'$\mathrm{Log.\ Pot.}$',
               r'$\mathrm{MWPotential2014}$'),
               loc='lower right',#bbox_to_anchor=(.91,.375),
               numpoints=2,
               prop={'size':14},
               frameon=False)
subplot(2,2,2)
oph.plotData(d1='ll',d2='dist',gcf=True)
oph.plotOrbitFit(d1='ll',d2='dist',overplot=True,color='k')
ophmw.plotOrbitFit(d1='ll',d2='dist',overplot=True,color='k',ls='--')
subplot(2,2,3)
oph.plotData(d1='ll',d2='pmll',color='r',gcf=True)
oph.plotData(d1='ll',d2='pmbb',color='b',overplot=True)
oph.plotOrbitFit(d1='ll',d2='pmll',overplot=True,color='k')
oph.plotOrbitFit(d1='ll',d2='pmbb',overplot=True,color='k')
ophmw.plotOrbitFit(d1='ll',d2='pmll',overplot=True,color='k',ls='--')
ophmw.plotOrbitFit(d1='ll',d2='pmbb',overplot=True,color='k',ls='--')
subplot(2,2,4)
oph.plotData(d1='ll',d2='vlos',gcf=True)
oph.plotOrbitFit(d1='ll',d2='vlos',overplot=True,color='k')
ophmw.plotOrbitFit(d1='ll',d2='vlos',overplot=True,color='k',ls='--')
bovy_plot.bovy_end_print('Ophiuchus-orbit-fit.png')

In [68]:
figsize(10,10)
subplot(2,2,1)
oph.plotData(d1='ll',d2='bb',gcf=True)
oph.plotOrbitFit(d1='ll',d2='bb',overplot=True,color='k',ls='--')
line1= pyplot.gca().lines[-1]
oph.plotStreamTrack(d1='ll',d2='bb',overplot=True,color='k')
line2= pyplot.gca().lines[-1]
pyplot.legend([line2,line1],
              (r'$\mathrm{Log.\ Pot.\ Stream\ tracks}$',
               r'$\mathrm{Orbit\ Fit}$'),
               loc='lower right',#bbox_to_anchor=(.91,.375),
               numpoints=2,
               prop={'size':14},
               frameon=False)
subplot(2,2,2)
oph.plotData(d1='ll',d2='dist',gcf=True)
oph.plotOrbitFit(d1='ll',d2='dist',overplot=True,color='k',ls='--')
oph.plotStreamTrack(d1='ll',d2='dist',overplot=True,color='k')
subplot(2,2,3)
oph.plotData(d1='ll',d2='pmll',color='r',gcf=True)
oph.plotData(d1='ll',d2='pmbb',color='b',overplot=True)
oph.plotStreamTrack(d1='ll',d2='pmll',overplot=True,color='k')
oph.plotStreamTrack(d1='ll',d2='pmbb',overplot=True,color='k')
oph.plotOrbitFit(d1='ll',d2='pmll',overplot=True,color='k',ls='--')
oph.plotOrbitFit(d1='ll',d2='pmbb',overplot=True,color='k',ls='--')
subplot(2,2,4)
oph.plotData(d1='ll',d2='vlos',gcf=True)
oph.plotStreamTrack(d1='ll',d2='vlos',overplot=True,color='k')
oph.plotOrbitFit(d1='ll',d2='vlos',overplot=True,color='k',ls='--')
bovy_plot.bovy_end_print('Ophiuchus-logpot-stream.png')

In [69]:
figsize(10,10)
subplot(2,2,1)
ophmw.plotData(d1='ll',d2='bb',gcf=True)
ophmw.plotOrbitFit(d1='ll',d2='bb',overplot=True,color='k',ls='--')
line1= pyplot.gca().lines[-1]
ophmw.plotStreamTrack(d1='ll',d2='bb',overplot=True,color='k')
line2= pyplot.gca().lines[-1]
pyplot.legend([line2,line1],
              (r'$\mathrm{MWPotential2014\ Stream\ tracks}$',
               r'$\mathrm{Orbit\ Fit}$'),
               loc='lower right',#bbox_to_anchor=(.91,.375),
               numpoints=2,
               prop={'size':14},
               frameon=False)
subplot(2,2,2)
ophmw.plotData(d1='ll',d2='dist',gcf=True)
ophmw.plotOrbitFit(d1='ll',d2='dist',overplot=True,color='k',ls='--')
ophmw.plotStreamTrack(d1='ll',d2='dist',overplot=True,color='k')
subplot(2,2,3)
ophmw.plotData(d1='ll',d2='pmll',color='r',gcf=True)
ophmw.plotData(d1='ll',d2='pmbb',color='b',overplot=True)
ophmw.plotStreamTrack(d1='ll',d2='pmll',overplot=True,color='k')
ophmw.plotStreamTrack(d1='ll',d2='pmbb',overplot=True,color='k')
ophmw.plotOrbitFit(d1='ll',d2='pmll',overplot=True,color='k',ls='--')
ophmw.plotOrbitFit(d1='ll',d2='pmbb',overplot=True,color='k',ls='--')
subplot(2,2,4)
ophmw.plotData(d1='ll',d2='vlos',gcf=True)
ophmw.plotStreamTrack(d1='ll',d2='vlos',overplot=True,color='k')
ophmw.plotOrbitFit(d1='ll',d2='vlos',overplot=True,color='k',ls='--')
bovy_plot.bovy_end_print('Ophiuchus-mwp14-stream.png')

In [ ]: