Advertisement
Guest User

Untitled

a guest
Mar 27th, 2017
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 21.76 KB | None | 0 0
  1. {
  2. "cells": [
  3. {
  4. "cell_type": "markdown",
  5. "metadata": {},
  6. "source": [
  7. "# Process multiple IFS images in parallel"
  8. ]
  9. },
  10. {
  11. "cell_type": "code",
  12. "execution_count": 1,
  13. "metadata": {
  14. "collapsed": false
  15. },
  16. "outputs": [],
  17. "source": [
  18. "import time\n",
  19. "import sys\n",
  20. "codefolder = '../../../code'\n",
  21. "if codefolder not in sys.path: sys.path.append(codefolder)\n",
  22. "from PISCESparams import Params\n",
  23. "par = Params(codefolder)\n",
  24. "\n",
  25. "# activate this if you want to get rid of all console messages\n",
  26. "# but want to keep the file\n",
  27. "# from tools.initLogger import getLogger\n",
  28. "# log = getLogger('crispy',addSH=False)\n"
  29. ]
  30. },
  31. {
  32. "cell_type": "markdown",
  33. "metadata": {},
  34. "source": [
  35. "### Import files to reduce, doesn't matter how many"
  36. ]
  37. },
  38. {
  39. "cell_type": "code",
  40. "execution_count": 2,
  41. "metadata": {
  42. "collapsed": true
  43. },
  44. "outputs": [],
  45. "source": [
  46. "import glob\n",
  47. "# call the reduction routine with an example image\n",
  48. "filelist= glob.glob(par.wavecalDir+'IFS???nm.fits')\n",
  49. "from tools.image import Image"
  50. ]
  51. },
  52. {
  53. "cell_type": "markdown",
  54. "metadata": {},
  55. "source": [
  56. "### No parallelization"
  57. ]
  58. },
  59. {
  60. "cell_type": "code",
  61. "execution_count": 3,
  62. "metadata": {
  63. "collapsed": false
  64. },
  65. "outputs": [
  66. {
  67. "name": "stdout",
  68. "output_type": "stream",
  69. "text": [
  70. "crispy - INFO - Read data from HDU 0 of ../../code/ReferenceFiles/Calibra_170306/IFS605nm.fits\n",
  71. "crispy - INFO - Reduced cube will have 17 wavelength bins\n"
  72. ]
  73. },
  74. {
  75. "name": "stderr",
  76. "output_type": "stream",
  77. "text": [
  78. "/Users/mrizzo/anaconda/lib/python2.7/site-packages/numpy/lib/nanfunctions.py:703: RuntimeWarning: Mean of empty slice\n",
  79. " warnings.warn(\"Mean of empty slice\", RuntimeWarning)\n"
  80. ]
  81. },
  82. {
  83. "name": "stdout",
  84. "output_type": "stream",
  85. "text": [
  86. "crispy - INFO - Writing data to ../../code/SimResults/IFS605nm_red_optext.fits\n",
  87. "crispy - INFO - Read data from HDU 0 of ../../code/ReferenceFiles/Calibra_170306/IFS615nm.fits\n",
  88. "crispy - INFO - Reduced cube will have 17 wavelength bins\n"
  89. ]
  90. },
  91. {
  92. "name": "stderr",
  93. "output_type": "stream",
  94. "text": [
  95. "WARNING: AstropyDeprecationWarning: \"clobber\" was deprecated in version 1.3 and will be removed in a future version. Use argument \"overwrite\" instead. [astropy.utils.decorators]\n"
  96. ]
  97. },
  98. {
  99. "name": "stdout",
  100. "output_type": "stream",
  101. "text": [
  102. "crispy - INFO - Writing data to ../../code/SimResults/IFS615nm_red_optext.fits\n",
  103. "crispy - INFO - Read data from HDU 0 of ../../code/ReferenceFiles/Calibra_170306/IFS625nm.fits\n",
  104. "crispy - INFO - Reduced cube will have 17 wavelength bins\n",
  105. "crispy - INFO - Writing data to ../../code/SimResults/IFS625nm_red_optext.fits\n",
  106. "crispy - INFO - Read data from HDU 0 of ../../code/ReferenceFiles/Calibra_170306/IFS635nm.fits\n",
  107. "crispy - INFO - Reduced cube will have 17 wavelength bins\n",
  108. "crispy - INFO - Writing data to ../../code/SimResults/IFS635nm_red_optext.fits\n",
  109. "crispy - INFO - Read data from HDU 0 of ../../code/ReferenceFiles/Calibra_170306/IFS645nm.fits\n",
  110. "crispy - INFO - Reduced cube will have 17 wavelength bins\n",
  111. "crispy - INFO - Writing data to ../../code/SimResults/IFS645nm_red_optext.fits\n",
  112. "crispy - INFO - Read data from HDU 0 of ../../code/ReferenceFiles/Calibra_170306/IFS655nm.fits\n",
  113. "crispy - INFO - Reduced cube will have 17 wavelength bins\n",
  114. "crispy - INFO - Writing data to ../../code/SimResults/IFS655nm_red_optext.fits\n",
  115. "crispy - INFO - Read data from HDU 0 of ../../code/ReferenceFiles/Calibra_170306/IFS665nm.fits\n",
  116. "crispy - INFO - Reduced cube will have 17 wavelength bins\n",
  117. "crispy - INFO - Writing data to ../../code/SimResults/IFS665nm_red_optext.fits\n",
  118. "crispy - INFO - Read data from HDU 0 of ../../code/ReferenceFiles/Calibra_170306/IFS675nm.fits\n",
  119. "crispy - INFO - Reduced cube will have 17 wavelength bins\n",
  120. "crispy - INFO - Writing data to ../../code/SimResults/IFS675nm_red_optext.fits\n",
  121. "crispy - INFO - Read data from HDU 0 of ../../code/ReferenceFiles/Calibra_170306/IFS685nm.fits\n",
  122. "crispy - INFO - Reduced cube will have 17 wavelength bins\n",
  123. "crispy - INFO - Writing data to ../../code/SimResults/IFS685nm_red_optext.fits\n",
  124. "crispy - INFO - Read data from HDU 0 of ../../code/ReferenceFiles/Calibra_170306/IFS695nm.fits\n",
  125. "crispy - INFO - Reduced cube will have 17 wavelength bins\n",
  126. "crispy - INFO - Writing data to ../../code/SimResults/IFS695nm_red_optext.fits\n",
  127. "crispy - INFO - Read data from HDU 0 of ../../code/ReferenceFiles/Calibra_170306/IFS705nm.fits\n",
  128. "crispy - INFO - Reduced cube will have 17 wavelength bins\n",
  129. "crispy - INFO - Writing data to ../../code/SimResults/IFS705nm_red_optext.fits\n",
  130. "crispy - INFO - Read data from HDU 0 of ../../code/ReferenceFiles/Calibra_170306/IFS715nm.fits\n",
  131. "crispy - INFO - Reduced cube will have 17 wavelength bins\n",
  132. "crispy - INFO - Writing data to ../../code/SimResults/IFS715nm_red_optext.fits\n",
  133. "crispy - INFO - Read data from HDU 0 of ../../code/ReferenceFiles/Calibra_170306/IFS725nm.fits\n",
  134. "crispy - INFO - Reduced cube will have 17 wavelength bins\n",
  135. "crispy - INFO - Writing data to ../../code/SimResults/IFS725nm_red_optext.fits\n",
  136. "Elapsed time: 201.540511s\n"
  137. ]
  138. }
  139. ],
  140. "source": [
  141. "# import parallel tools\n",
  142. "from IFS import reduceIFSMap\n",
  143. "start = time.time()\n",
  144. "for filename in filelist:\n",
  145. " reduceIFSMap(par,filename)\n",
  146. "print('Elapsed time: %fs' % (time.time()-start))"
  147. ]
  148. },
  149. {
  150. "cell_type": "markdown",
  151. "metadata": {},
  152. "source": [
  153. "### Parallelized version"
  154. ]
  155. },
  156. {
  157. "cell_type": "code",
  158. "execution_count": 4,
  159. "metadata": {
  160. "collapsed": false
  161. },
  162. "outputs": [
  163. {
  164. "name": "stdout",
  165. "output_type": "stream",
  166. "text": [
  167. "crispy - INFO - Read data from HDU 0 of ../../code/ReferenceFiles/Calibra_170306/IFS615nm.fits\n",
  168. "crispy - INFO - Read data from HDU 0 of ../../code/ReferenceFiles/Calibra_170306/IFS625nm.fits\n",
  169. "crispy - INFO - Read data from HDU 0 of ../../code/ReferenceFiles/Calibra_170306/IFS605nm.fits\n",
  170. "crispy - INFO - Read data from HDU 0 of ../../code/ReferenceFiles/Calibra_170306/IFS655nm.fits\n",
  171. "crispy - INFO - Read data from HDU 0 of ../../code/ReferenceFiles/Calibra_170306/IFS665nm.fits\n",
  172. "crispy - INFO - Read data from HDU 0 of ../../code/ReferenceFiles/Calibra_170306/IFS635nm.fits\n",
  173. "crispy - INFO - Read data from HDU 0 of ../../code/ReferenceFiles/Calibra_170306/IFS645nm.fits\n",
  174. "crispy - INFO - Reduced cube will have 17 wavelength bins\n",
  175. "crispy - INFO - Read data from HDU 0 of ../../code/ReferenceFiles/Calibra_170306/IFS675nm.fits\n",
  176. "crispy - INFO - Reduced cube will have 17 wavelength bins\n",
  177. "crispy - INFO - Reduced cube will have 17 wavelength bins\n",
  178. "crispy - INFO - Reduced cube will have 17 wavelength bins\n",
  179. "crispy - INFO - Reduced cube will have 17 wavelength bins\n",
  180. "crispy - INFO - Reduced cube will have 17 wavelength bins\n",
  181. "crispy - INFO - Reduced cube will have 17 wavelength bins\n",
  182. "crispy - INFO - Reduced cube will have 17 wavelength bins\n",
  183. "crispy - INFO - Writing data to ../../code/SimResults/IFS645nm_red_optext.fits\n",
  184. "crispy - INFO - Writing data to ../../code/SimResults/IFS615nm_red_optext.fits\n",
  185. "crispy - INFO - Writing data to ../../code/SimResults/IFS605nm_red_optext.fits\n",
  186. "crispy - INFO - Writing data to ../../code/SimResults/IFS675nm_red_optext.fits\n",
  187. "crispy - INFO - Writing data to ../../code/SimResults/IFS635nm_red_optext.fits\n",
  188. "crispy - INFO - Read data from HDU 0 of ../../code/ReferenceFiles/Calibra_170306/IFS685nm.fits\n",
  189. "crispy - INFO - Read data from HDU 0 of ../../code/ReferenceFiles/Calibra_170306/IFS705nm.fits\n",
  190. "crispy - INFO - Read data from HDU 0 of ../../code/ReferenceFiles/Calibra_170306/IFS695nm.fits\n",
  191. "crispy - INFO - Read data from HDU 0 of ../../code/ReferenceFiles/Calibra_170306/IFS715nm.fits\n",
  192. "crispy - INFO - Reduced cube will have 17 wavelength bins\n",
  193. "crispy - INFO - Writing data to ../../code/SimResults/IFS655nm_red_optext.fits\n",
  194. "crispy - INFO - Reduced cube will have 17 wavelength bins\n",
  195. "crispy - INFO - Reduced cube will have 17 wavelength bins\n",
  196. "crispy - INFO - Writing data to ../../code/SimResults/IFS625nm_red_optext.fits\n",
  197. "crispy - INFO - Read data from HDU 0 of ../../code/ReferenceFiles/Calibra_170306/IFS725nm.fits\n",
  198. "crispy - INFO - Reduced cube will have 17 wavelength bins\n",
  199. "crispy - INFO - Reduced cube will have 17 wavelength bins\n",
  200. "File ../../code/ReferenceFiles/Calibra_170306/IFS615nm.fits processed\n",
  201. "File ../../code/ReferenceFiles/Calibra_170306/IFS645nm.fits processed\n",
  202. "File ../../code/ReferenceFiles/Calibra_170306/IFS605nm.fits processed\n",
  203. "File ../../code/ReferenceFiles/Calibra_170306/IFS675nm.fits processed\n",
  204. "File ../../code/ReferenceFiles/Calibra_170306/IFS635nm.fits processed\n",
  205. "File ../../code/ReferenceFiles/Calibra_170306/IFS655nm.fits processed\n",
  206. "File ../../code/ReferenceFiles/Calibra_170306/IFS625nm.fits processed\n",
  207. "crispy - INFO - Writing data to ../../code/SimResults/IFS665nm_red_optext.fits\n",
  208. "File ../../code/ReferenceFiles/Calibra_170306/IFS665nm.fits processed\n",
  209. "crispy - INFO - Writing data to ../../code/SimResults/IFS695nm_red_optext.fits\n",
  210. "crispy - INFO - Writing data to ../../code/SimResults/IFS705nm_red_optext.fits\n",
  211. "File ../../code/ReferenceFiles/Calibra_170306/IFS695nm.fits processed\n",
  212. "File ../../code/ReferenceFiles/Calibra_170306/IFS705nm.fits processed\n",
  213. "crispy - INFO - Writing data to ../../code/SimResults/IFS725nm_red_optext.fits\n",
  214. "crispy - INFO - Writing data to ../../code/SimResults/IFS685nm_red_optext.fits\n",
  215. "File ../../code/ReferenceFiles/Calibra_170306/IFS725nm.fits processed\n",
  216. "File ../../code/ReferenceFiles/Calibra_170306/IFS685nm.fits processed\n",
  217. "crispy - INFO - Writing data to ../../code/SimResults/IFS715nm_red_optext.fits\n",
  218. "File ../../code/ReferenceFiles/Calibra_170306/IFS715nm.fits processed\n",
  219. "Elapsed time: 45.754292s\n"
  220. ]
  221. }
  222. ],
  223. "source": [
  224. "import multiprocessing\n",
  225. "from tools.par_utils import Task, Consumer\n",
  226. "\n",
  227. "start = time.time()\n",
  228. "\n",
  229. "tasks = multiprocessing.Queue()\n",
  230. "results = multiprocessing.Queue()\n",
  231. "ncpus = multiprocessing.cpu_count()\n",
  232. "consumers = [ Consumer(tasks, results)\n",
  233. " for i in range(ncpus) ]\n",
  234. "for w in consumers:\n",
  235. " w.start()\n",
  236. "\n",
  237. "# you call the function here, with all its arguments in a list\n",
  238. "for i in range(len(filelist)):\n",
  239. " tasks.put(Task(i, reduceIFSMap, (par, filelist[i]))) \n",
  240. "\n",
  241. "for i in range(ncpus):\n",
  242. " tasks.put(None)\n",
  243. "\n",
  244. "# if the function returns something, that's where you process them\n",
  245. "for i in range(len(filelist)):\n",
  246. " index, result = results.get()\n",
  247. " # index tells us which task this was\n",
  248. " print(\"File %s processed\" % filelist[index]) \n",
  249. " # if the function you put in Task returned something, it is result\n",
  250. " \n",
  251. "print('Elapsed time: %fs' % (time.time()-start))"
  252. ]
  253. },
  254. {
  255. "cell_type": "markdown",
  256. "metadata": {
  257. "collapsed": true
  258. },
  259. "source": [
  260. "# Built-in parallelized reduction"
  261. ]
  262. },
  263. {
  264. "cell_type": "markdown",
  265. "metadata": {},
  266. "source": [
  267. "We implemented a parallelized version of reduceIFSMap called reduceIFSMapList"
  268. ]
  269. },
  270. {
  271. "cell_type": "code",
  272. "execution_count": 3,
  273. "metadata": {
  274. "collapsed": false
  275. },
  276. "outputs": [
  277. {
  278. "name": "stdout",
  279. "output_type": "stream",
  280. "text": [
  281. "Help on function reduceIFSMapList in module IFS:\n",
  282. "\n",
  283. "reduceIFSMapList(par, IFSimageNameList, method='optext', parallel=True)\n",
  284. " Main reduction function\n",
  285. " \n",
  286. " Uses various routines to extract an IFS detector map into a spectral-spatial cube.\n",
  287. " \n",
  288. " Parameters\n",
  289. " ----------\n",
  290. " par : Parameter instance\n",
  291. " Contains all IFS parameters\n",
  292. " IFSimageNameList : list\n",
  293. " List of strings containing the paths to the image files\n",
  294. " method : 'lstsq', 'optext'\n",
  295. " Method used for reduction.\n",
  296. " 'lstsq': use the knowledge of the PSFs at each location and each wavelength and fits\n",
  297. " the microspectrum as a weighted sum of these PSFs in the least-square sense. Can weigh the data by its variance.\n",
  298. " 'optext': use a matched filter to appropriately weigh each pixel and assign the fluxes, making use of the inverse\n",
  299. " wavlength calibration map. Then remap each microspectrum onto the desired wavelengths\n",
  300. "\n"
  301. ]
  302. }
  303. ],
  304. "source": [
  305. "from IFS import reduceIFSMapList\n",
  306. "help(reduceIFSMapList)"
  307. ]
  308. },
  309. {
  310. "cell_type": "code",
  311. "execution_count": 4,
  312. "metadata": {
  313. "collapsed": false
  314. },
  315. "outputs": [
  316. {
  317. "name": "stdout",
  318. "output_type": "stream",
  319. "text": [
  320. "crispy - INFO - Read data from HDU 0 of ../../../code/ReferenceFiles/Calibra_170306/IFS605nm.fits\n",
  321. "crispy - INFO - Read data from HDU 0 of ../../../code/ReferenceFiles/Calibra_170306/IFS615nm.fits\n",
  322. "crispy - INFO - Reduced cube will have 17 wavelength bins\n",
  323. "crispy - INFO - Read data from HDU 0 of ../../../code/ReferenceFiles/Calibra_170306/IFS625nm.fits\n",
  324. "crispy - INFO - Reduced cube will have 17 wavelength bins\n",
  325. "crispy - INFO - Read data from HDU 0 of ../../../code/ReferenceFiles/Calibra_170306/IFS635nm.fits\n",
  326. "crispy - INFO - Reduced cube will have 17 wavelength bins\n",
  327. "crispy - INFO - Read data from HDU 0 of ../../../code/ReferenceFiles/Calibra_170306/IFS645nm.fits\n",
  328. "crispy - INFO - Reduced cube will have 17 wavelength bins\n",
  329. "crispy - INFO - Read data from HDU 0 of ../../../code/ReferenceFiles/Calibra_170306/IFS655nm.fits\n",
  330. "crispy - INFO - Read data from HDU 0 of ../../../code/ReferenceFiles/Calibra_170306/IFS665nm.fits\n",
  331. "crispy - INFO - Reduced cube will have 17 wavelength bins\n",
  332. "crispy - INFO - Reduced cube will have 17 wavelength bins\n",
  333. "crispy - INFO - Read data from HDU 0 of ../../../code/ReferenceFiles/Calibra_170306/IFS675nm.fits\n",
  334. "crispy - INFO - Read data from HDU 0 of ../../../code/ReferenceFiles/Calibra_170306/IFS685nm.fits\n",
  335. "crispy - INFO - Reduced cube will have 17 wavelength bins\n",
  336. "crispy - INFO - Reduced cube will have 17 wavelength bins\n",
  337. "crispy - INFO - Read data from HDU 0 of ../../../code/ReferenceFiles/Calibra_170306/IFS695nm.fits\n",
  338. "crispy - INFO - Read data from HDU 0 of ../../../code/ReferenceFiles/Calibra_170306/IFS705nm.fits\n",
  339. "crispy - INFO - Read data from HDU 0 of ../../../code/ReferenceFiles/Calibra_170306/IFS715nm.fits\n",
  340. "crispy - INFO - Read data from HDU 0 of ../../../code/ReferenceFiles/Calibra_170306/IFS725nm.fits\n"
  341. ]
  342. },
  343. {
  344. "name": "stderr",
  345. "output_type": "stream",
  346. "text": [
  347. "/Users/mrizzo/anaconda/lib/python2.7/site-packages/numpy/lib/nanfunctions.py:703: RuntimeWarning: Mean of empty slice\n",
  348. " warnings.warn(\"Mean of empty slice\", RuntimeWarning)\n",
  349. "/Users/mrizzo/anaconda/lib/python2.7/site-packages/numpy/lib/nanfunctions.py:703: RuntimeWarning: Mean of empty slice\n",
  350. " warnings.warn(\"Mean of empty slice\", RuntimeWarning)\n",
  351. "/Users/mrizzo/anaconda/lib/python2.7/site-packages/numpy/lib/nanfunctions.py:703: RuntimeWarning: Mean of empty slice\n",
  352. " warnings.warn(\"Mean of empty slice\", RuntimeWarning)\n",
  353. "/Users/mrizzo/anaconda/lib/python2.7/site-packages/numpy/lib/nanfunctions.py:703: RuntimeWarning: Mean of empty slice\n",
  354. " warnings.warn(\"Mean of empty slice\", RuntimeWarning)\n",
  355. "/Users/mrizzo/anaconda/lib/python2.7/site-packages/numpy/lib/nanfunctions.py:703: RuntimeWarning: Mean of empty slice\n",
  356. " warnings.warn(\"Mean of empty slice\", RuntimeWarning)\n",
  357. "/Users/mrizzo/anaconda/lib/python2.7/site-packages/numpy/lib/nanfunctions.py:703: RuntimeWarning: Mean of empty slice\n",
  358. " warnings.warn(\"Mean of empty slice\", RuntimeWarning)\n",
  359. "/Users/mrizzo/anaconda/lib/python2.7/site-packages/numpy/lib/nanfunctions.py:703: RuntimeWarning: Mean of empty slice\n",
  360. " warnings.warn(\"Mean of empty slice\", RuntimeWarning)\n",
  361. "/Users/mrizzo/anaconda/lib/python2.7/site-packages/numpy/lib/nanfunctions.py:703: RuntimeWarning: Mean of empty slice\n",
  362. " warnings.warn(\"Mean of empty slice\", RuntimeWarning)\n",
  363. "WARNING: AstropyDeprecationWarning: \"clobber\" was deprecated in version 1.3 and will be removed in a future version. Use argument \"overwrite\" instead. [astropy.utils.decorators]\n",
  364. "WARNING: AstropyDeprecationWarning: \"clobber\" was deprecated in version 1.3 and will be removed in a future version. Use argument \"overwrite\" instead. [astropy.utils.decorators]\n"
  365. ]
  366. },
  367. {
  368. "name": "stdout",
  369. "output_type": "stream",
  370. "text": [
  371. "crispy - INFO - Writing data to ../../../code/SimResults/IFS615nm_red_optext.fits\n",
  372. "crispy - INFO - Writing data to ../../../code/SimResults/IFS625nm_red_optext.fits\n"
  373. ]
  374. },
  375. {
  376. "name": "stderr",
  377. "output_type": "stream",
  378. "text": [
  379. "WARNING: AstropyDeprecationWarning: \"clobber\" was deprecated in version 1.3 and will be removed in a future version. Use argument \"overwrite\" instead. [astropy.utils.decorators]\n"
  380. ]
  381. },
  382. {
  383. "name": "stdout",
  384. "output_type": "stream",
  385. "text": [
  386. "crispy - INFO - Reduced cube will have 17 wavelength bins\n",
  387. "crispy - INFO - Writing data to ../../../code/SimResults/IFS605nm_red_optext.fits\n",
  388. "crispy - INFO - Reduced cube will have 17 wavelength bins\n",
  389. "crispy - INFO - Reduced cube will have 17 wavelength bins\n"
  390. ]
  391. },
  392. {
  393. "name": "stderr",
  394. "output_type": "stream",
  395. "text": [
  396. "WARNING: AstropyDeprecationWarning: \"clobber\" was deprecated in version 1.3 and will be removed in a future version. Use argument \"overwrite\" instead. [astropy.utils.decorators]\n",
  397. "WARNING: AstropyDeprecationWarning: \"clobber\" was deprecated in version 1.3 and will be removed in a future version. Use argument \"overwrite\" instead. [astropy.utils.decorators]\n",
  398. "WARNING: AstropyDeprecationWarning: \"clobber\" was deprecated in version 1.3 and will be removed in a future version. Use argument \"overwrite\" instead. [astropy.utils.decorators]\n"
  399. ]
  400. },
  401. {
  402. "name": "stdout",
  403. "output_type": "stream",
  404. "text": [
  405. "crispy - INFO - Writing data to ../../../code/SimResults/IFS635nm_red_optext.fits\n"
  406. ]
  407. },
  408. {
  409. "name": "stderr",
  410. "output_type": "stream",
  411. "text": [
  412. "WARNING: AstropyDeprecationWarning: \"clobber\" was deprecated in version 1.3 and will be removed in a future version. Use argument \"overwrite\" instead. [astropy.utils.decorators]\n"
  413. ]
  414. },
  415. {
  416. "name": "stdout",
  417. "output_type": "stream",
  418. "text": [
  419. "crispy - INFO - Reduced cube will have 17 wavelength bins\n",
  420. "crispy - INFO - Writing data to ../../../code/SimResults/IFS645nm_red_optext.fits\n",
  421. "crispy - INFO - Writing data to ../../../code/SimResults/IFS655nm_red_optext.fits\n",
  422. "crispy - INFO - Writing data to ../../../code/SimResults/IFS675nm_red_optext.fits\n",
  423. "crispy - INFO - Reduced cube will have 17 wavelength bins\n"
  424. ]
  425. },
  426. {
  427. "name": "stderr",
  428. "output_type": "stream",
  429. "text": [
  430. "WARNING: AstropyDeprecationWarning: \"clobber\" was deprecated in version 1.3 and will be removed in a future version. Use argument \"overwrite\" instead. [astropy.utils.decorators]\n"
  431. ]
  432. },
  433. {
  434. "name": "stdout",
  435. "output_type": "stream",
  436. "text": [
  437. "crispy - INFO - Writing data to ../../../code/SimResults/IFS665nm_red_optext.fits\n",
  438. "crispy - INFO - Writing data to ../../../code/SimResults/IFS695nm_red_optext.fits\n",
  439. "crispy - INFO - Writing data to ../../../code/SimResults/IFS725nm_red_optext.fits\n",
  440. "crispy - INFO - Writing data to ../../../code/SimResults/IFS685nm_red_optext.fits\n",
  441. "crispy - INFO - Writing data to ../../../code/SimResults/IFS705nm_red_optext.fits\n",
  442. "crispy - INFO - Writing data to ../../../code/SimResults/IFS715nm_red_optext.fits\n",
  443. "crispy - INFO - Elapsed time: 43.998062s\n",
  444. "Elapsed time: 44.001361s\n"
  445. ]
  446. }
  447. ],
  448. "source": [
  449. "import time\n",
  450. "start= time.time()\n",
  451. "reduceIFSMapList(par,filelist)\n",
  452. "print('Elapsed time: %fs' % (time.time()-start))"
  453. ]
  454. },
  455. {
  456. "cell_type": "code",
  457. "execution_count": null,
  458. "metadata": {
  459. "collapsed": true
  460. },
  461. "outputs": [],
  462. "source": []
  463. }
  464. ],
  465. "metadata": {
  466. "kernelspec": {
  467. "display_name": "Python 2",
  468. "language": "python",
  469. "name": "python2"
  470. },
  471. "language_info": {
  472. "codemirror_mode": {
  473. "name": "ipython",
  474. "version": 2
  475. },
  476. "file_extension": ".py",
  477. "mimetype": "text/x-python",
  478. "name": "python",
  479. "nbconvert_exporter": "python",
  480. "pygments_lexer": "ipython2",
  481. "version": "2.7.13"
  482. }
  483. },
  484. "nbformat": 4,
  485. "nbformat_minor": 2
  486. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement