コード例 #1
0
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)
    # Plot observed fields
    observed = ["AGB_%i" % i for i in range(1, 21)]
    m.plot_narrowband_fields(observed,
                             facecolor='orange', alpha=0.6)
    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_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_narrowband_map.pdf", format='pdf',
           dpi=300, transparent=True, adjust_bbox=True)
コード例 #2
0
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)