def get_kfov(campaign=7):
    """Returns a KeplerFov object for a given campaign."""
    ra, dec, scRoll = getRaDecRollFromFieldnum(campaign)
    # convert from SC roll to FOV coordinates
    # do not use the fovRoll coords anywhere else
    # they are internal to this script only
    fovRoll = fov.getFovAngleFromSpacecraftRoll(scRoll)
    ## initialize class
    kfov = fov.KeplerFov(ra, dec, fovRoll)
    return kfov
def get_kfov(campaign=7):
    """Returns a KeplerFov object for a given campaign."""
    ra, dec, scRoll = getRaDecRollFromFieldnum(campaign)
    # convert from SC roll to FOV coordinates
    # do not use the fovRoll coords anywhere else
    # they are internal to this script only
    fovRoll = fov.getFovAngleFromSpacecraftRoll(scRoll)
    ## initialize class
    kfov = fov.KeplerFov(ra, dec, fovRoll)
    return kfov
Exemplo n.º 3
0
def test_coordinates_function():
    """Are the coordinates in the "k2-campaigns.json" file identical
    to those that were hardcoded in v1.9.2?"""
    campaigns = [100] + list(range(0, 19))
    for c in campaigns:
        test_ra, test_dec, test_roll = old_getRaDecRollFromFieldnum(c)
        ra, dec, roll = getRaDecRollFromFieldnum(c)
        assert(ra == test_ra)
        assert(dec == test_dec)
        assert(roll == test_roll)
Exemplo n.º 4
0
def plot_chips(ax, fieldnum):
    """Plot the outline of the Kepler chips."""
    ra_deg, dec_deg, scRoll_deg = getRaDecRollFromFieldnum(fieldnum)
    ## convert from SC roll to FOV coordinates
    ## do not use the fovRoll coords anywhere else
    ## they are internal to this script only
    fovRoll_deg = fov.getFovAngleFromSpacecraftRoll(scRoll_deg)

    ## initialize class
    k = fov.KeplerFov(ra_deg, dec_deg, fovRoll_deg)

    raDec = k.getCoordsOfChannelCorners()

    light_grey = np.array([float(248) / float(255)] * 3)
    # ph = proj.Gnomic(ra_deg, dec_deg)
    ph = proj.PlateCaree()
    k.plotPointing(ph, showOuts=False, plot_degrees=False, colour="k", mod3="None", lw=1.5)
Exemplo n.º 5
0
def plot_chips(ax, fieldnum):
    """Plot the outline of the Kepler chips."""
    ra_deg, dec_deg, scRoll_deg = getRaDecRollFromFieldnum(fieldnum)
    ## convert from SC roll to FOV coordinates
    ## do not use the fovRoll coords anywhere else
    ## they are internal to this script only
    fovRoll_deg = fov.getFovAngleFromSpacecraftRoll(scRoll_deg)

    ## initialize class
    k = fov.KeplerFov(ra_deg, dec_deg, fovRoll_deg)

    raDec = k.getCoordsOfChannelCorners()

    light_grey = np.array([float(248) / float(255)] * 3)
    #ph = proj.Gnomic(ra_deg, dec_deg)
    ph = proj.PlateCaree()
    k.plotPointing(ph,
                   showOuts=False,
                   plot_degrees=False,
                   colour="k",
                   mod3="None",
                   lw=1.5)
Exemplo n.º 6
0
def get_fov(campaign):
    ra, dec, scRoll = getRaDecRollFromFieldnum(campaign)
    fovRoll = fov.getFovAngleFromSpacecraftRoll(scRoll)
    return fov.KeplerFov(ra, dec, fovRoll)
Exemplo n.º 7
0
def get_fov(campaign):
    ra, dec, scRoll = getRaDecRollFromFieldnum(campaign)
    fovRoll = fov.getFovAngleFromSpacecraftRoll(scRoll)
    return fov.KeplerFov(ra, dec, fovRoll)