In [1]:
# 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 [2]:
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 [5]:
h1 = hosts.hamlet
h2 = hosts.NSAHost(165153)
h3 = hosts.NSAHost(165980)
h4 = hosts.NSAHost(63326)
In [12]:
wiyn.imagelist_fibers('hydra_targets/Hamlet_1.hydra', 'fop')
Out[12]:
In [13]:
print h1.distmod, h1.projected_to_physical(30*u.arcmin)
In [14]:
h1.usnob_environs_query(dl=True)
In [25]:
h1.sdss_environs_query(dl=True, inclphotzs=True)
In [30]:
best = fits.getdata('hydra_targets/bestbright_' + str(h1.nsaid) + '.fits')
wiyn.construct_master_catalog(h1, targetcat=best,fnout='hydra_targets/Hamlet_best.cat');
In [39]:
wiyn.imagelist_from_master('hydra_targets/Hamlet_best.cat', 'fop')
#use this to clean out bad FOPS
Out[39]:
In [40]:
wiyn.generate_ast_file('hydra_targets/{h1.name}_best.cat'.format(**locals()), lst=18,texp=2, scpname='turtle')
# only make one config for this because there's only 30-some targets
In [102]:
#check
wiyn.imagelist_fibers('hydra_targets/Hamlet_best_1.hydra','target')
Out[102]:
In [119]:
print h1.coords
h1.sdss_image_cutout(targets=wiyn.parse_master('hydra_targets/{0}_best.cat'.format(h1.name),'target'),
scale=40*u.arcmin, imagesize=(1024, 1024),raoffset=0*u.arcmin)
Out[119]:
In [43]:
print h2.distmod, h2.projected_to_physical(30*u.arcmin)
In [44]:
h2.usnob_environs_query(dl=True)
In [45]:
h2.sdss_environs_query(dl=True, inclphotzs=True)
In [106]:
best = fits.getdata('hydra_targets/bestbright_' + str(h2.nsaid) + '.fits')
wiyn.construct_master_catalog(h2, targetcat=best,fnout='hydra_targets/{0}_best.cat'.format(h2.name));
In [58]:
wiyn.imagelist_from_master('hydra_targets/{0}_best.cat'.format(h2.name), 'fop')
#use this to clean out bad FOPS
Out[58]:
In [110]:
wiyn.generate_ast_file('hydra_targets/{0}_best.cat'.format(h2.name), lst=18,texp=2, scpname='turtle')
# only make one config for this because there's only 30-some targets
In [118]:
print h2.coords
h2.sdss_image_cutout(targets=wiyn.parse_master('hydra_targets/{0}_best.cat'.format(h2.name),'target'),
scale=40*u.arcmin, imagesize=(1024, 1024),raoffset=0*u.arcmin)
Out[118]:
In [75]:
print h3.distmod, h3.projected_to_physical(30*u.arcmin)
In [76]:
h3.usnob_environs_query(dl=True)
In [77]:
h3.sdss_environs_query(dl=True, inclphotzs=True)
In [107]:
best = fits.getdata('hydra_targets/bestbright_' + str(h3.nsaid) + '.fits')
wiyn.construct_master_catalog(h3, targetcat=best,fnout='hydra_targets/{0}_best.cat'.format(h3.name), usnosdssoffsettol = .75);
In [86]:
wiyn.imagelist_from_master('hydra_targets/{0}_best.cat'.format(h3.name), 'fop')
#use this to clean out bad FOPS
Out[86]:
In [112]:
wiyn.generate_ast_file('hydra_targets/{0}_best.cat'.format(h3.name), lst=18,texp=2, scpname='turtle')
# only make one config for this because there's only 30-some targets
In [116]:
print h3.coords
h3.sdss_image_cutout(targets=wiyn.parse_master('hydra_targets/{0}_best.cat'.format(h3.name),'target'),
scale=40*u.arcmin, imagesize=(1024, 1024),raoffset=0*u.arcmin)
Out[116]:
In [88]:
print h4.distmod, h4.projected_to_physical(30*u.arcmin)
In [89]:
h4.usnob_environs_query(dl=True)
In [95]:
h4.sdss_environs_query(dl=True, inclphotzs=True)
In [108]:
best = fits.getdata('hydra_targets/bestbright_' + str(h4.nsaid) + '.fits')
wiyn.construct_master_catalog(h4, targetcat=best,fnout='hydra_targets/{0}_best.cat'.format(h4.name));
In [99]:
wiyn.imagelist_from_master('hydra_targets/{0}_best.cat'.format(h4.name), 'fop')
#use this to clean out bad FOPS
Out[99]:
In [115]:
wiyn.generate_ast_file('hydra_targets/{0}_best.cat'.format(h4.name), lst=18,texp=2, scpname='turtle')
# only make one config for this because there's only 30-some targets
In [117]:
print h4.coords
h4.sdss_image_cutout(targets=wiyn.parse_master('hydra_targets/{0}_best.cat'.format(h4.name),'target'),
scale=40*u.arcmin, imagesize=(1024, 1024),raoffset=0*u.arcmin)
Out[117]:
In [ ]: