def find_image_planes(hdulist):
    """
    Reads FITS hdulist to figure out which ones contain science data

    Parameters
    ----------
    hdulist: FITS hdulist

    Outputs
    -------
    img_plns: list of which indices in hdulist correspond to science data

    """
    n_hdu = len(hdulist)
    img_plns = []
    if n_hdu == 1: # if there is only one extension, then use that
        img_plns.append(0)
    else: # loop over all the extensions & try to find the right ones
        for extn in range(1,n_hdu):
            try: # look for 'EXTNAME' keyword, see if it's 'SCI'
                if 'SCI' in hdulist[extn].header['EXTNAME']:
                    img_plns.append(extn)
            except KeyError: # no 'EXTNAME', just assume we want this extension
                img_plns.append(extn)
    return(img_plns)