In [ ]:
# This changes the current directory to the base saga directory - make sure to run this first!
# This is necessary to be able to import the py files and use the right directories,
# while keeping all the notebooks in their own directory.
import os
import sys
if 'saga_base_dir' not in locals():
saga_base_dir = os.path.abspath('..')
if saga_base_dir not in sys.path:
os.chdir(saga_base_dir)
In [124]:
for module in ['hosts', 'targeting', 'magellan']:
if module in globals():
reload(globals()[module])
else:
globals()[module] = __import__(module)
#g = targeting.get_gama() #re-caches the gama catalog
In [48]:
hhecto = hosts.NSAHost(147100)
hnew = hosts.NSAHost(150238,'N7393')
In [22]:
hnew.sdss_environs_query(True)
hnew.usnob_environs_query(True)
In [82]:
hhecto.sdss_environs_query(True)
hhecto.usnob_environs_query(True)
In [26]:
magellan.build_imacs_targeting_files(hnew, 'Munoz', onlygals=True)
In [43]:
hnew.physical_to_projected(300)
Out[43]:
In [44]:
(coords.Angle('22h51m37.8s') - coords.Angle(20/60,'degree')).hms
Out[44]:
In [49]:
magellan.plot_imacs_masks(hnew)
In [52]:
magellan.imagelist_imacs_targets('imacs_targets/N7393_4.SMF')
Out[52]:
In [83]:
magellan.build_imacs_targeting_files(hhecto, 'Munoz', onlygals=True)
In [127]:
fncat = 'imacs_targets/{0}.cat'.format(hhecto.name)
fnhecto = 'mmthecto/try4_finish_NSA147100.cfg'
fnout = 'imacs_targets/{0}.filtered.cat'.format(hhecto.name)
remras, remdecs = magellan.reprocess_catalog_for_prev_mmt_obs(fncat, fnhecto, fnout, hectofields=[4,5,6,7,8,9,10], magrng=(21,-100),tolarcsec=1)
remras2, remdecs2 = magellan.reprocess_catalog_for_prev_mmt_obs(fnout, fnhecto, fnout, hectofields=[1,2,3], magrng=(20,-100),tolarcsec=1)
In [131]:
figure(figsize=(12,10))
magellan.plot_imacs_masks(hhecto)
scatter(remras,remdecs,lw=0,s=5,c='r')
scatter(remras2,remdecs2,lw=0,s=8,c='b')
title('removed from hecto')
Out[131]:
In [ ]: