def get_obs_intervals(sc_obsids):
    """
    For the list of Obsid objects from starcheck, determine the interval of
    each star catalog (as in, for obsids with no following maneuver, the catalog
    will apply to an interval that spans that obsid and the next one)

    :param sc_obsids: starcheck Obsid list
    :returns: list of dictionaries containing obsid/tstart/tstop
    """
    intervals = []
    for idx, obs in enumerate(sc_obsids):
        # if the range is undefined, just don't make
        # an entry / interval for the obsid
        if (('obs_tstart' not in obs) or
                'obs_tstop' not in obs):
            continue
        interval = {'obsid': obs['obsid'],
                    'tstart': obs['obs_tstart'],
                    'tstop': obs['obs_tstop']}
        if 'no_following_manvr' in obs:
            interval['tstop'] = sc_obsids[idx + 1]['obs_tstop']
            interval['text'] = '(max through following obsid)'
        intervals.append(interval)
    return intervals