%pylab inline from orbitutils import OrbitPopulation import numpy as np def demoplot(population,bins=50): figure(figsize=(12,6)) ax1=subplot(121) hist(population.Rsky,bins=bins,lw=3,histtype='step') xlabel('On-sky separation [projected AU]') ax2=subplot(122) hist(population.RV,bins=bins,lw=3,histtype='step') xlabel('Radial Velocity [km/s]') return ax1,ax2 pop = OrbitPopulation(1,1,100,n=1e4) demoplot(pop) pop.scatterplot() ecc = 0.3 pop = OrbitPopulation(1,1,100,n=1e4,ecc=ecc) print pop.semimajor ax1,ax2 = demoplot(pop) ax1.axvline(pop.semimajor.value*(1-ecc),color='r',ls=':') pop.scatterplot() pop = OrbitPopulation(1,1,np.linspace(1,1000,1e4)) demoplot(pop) pop.scatterplot()