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 sagadir not in sys.path:
os.chdir(saga_base_dir)
In [138]:
import wiyn
import mmthecto
import magellan
import targeting
import hosts
from astropy import coordinates as coords
from astropy import units as u
from astropy.io import ascii
In [159]:
reload(targeting)
reload(hosts)
reload(wiyn)
reload(mmthecto)
reload(magellan);
In [160]:
h1 = hosts.beowulf
h2 = hosts.starwars
In [48]:
print h1.distmod,h1.projected_to_physical(30*u.arcmin)
In [49]:
h1.usnob_environs_query(dl=True)
In [53]:
h1.sdss_environs_query(dl=True, inclphotzs=True)
In [66]:
fullcat = h1.get_sdss_catalog()
In [161]:
# select faintlimit to get ~2 good pointings
#fibermag/color cuts based on estimates from 2013Aug
targetcatdct=dict(faintlimit=21, outercutrad=30*u.arcmin, colorcuts=targeting.bossanova_color_cuts, removegalsathighz=True,
removeallsdss=False,galvsallcutoff=21)
#!rm hydra_targets/Beowulf.cat
targetcat=wiyn.construct_master_catalog(h1,targetcat=targetcatdct, fibermaglimit=22.5, orderby=['r','lowphotz'])
In [165]:
plot(targetcat['r']);
In [166]:
plot(targetcat['photz']);
In [177]:
#need to manually remove some galaxies from FOP list by editing the master catalog
wiyn.imagelist_from_master('hydra_targets/{0}.cat'.format(h1.name),'fop', copytoclipboard=False, openurl=True);
In [173]:
#repeat this as much as necessary to get all configs, running do_whydra on turtle each time
wiyn.generate_ast_file('hydra_targets/{h1.name}.cat'.format(**locals()),
lst=6,texp=2, faintmagcut=20, scpname='turtle')
In [174]:
wiyn.generate_ast_file('hydra_targets/{h1.name}.cat'.format(**locals()),
lst=8,texp=2, faintmagcut=20, scpname='turtle')
In [176]:
wiyn.generate_ast_file('hydra_targets/{h1.name}.cat'.format(**locals()),
lst=10,texp=2, faintmagcut=20, scpname='turtle')
In [180]:
wiyn.generate_ast_file('hydra_targets/{h1.name}.cat'.format(**locals()),
lst=10,texp=2, faintmagcut=20, scpname='turtle')
In [181]:
wiyn.generate_ast_file('hydra_targets/{h1.name}.cat'.format(**locals()),
lst=10,texp=2, faintmagcut=20, scpname='turtle')
In [185]:
wiyn.generate_ast_file('hydra_targets/{h1.name}.cat'.format(**locals()),
lst=12,texp=2, faintmagcut=20, scpname='turtle')
In [192]:
#now switch to 21
wiyn.generate_ast_file('hydra_targets/{h1.name}.cat'.format(**locals()),
lst=12,texp=2, faintmagcut=21, scpname='turtle',finame='Beowulf_%i-to21')
In [193]:
wiyn.generate_ast_file('hydra_targets/{h1.name}.cat'.format(**locals()),
lst=12,texp=2, faintmagcut=21, scpname='turtle',finame='Beowulf_%i-to21')
In [194]:
wiyn.generate_ast_file('hydra_targets/{h1.name}.cat'.format(**locals()),
lst=12,texp=2, faintmagcut=21, scpname='turtle',finame='Beowulf_%i-to21')
In [195]:
wiyn.generate_ast_file('hydra_targets/{h1.name}.cat'.format(**locals()),
lst=12,texp=2, faintmagcut=21, scpname='turtle',finame='Beowulf_%i-to21')
In [196]:
wiyn.generate_ast_file('hydra_targets/{h1.name}.cat'.format(**locals()),
lst=12,texp=2, faintmagcut=21, scpname='turtle',finame='Beowulf_%i-to21')
In [198]:
wiyn.imagelist_fibers('hydra_targets/Beowulf_12-to21.hydra','target');
In [ ]:
In [ ]:
In [205]:
#repeat this to make 3 *more* configs, but with a fainter limit, running do_whydra on turtle each time
wiyn.generate_ast_file('hydra_targets/{h.name}.cat'.format(**locals()),
lst=11,texp=2, faintmagcut=21, scpname='turtle')
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [201]:
wiyn.generate_wiyn_cache('hydra_targets/feb2014.cachelist',
['hydra_targets/Beowulf*.hydra', 'hydra_targets/NGC5485_*.hydra', 'hydra_targets/StarWars_*.hydra'])
In [ ]: