diff --git a/notebooks/WFC3/mast_api_psf/download_psf_cutouts.ipynb b/notebooks/WFC3/mast_api_psf/download_psf_cutouts.ipynb index 08a9222b0..ad0d00678 100644 --- a/notebooks/WFC3/mast_api_psf/download_psf_cutouts.ipynb +++ b/notebooks/WFC3/mast_api_psf/download_psf_cutouts.ipynb @@ -304,23 +304,12 @@ "metadata": {}, "outputs": [], "source": [ - "def get_safe_members(members):\n", - " for member in members:\n", - " member_name = member.name\n", - " condition = (\n", - " member_name.startswith('..') or \\\n", - " member_name.startswith('/') or \\\n", - " member_name.startswith('\\\\')\n", - " )\n", - " if not condition:\n", - " yield member\n", - " \n", "with tarfile.open(filename_bundle, 'r:gz') as tar:\n", " path_mast = tar.getnames()[0]\n", - " print (f'Path to MAST PSF Cutouts: {path_mast}')\n", + " print(f'Path to MAST PSF Cutouts: {path_mast}')\n", " members = tar.getmembers()\n", " safe_members = get_safe_members(members)\n", - " tar.extractall(members=safe_members)" + " tar.extractall(filter='data')" ] }, {