def decode_doy(doy):
    """ Parse string doy to start_doy, end_doy pair. """
    if "-" not in doy:
        start_doy, end_doy = doy, doy
    else:
        start_doy, end_doy = doy.split("-")

    start_doy = int(start_doy)
    end_doy = int(end_doy)

    return start_doy, end_doy