{"action":"created","issue":{"url":"https://api.github.com/repos/weaverba137/pydl/issues/12","repository_url":"https://api.github.com/repos/weaverba137/pydl","labels_url":"https://api.github.com/repos/weaverba137/pydl/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/weaverba137/pydl/issues/12/comments","events_url":"https://api.github.com/repos/weaverba137/pydl/issues/12/events","html_url":"https://github.com/weaverba137/pydl/issues/12","id":163490745,"number":12,"title":"combine1fiber memory issue","user":{"login":"igoldste","id":20249743,"avatar_url":"https://avatars.githubusercontent.com/u/20249743?v=3","gravatar_id":"","url":"https://api.github.com/users/igoldste","html_url":"https://github.com/igoldste","followers_url":"https://api.github.com/users/igoldste/followers","following_url":"https://api.github.com/users/igoldste/following{/other_user}","gists_url":"https://api.github.com/users/igoldste/gists{/gist_id}","starred_url":"https://api.github.com/users/igoldste/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/igoldste/subscriptions","organizations_url":"https://api.github.com/users/igoldste/orgs","repos_url":"https://api.github.com/users/igoldste/repos","events_url":"https://api.github.com/users/igoldste/events{/privacy}","received_events_url":"https://api.github.com/users/igoldste/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"weaverba137","id":3780690,"avatar_url":"https://avatars.githubusercontent.com/u/3780690?v=3","gravatar_id":"","url":"https://api.github.com/users/weaverba137","html_url":"https://github.com/weaverba137","followers_url":"https://api.github.com/users/weaverba137/followers","following_url":"https://api.github.com/users/weaverba137/following{/other_user}","gists_url":"https://api.github.com/users/weaverba137/gists{/gist_id}","starred_url":"https://api.github.com/users/weaverba137/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weaverba137/subscriptions","organizations_url":"https://api.github.com/users/weaverba137/orgs","repos_url":"https://api.github.com/users/weaverba137/repos","events_url":"https://api.github.com/users/weaverba137/events{/privacy}","received_events_url":"https://api.github.com/users/weaverba137/received_events","type":"User","site_admin":false},"assignees":[{"login":"weaverba137","id":3780690,"avatar_url":"https://avatars.githubusercontent.com/u/3780690?v=3","gravatar_id":"","url":"https://api.github.com/users/weaverba137","html_url":"https://github.com/weaverba137","followers_url":"https://api.github.com/users/weaverba137/followers","following_url":"https://api.github.com/users/weaverba137/following{/other_user}","gists_url":"https://api.github.com/users/weaverba137/gists{/gist_id}","starred_url":"https://api.github.com/users/weaverba137/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weaverba137/subscriptions","organizations_url":"https://api.github.com/users/weaverba137/orgs","repos_url":"https://api.github.com/users/weaverba137/repos","events_url":"https://api.github.com/users/weaverba137/events{/privacy}","received_events_url":"https://api.github.com/users/weaverba137/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2016-07-01T23:45:53Z","updated_at":"2016-07-06T18:23:19Z","closed_at":null,"body":"The combine1fiber function is failing with a MemoryError when combining the spectra of two fibers:\r\n\r\n```\r\nimport numpy as np\r\nimport pyfits as pf \r\nfrom pydl.pydlspec2d.spec2d import combine1fiber\r\n\r\n#in this case, fiberFile1='spec-3683-55178-0016.fits' and fiberFile2='spec-3683-55178-0024.fits'\r\n\r\nfluxArray=pf.open(fiberFile1)[1].data.field('flux')\r\nloglamArray=pf.open(fiberFile1)[1].data.field('loglam')\r\nivarArray = pf.open(fiberFile1)[1].data.field('ivar')\r\n\r\n\r\nnextFlux = pf.open(fiberFile2)[1].data.field('flux')\r\nnextLoglam = pf.open(fiberFile2)[1].data.field('loglam')\r\nnextIvar = pf.open(fiberFile2)[1].data.field('ivar')\r\n\r\n\r\nnewloglam=3.775+np.arange(4000)*1e-4\r\ninloglam=np.array([loglamArray,nextLoglam])\r\nobjflux=np.array([fluxArray, nextFlux])\r\nobjivar=np.array([ivarArray, nextIvar])\r\n\r\n\r\nfluxArray, ivarArray = combine1fiber(inloglam=inloglam, objflux=objflux, newloglam=newloglam, objivar=objivar, verbose=True)\r\n\r\n---------------------------------------------------------------------------------------------------------------------------------\r\n```\r\n\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"plt_plate.py\", line 53, in <module>\r\n    fluxArray, ivarArray = combine1fiber(inloglam=loglams, objflux=fluxes, newloglam=loglamArray, objivar=ivars, verbose=True)\r\n  File \"/global/common/edison/contrib/desi/edison/hpcports_gnu-8.2/pydl-0.3.0_f30e8006-8.2/lib/python2.7/site-packages/pydl-0.3.0-py2.7.egg/pydl/pydlspec2d/spec2d/co\r\nmbine1fiber.py\", line 105, in combine1fiber\r\n    wavesort = inloglam[isort]\r\nMemoryError\r\nsrun: error: nid00076: task 0: Exited with exit code 1\r\nsrun: Terminating job step 881290.0\r\n```\r\n\r\ninloglam shape =  (2, 4620)\r\nobjfluxes shape = (2, 4620)\r\nobjvar shape = (2, 4620)\r\n\r\nI didn't think the arrays involved were large enough to cause memory issues, but I can't get the function to coadd any two fiber spectra. Any help would be appreciated! Thank you. \r\n"},"comment":{"url":"https://api.github.com/repos/weaverba137/pydl/issues/comments/230860761","html_url":"https://github.com/weaverba137/pydl/issues/12#issuecomment-230860761","issue_url":"https://api.github.com/repos/weaverba137/pydl/issues/12","id":230860761,"user":{"login":"weaverba137","id":3780690,"avatar_url":"https://avatars.githubusercontent.com/u/3780690?v=3","gravatar_id":"","url":"https://api.github.com/users/weaverba137","html_url":"https://github.com/weaverba137","followers_url":"https://api.github.com/users/weaverba137/followers","following_url":"https://api.github.com/users/weaverba137/following{/other_user}","gists_url":"https://api.github.com/users/weaverba137/gists{/gist_id}","starred_url":"https://api.github.com/users/weaverba137/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weaverba137/subscriptions","organizations_url":"https://api.github.com/users/weaverba137/orgs","repos_url":"https://api.github.com/users/weaverba137/repos","events_url":"https://api.github.com/users/weaverba137/events{/privacy}","received_events_url":"https://api.github.com/users/weaverba137/received_events","type":"User","site_admin":false},"created_at":"2016-07-06T18:23:19Z","updated_at":"2016-07-06T18:23:19Z","body":"OK, can you tell me a bit more about what you're trying to do with these spectra?"}}
{"actor":{"display_login":"weaverba137"}}