def download_results(self, savedir=None, raw=True, calib=False, index=None):
obsids = self.obsids if index is None else [self.obsids[index]]<EOL>for obsid in obsids:<EOL><INDENT>pm = io.PathManager(obsid.img_id, savedir=savedir)<EOL>pm.basepath.mkdir(exist_ok=True)<EOL>to_download = []<EOL>if raw is True:<EOL><INDENT>to_download.extend(obsid.raw_urls)<EOL><DEDENT>if calib is True:<EOL><INDENT>to_download.extend(obsid.calib_urls)<EOL><DEDENT>for url in to_download:<EOL><INDENT>basename = Path(url).name<EOL>print("<STR_LIT>", basename)<EOL>store_path = str(pm.basepath / basename)<EOL>try:<EOL><INDENT>urlretrieve(url, store_path)<EOL><DEDENT>except Exception as e:<EOL><INDENT>urlretrieve(url.replace("<STR_LIT>", "<STR_LIT:http>"), store_path)<EOL><DEDENT><DEDENT>return str(pm.basepath)<EOL><DEDENT>
Download the previously found and stored Opus obsids.

        Parameters
        ==========
        savedir: str or pathlib.Path, optional
            If the database root folder as defined by the config.ini should not be used,
            provide a different savedir here. It will be handed to PathManager.