def main(): log = logging.getLogger('andromap') log.setLevel(logging.DEBUG) ch = logging.StreamHandler() ch.setLevel(logging.DEBUG) formatter = logging.Formatter( '%(asctime)s - %(name)s - %(levelname)s - %(message)s') ch.setFormatter(formatter) log.addHandler(ch) pngpath = os.path.expanduser("~/andromap/Elixir_B3_r.resamp.inverted.png") fitspath = os.path.expanduser("~/andromap/Elixir_B3_r.resamp.fits") m = Andromap(fitspath, figsize=(3.5, 3.5)) m.fig.show_rgb(pngpath) m.plot_combined_fields({"INSTRUME": "WIRCam", "TYPE": "sci"}, edgecolor=RED, lw=1.5) m.plot_combined_fields({"INSTRUME": "WIRCam", "TYPE": "sci", "RUNID": {'$in': ['07BC20', '09BC29']}}, edgecolor=RED, lw=3.) # m.plot_fields({"INSTRUME": "WIRCam", "TYPE": "sky", # "RUNID": {"$in": ['07BC20', '07BH47']}}, # edgecolor=RED, lw=0.8) # m.plot_fields({"INSTRUME": "WIRCam", "TYPE": "sky", # "RUNID": {"$in": ['09BC29']}}, # edgecolor=RED, lw=0.8) m.plot_combined_fields({"INSTRUME": "MegaPrime", "lsb_mosaic.kind": "sci"}, edgecolor=BLUE, lw=3.) m.plot_combined_fields({"INSTRUME": "MegaPrime", "lsb_mosaic.kind": "sky"}, edgecolor=BLUE, lw=0.8) m.plot_phat(union=True, edgecolor=GREEN, facecolor='None', lw=2.) radii = np.arange(10., 50., 10.) prof = read_release() m.plot_xvista_profile_ellipse_grid(prof, radii, zorder=100, edgecolor='0.2', alpha=0.7) m.save("oxford_map_zoomin.pdf", format='pdf', dpi=300, transparent=True, adjust_bbox=True) m.fig.recenter(M31RA0, M31DEC0, radius=4) # , width=9, height=9) m.save("oxford_map.pdf", format='pdf', dpi=300, transparent=True, adjust_bbox=True)
def main(): log = logging.getLogger("andromap") log.setLevel(logging.DEBUG) ch = logging.StreamHandler() ch.setLevel(logging.DEBUG) formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s") ch.setFormatter(formatter) log.addHandler(ch) pngpath = os.path.expanduser("~/andromap/Elixir_B3_r.resamp.inverted.png") fitspath = os.path.expanduser("~/andromap/Elixir_B3_r.resamp.fits") m = Andromap(fitspath, figsize=(3.5, 3.5)) m.fig.show_rgb(pngpath) m.plot_combined_fields({"INSTRUME": "WIRCam", "TYPE": "sci"}, edgecolor="r") m.plot_combined_fields({"INSTRUME": "WIRCam", "TYPE": "sky", "RUNID": {"$in": ["07BC20", "07BH47"]}}, edgecolor="r") m.plot_combined_fields({"INSTRUME": "MegaPrime", "lsb_mosaic.kind": "sci"}, edgecolor="b") m.plot_phat(union=True) m.plot_hst_halo(label=True) m.save("hst_footprint.pdf", format="pdf", dpi=300, transparent=True, adjust_bbox=True)
def main(): log = logging.getLogger('andromap') log.setLevel(logging.DEBUG) ch = logging.StreamHandler() ch.setLevel(logging.DEBUG) formatter = logging.Formatter( '%(asctime)s - %(name)s - %(levelname)s - %(message)s') ch.setFormatter(formatter) log.addHandler(ch) pngpath = os.path.expanduser("~/andromap/Elixir_B3_r.resamp.inverted.png") fitspath = os.path.expanduser("~/andromap/Elixir_B3_r.resamp.fits") m = Andromap(fitspath, figsize=(3.5, 3.5)) m.fig.show_rgb(pngpath) m.plot_combined_fields({"INSTRUME": "WIRCam", "TYPE": "sci"}, edgecolor='r') m.plot_combined_fields({"INSTRUME": "WIRCam", "TYPE": "sky", "RUNID": {"$in": ['07BC20', '07BH47']}}, edgecolor='r') m.plot_combined_fields({"INSTRUME": "MegaPrime", "lsb_mosaic.kind": "sci"}, edgecolor='b') m.plot_phat(union=True) # Plot archival fields m.plot_narrowband_fields(['SW1', 'SW2', 'NGC205'], facecolor='g', alpha=0.7) # Plot observed fields observed = ["AGB_%i" % i for i in range(1, 17)] m.plot_narrowband_fields(observed, facecolor='orange', alpha=0.6) # Plot un-observed fields unobserved = ["AGB_%i" % i for i in range(17, 21)] m.plot_narrowband_fields(unobserved, edgecolor='purple', linestyle='solid') m.save("narrowband_footprint.pdf", format='pdf', dpi=300, transparent=True, adjust_bbox=True)
def main(): log = logging.getLogger('andromap') log.setLevel(logging.DEBUG) ch = logging.StreamHandler() ch.setLevel(logging.DEBUG) formatter = logging.Formatter( '%(asctime)s - %(name)s - %(levelname)s - %(message)s') ch.setFormatter(formatter) log.addHandler(ch) pngpath = os.path.expanduser("~/andromap/Elixir_B3_r.resamp.inverted.png") fitspath = os.path.expanduser("~/andromap/Elixir_B3_r.resamp.fits") m = Andromap(fitspath, figsize=(6.5, 6.5)) m.fig.show_rgb(pngpath) client = MongoClient(host='localhost', port=27017) c = client.m31.images # WIRCam mosaic footprint. m.plot_combined_fields({"INSTRUME": "WIRCam", "TYPE": "sci", "RUNID": {'$in': ['07BC20', '09BC29']}}, edgecolor=RED, lw=1, alpha=0.8) wircam_sky_sel = {"INSTRUME": "WIRCam", "TYPE": "sky", "RUNID": {"$in": ['07BC20', '07BH47', '09BC29']}} for field in c.find(wircam_sky_sel).distinct('OBJECT'): m.plot_combined_fields( {"INSTRUME": "WIRCam", "TYPE": "sky", "OBJECT": field}, edgecolor=ORANGE, lw=1, alpha=0.8) for field in MEGACAM_FIELD_NAMES: m.plot_combined_fields( {"INSTRUME": "MegaPrime", 'OBJECT': field}, edgecolor=BLUE, lw=2.) coord = m.compute_mean_coordinate({"OBJECT": field}) m.add_label(coord.ra.value, coord.dec.value, field.split('_')[-1], size=14, weight='heavy', ha='center', va='center', color=BLUE) for field in MEGACAM_SKY_NAMES: m.plot_combined_fields( {"INSTRUME": "MegaPrime", 'OBJECT': field}, edgecolor=BLUE, lw=1) coord = m.compute_mean_coordinate({"OBJECT": field}) m.add_label(coord.ra.value, coord.dec.value, field.split('_')[-1], size=14, weight='heavy', ha='center', va='center', color=BLUE) m.plot_phat(union=True, edgecolor=GREEN, facecolor='None', lw=1, alpha=0.8) radii = np.arange(10., 50., 10.) prof = read_release() m.plot_xvista_profile_ellipse_grid(prof, radii, zorder=100, edgecolor='0.2', alpha=0.7) m.fig.recenter(M31RA0, M31DEC0, radius=4) # , width=9, height=9) m.save("megacam_lsb_fields.pdf", format='pdf', dpi=300, transparent=True, adjust_bbox=True)