In [2]:
%matplotlib inline
import om10
import numpy as np
import matplotlib.pyplot as plt
In [4]:
db = om10.DB(catalog="/Users/mbaumer/pybin/OM10/data/qso_mock.fits")
id = 7176527
lens = db.get_lens(id)
In [24]:
print lens.names
print lens.item
In [6]:
db.select_random(maglim=22.1,area=30000.0,IQ=1.0)
db.write_table("OM10_PS1_mock_lensed_quasars.fits")
pars = ['ZLENS','ZSRC','APMAG_I','MAGI','IMSEP']
db.export_to_cpt(pars,"OM10_PS1_mock_lensed_quasars.cpt")
In [5]:
from numpy import rec
_ = plt.hist(db.lenses['MAGI'],bins=30)
print np.max(db.lenses['MAGI'])
In [59]:
print type(db.lenses)
15658/995
Out[59]:
In [17]:
om10.plot_lens(lens)