{"action":"created","issue":{"url":"https://api.github.com/repos/vortex-exoplanet/VIP/issues/24","labels_url":"https://api.github.com/repos/vortex-exoplanet/VIP/issues/24/labels{/name}","comments_url":"https://api.github.com/repos/vortex-exoplanet/VIP/issues/24/comments","events_url":"https://api.github.com/repos/vortex-exoplanet/VIP/issues/24/events","html_url":"https://github.com/vortex-exoplanet/VIP/issues/24","id":121884913,"number":24,"title":"Unexpected error in vip.pca","user":{"login":"henry-ngo","id":16262107,"avatar_url":"https://avatars.githubusercontent.com/u/16262107?v=3","gravatar_id":"","url":"https://api.github.com/users/henry-ngo","html_url":"https://github.com/henry-ngo","followers_url":"https://api.github.com/users/henry-ngo/followers","following_url":"https://api.github.com/users/henry-ngo/following{/other_user}","gists_url":"https://api.github.com/users/henry-ngo/gists{/gist_id}","starred_url":"https://api.github.com/users/henry-ngo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/henry-ngo/subscriptions","organizations_url":"https://api.github.com/users/henry-ngo/orgs","repos_url":"https://api.github.com/users/henry-ngo/repos","events_url":"https://api.github.com/users/henry-ngo/events{/privacy}","received_events_url":"https://api.github.com/users/henry-ngo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-12-12T22:31:25Z","updated_at":"2015-12-14T19:17:41Z","closed_at":null,"body":"The PCA reduction works for most of our data, but fails on one with an error message that I do not understand: ValueError: work array size computation for internal gesdd failed: -10. The error message seems to be generated by a scipy package though. \r\n\r\n---------------------------------------------------------------------------\r\nValueError                                Traceback (most recent call last)\r\n<ipython-input-9-28a8e8b4136b> in <module>()\r\n     39 \r\n     40 # Full Frame ADI PCA\r\n---> 41 image = pca(cube_hpf_0227, angs_0227, ncomp=5, svd_mode='randsvd', full_output=False, mask_center_px=0)\r\n     42 display_array_ds9(image)\r\n     43 \r\n\r\n/Users/henryngo/SourceTreeRepos/VIP/vip/pca/pca_fullfr.pyc in pca(cube, angle_list, cube_ref, scale_list, ncomp, ncomp2, svd_mode, scaling, mask_center_px, full_output, verbose, debug)\r\n    316         residuals_result = subtract_projection(cube, None, ncomp, scaling, \r\n    317                                                mask_center_px, debug, svd_mode,\r\n--> 318                                                verbose, full_output)\r\n    319         if full_output:\r\n    320             residuals_cube = residuals_result[0]\r\n\r\n/Users/henryngo/SourceTreeRepos/VIP/vip/pca/pca_fullfr.pyc in subtract_projection(cube, cube_ref, ncomp, scaling, mask_center_px, debug, svd_mode, verbose, full_output)\r\n    145             ref_lib = matrix\r\n    146 \r\n--> 147         V = svd_wrapper(ref_lib, svd_mode, ncomp, debug, verbose)\r\n    148 \r\n    149         if verbose: timing(start_time)\r\n\r\n/Users/henryngo/SourceTreeRepos/VIP/vip/pca/utils.pyc in svd_wrapper(matrix, mode, ncomp, debug, verbose, usv)\r\n    291     elif mode=='randsvd':\r\n    292         U, S, V = randomized_svd(matrix, n_components=ncomp, n_iter=2, \r\n--> 293                                  transpose='auto', random_state=None)\r\n    294         if debug: reconstruction(ncomp, U, S, V, 1)\r\n    295         if verbose: print('Done SVD/PCA with randomized SVD')\r\n\r\n/Users/henryngo/anaconda/lib/python2.7/site-packages/sklearn/utils/extmath.pyc in randomized_svd(M, n_components, n_oversamples, n_iter, transpose, flip_sign, random_state)\r\n    301 \r\n    302     # compute the SVD on the thin matrix: (k + p) wide\r\n--> 303     Uhat, s, V = linalg.svd(B, full_matrices=False)\r\n    304     del B\r\n    305     U = np.dot(Q, Uhat)\r\n\r\n/Users/henryngo/anaconda/lib/python2.7/site-packages/scipy/linalg/decomp_svd.pyc in svd(a, full_matrices, compute_uv, overwrite_a, check_finite)\r\n     97     lwork, info = gesdd_lwork(a1.shape[0], a1.shape[1], compute_uv=compute_uv, full_matrices=full_matrices)\r\n     98     if info != 0:\r\n---> 99         raise ValueError('work array size computation for internal gesdd failed: %d' % info)\r\n    100     lwork = int(lwork.real)\r\n    101 \r\n\r\nValueError: work array size computation for internal gesdd failed: -10\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/vortex-exoplanet/VIP/issues/comments/164531042","html_url":"https://github.com/vortex-exoplanet/VIP/issues/24#issuecomment-164531042","issue_url":"https://api.github.com/repos/vortex-exoplanet/VIP/issues/24","id":164531042,"user":{"login":"henry-ngo","id":16262107,"avatar_url":"https://avatars.githubusercontent.com/u/16262107?v=3","gravatar_id":"","url":"https://api.github.com/users/henry-ngo","html_url":"https://github.com/henry-ngo","followers_url":"https://api.github.com/users/henry-ngo/followers","following_url":"https://api.github.com/users/henry-ngo/following{/other_user}","gists_url":"https://api.github.com/users/henry-ngo/gists{/gist_id}","starred_url":"https://api.github.com/users/henry-ngo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/henry-ngo/subscriptions","organizations_url":"https://api.github.com/users/henry-ngo/orgs","repos_url":"https://api.github.com/users/henry-ngo/repos","events_url":"https://api.github.com/users/henry-ngo/events{/privacy}","received_events_url":"https://api.github.com/users/henry-ngo/received_events","type":"User","site_admin":false},"created_at":"2015-12-14T19:17:41Z","updated_at":"2015-12-14T19:17:41Z","body":"It's no problem that your email was in French; I think I was able to\nunderstand it. My apology was for any potential bad French mistakes I made\n(and may make in the future!). I'm planning to take more French classes in\n2016 :)\n\nOn Mon, Dec 14, 2015 at 10:30 AM, owertz <notifications@github.com> wrote:\n\n> Hi Henry,\n>\n> Thanks for your email as well as for the extra details.\n> I’ll take a look to this issue soon.\n>\n> > (P.S. Je suis désolé---je ne parle pas bien français! Il ya 10 ans depuis\n> > mon cours de français.)\n> It’s perfect. Sorry for my previous email. I thought that it was only sent\n> to Olivier,\n> that’s why I've written it in French ;-)\n>\n> Cheers,\n> Olivier\n>\n>\n> Le 14 déc. 2015 à 19:20, Henry Ngo <notifications@github.com> a écrit :\n>\n> > Bonjour Olivier,\n> >\n> > J'écris un bug report pour ce problème:\n> > https://github.com/vortex-exoplanet/NIRC2_Preprocessing/issues/4\n> >\n> > Merci!\n> > Henry\n> >\n> > (P.S. Je suis désolé---je ne parle pas bien français! Il ya 10 ans depuis\n> > mon cours de français.)\n> >\n> > On Mon, Dec 14, 2015 at 9:41 AM, owertz <notifications@github.com>\n> wrote:\n> >\n> > > Holà Oli,\n> > >\n> > > Je vais attendre d’avoir plus d’info de sa part, via le bug report,\n> > > avant d’investiguer.\n> > >\n> > > Bonne soirée,\n> > > Oli\n> > >\n> > >\n> > >\n> > > Le 14 déc. 2015 à 18:27, Olivier Absil <notifications@github.com> a\n> écrit\n> > > :\n> > >\n> > > > Hi Henry,\n> > > >\n> > > > Olivier Wertz should be in copy of this bug report and, as the\n> developer\n> > > > of the NIRC2_preprocessing package, will probably have a look into\n> this\n> > > > issue in the coming days. Could you open a bug report in\n> > > > NIRC2_preprocessing and give us more details (e.g., by how many\n> pixels\n> > > > were you off in your estimation of the vortex center?).\n> > > >\n> > > > Cheers,\n> > > > Olivier.\n> > > >\n> > > > Le 14/12/15 18:11, Henry Ngo a écrit :\n> > > > >\n> > > > > Changing the sad_mode from randsvd to lapack did not make a\n> > > > > difference. However, I realise now that cube_hpf_0227 is empty\n> > > (size=0)!\n> > > > >\n> > > > > Going back through the arrays, it looks like the problem is that\n> > > > > NIRC2_preprocessing.cube_registration() is returning an empty\n> array.\n> > > > >\n> > > > > So, then I thought the problem might be with our initial guess for\n> the\n> > > > > vortex center (and the \"dust\" center). It turns out that the vortex\n> > > > > initial guess was a few pixels off and changing this resolved the\n> > > > > problem. So, vip.pca.pca() runs as expected (with the original\n> > > > > sad_mode='randsvd\" setting)\n> > > > >\n> > > > > Although this does leave me a little concerned that our results are\n> > > > > depending a lot on the initial guess. I'll talk to Dimitri and\n> Olivier\n> > > > > further about this.\n> > > > >\n> > > > > Thanks!!\n> > > > >\n> > > > > —\n> > > > > Reply to this email directly or view it on GitHub\n> > > > > <\n> > >\n> https://github.com/vortex-exoplanet/VIP/issues/24#issuecomment-164497845>.\n> > > > >\n> > > >\n> > > > --\n> > > > --------------------------------------------------\n> > > > Dr. Olivier ABSIL\n> > > > F.R.S.-FNRS Research Associate\n> > > > Dept. of Astrophysics, Geophysics and Oceanography\n> > > > Université de Liège (ULg), bât. B5c\n> > > > 17 allée du Six Août Tel: +32-(0)4-366.97.24\n> > > > B-4000 Sart-Tilman Fax: +32-(0)4-366.97.46\n> > > > Email: absil (at) astro.ulg.ac.be\n> > > > --------------------------------------------------\n> > > >\n> > > > —\n> > > > Reply to this email directly or view it on GitHub.\n> > > >\n> > >\n> > > ********************************************************************\n> > > Dr. Olivier WERTZ\n> > > Postdoctoral Position - VORTEX Project\n> > > E-mail : owertz@ulg.ac.be\n> > > Email : wertz@astro.ulg.ac.be\n> > > Institut d’Astrophysique et de Géophysique, Fac. Sc., AEOS\n> > > AGO: http://www.ago.ulg.ac.be\n> > > Université de Liège\n> > > Allée du 6 Août, 17, B5c,\n> > > B-4000 Sart Tilman, Belgique\n> > > ********************************************************************\n> > >\n> > >\n> > >\n> > >\n> > >\n> > >\n> > >\n> > >\n> > > —\n> > > Reply to this email directly or view it on GitHub\n> > > <\n> https://github.com/vortex-exoplanet/VIP/issues/24#issuecomment-164505711>\n> > > .\n>\n> > >\n> > —\n> > Reply to this email directly or view it on GitHub.\n> >\n>\n> ********************************************************************\n> Dr. Olivier WERTZ\n> Postdoctoral Position - VORTEX Project\n> E-mail : owertz@ulg.ac.be\n> Email : wertz@astro.ulg.ac.be\n> Institut d’Astrophysique et de Géophysique, Fac. Sc., AEOS\n> AGO: http://www.ago.ulg.ac.be\n> Université de Liège\n> Allée du 6 Août, 17, B5c,\n> B-4000 Sart Tilman, Belgique\n> ********************************************************************\n>\n>\n>\n>\n>\n>\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/vortex-exoplanet/VIP/issues/24#issuecomment-164518880>\n> .\n>\n"}}