rithwiks commited on
Commit
8a933d4
1 Parent(s): fee40b2

splitfiles

Browse files
utils/hubble_downloading.ipynb ADDED
The diff for this file is too large to render. See raw diff
 
utils/{hubble_downloading_and_filtering.ipynb → hubble_filtering.ipynb} RENAMED
@@ -27,6 +27,10 @@
27
  "import matplotlib.pyplot as plt\n",
28
  "import numpy as np\n",
29
  "\n",
 
 
 
 
30
  "def get_all_fits_files(root_dir):\n",
31
  " # Use glob to recursively find all .fits files\n",
32
  " pattern = os.path.join(root_dir, '**', '*.fits')\n",
@@ -161,6 +165,13 @@
161
  "# Initialize the list of confirmed FITS paths\n",
162
  "confirmed_fits_paths = []\n",
163
  "\n",
 
 
 
 
 
 
 
164
  "all_polys = []\n",
165
  "\n",
166
  "for i in tqdm(range(len(valid_fits_paths))):\n",
 
27
  "import matplotlib.pyplot as plt\n",
28
  "import numpy as np\n",
29
  "\n",
30
+ "\"\"\"\n",
31
+ "First use hubble_downloading file before using this.\n",
32
+ "\"\"\"\n",
33
+ "\n",
34
  "def get_all_fits_files(root_dir):\n",
35
  " # Use glob to recursively find all .fits files\n",
36
  " pattern = os.path.join(root_dir, '**', '*.fits')\n",
 
165
  "# Initialize the list of confirmed FITS paths\n",
166
  "confirmed_fits_paths = []\n",
167
  "\n",
168
+ "\"\"\"\n",
169
+ "Because hubble FITS have two images at HDU 1 and 4,\n",
170
+ "we need to calculate the union of the spherical polygons\n",
171
+ "for both of these, when storing the total FITS polygons.\n",
172
+ "\n",
173
+ "\"\"\"\n",
174
+ "\n",
175
  "all_polys = []\n",
176
  "\n",
177
  "for i in tqdm(range(len(valid_fits_paths))):\n",