In [1]:
%matplotlib inline
from __future__ import division
import om10,os
import numpy as np
import matplotlib.pyplot as plt
import triangle

In [5]:
db = om10.DB(catalog='$OM10_DIR/data/qso_mock.fits')
db.lenses


Out[5]:
LENSIDFLAGTYPENIMGZLENSVELDISP...SIGCRITDSLUML_IREFFREFF_T
14428020.062264.2409...0.035956.60.00.00.0
21703020.072165.1962...0.08193.90.00.00.0
31711020.082155.9553...0.035956.60.00.00.0
34331020.084172.5838...0.014498.40.00.00.0
51810020.096244.9063...0.026239.20.00.00.0
83414020.114154.17...0.011904.10.00.00.0
115074020.128113.5011...0.07101.160.00.00.0
125027020.13247.1724...0.016302.50.00.00.0
147709020.138200.9093...0.017748.40.00.00.0
180815020.148185.3532...0.014029.40.00.00.0
202550040.154181.134...0.08794.670.00.00.0
.................................
113167635021.936250.6109...0.047637.10.00.00.0
115614728041.96242.1029...0.038304.50.00.00.0
118666840021.99207.9697...0.027265.90.00.00.0
120546345022.008281.8383...0.028090.10.00.00.0
123598414022.038199.5262...0.031000.10.00.00.0
129002676022.09236.0478...0.039270.70.00.00.0
138366386022.18227.5097...0.036169.70.00.00.0
157075130022.358258.8213...0.029955.80.00.00.0
168229053022.464200.9093...0.048954.00.00.00.0
185790887022.63215.7744...0.042184.90.00.00.0
193208710022.7259.4179...0.037235.80.00.00.0

In [6]:
test_lens = db.get_lens(5924799)
test_lens


Out[6]:
LENSIDFLAGTYPENIMGZLENSVELDISP...SIGCRITDSLUML_IREFFREFF_T
5924799040.516235.5049...0.012636.80.00.00.0

In [7]:
om10.plot_lens(test_lens)


om10.plot_lens: plotting image configuration of lens ID  5924799
om10.plot_lens: lens, image magnitudes: 19.9553566 [ 19.55916786  20.40661523  21.98854659  19.53562427]

In [10]:
test_lens['XIMG'], test_lens['YIMG']


Out[10]:
(<Column name='XIMG' unit=None format=None description=None>
 array([[-0.2291,  0.5897, -1.1676,  0.3106]]),
 <Column name='YIMG' unit=None format=None description=None>
 array([[-0.7459, -0.6133,  0.3543,  0.4498]]))

In [8]:
input_cat = om10.DB(catalog='./input_cat_for_eric.fits')

In [10]:
test_sim = input_cat.get_lens(5924799)
test_sim


Out[10]:
LENSIDRADEC...IZ
5924799.034.64855907-7.843399404...18.9247718.41967
5924799.034.6485409841-7.84370237622...17.267657860917.2377178609
5924799.034.6482323468-7.84338776511...18.115105233318.0851652333
5924799.034.6486761094-7.84328101511...19.697036589419.6670965894
5924799.034.6484111865-7.84366326511...17.244114272117.2141742721

In [11]:
plt.plot(3600*test_sim['RA'][0],3600*test_sim['DEC'][0],color='Orange',marker='+')
plt.plot(3600*test_sim['RA'][1:],3600*test_sim['DEC'][1:],color='Blue',marker='+',linestyle='None')


Out[11]:
[<matplotlib.lines.Line2D at 0x1092b6090>]

input catalog is mirrored in RA from what it should be...

Update: now fixed. Let's commit this and close the issue.


In [ ]: