{"action":"created","issue":{"url":"https://api.github.com/repos/rabrahm/ceres/issues/5","repository_url":"https://api.github.com/repos/rabrahm/ceres","labels_url":"https://api.github.com/repos/rabrahm/ceres/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/rabrahm/ceres/issues/5/comments","events_url":"https://api.github.com/repos/rabrahm/ceres/issues/5/events","html_url":"https://github.com/rabrahm/ceres/issues/5","id":177006566,"number":5,"title":"Malloc error/seg fault in GLOBALutils.PCoeff","user":{"login":"jmccormac01","id":1912007,"avatar_url":"https://avatars.githubusercontent.com/u/1912007?v=3","gravatar_id":"","url":"https://api.github.com/users/jmccormac01","html_url":"https://github.com/jmccormac01","followers_url":"https://api.github.com/users/jmccormac01/followers","following_url":"https://api.github.com/users/jmccormac01/following{/other_user}","gists_url":"https://api.github.com/users/jmccormac01/gists{/gist_id}","starred_url":"https://api.github.com/users/jmccormac01/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmccormac01/subscriptions","organizations_url":"https://api.github.com/users/jmccormac01/orgs","repos_url":"https://api.github.com/users/jmccormac01/repos","events_url":"https://api.github.com/users/jmccormac01/events{/privacy}","received_events_url":"https://api.github.com/users/jmccormac01/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-09-14T20:05:19Z","updated_at":"2016-09-16T18:45:14Z","closed_at":null,"body":"Hi,\r\nApologies for the stream of issues recently. This is just a heads up. I have 9 nights of CAFE data and 7 of them run fine. Two of the night's reductions fail around the extraction of the orders in the object fibre. I put a ```print(i)``` in the lines below, to see where the problem is. I get the error message below. \r\n\r\n```python\r\n235     print \"\\t\\tWill extract\",nord,\"orders for object fibre...\"                                                                                                                        \r\n236     for i in range(nord):                                                                                                                                                             \r\n237         P_marsh = GLOBALutils.PCoeff( fl, c_all[i,:], ext_aperture, RO_fl, GA_fl,\\                                                                                                    \r\n238             NSigma_Marsh, S_Marsh, N_Marsh, Marsh_alg, min_extract_col,max_extract_col )                                                                                        \r\n239         P    += P_marsh                                                                                                                                                               \r\n240         print(i) \r\n```\r\n \r\n```\r\n        Tracing echelle orders...\r\n                90 orders found.\r\n\r\n        Extraction of Flat calibration frames:\r\n                No extracted flat object spectra found or extraction forced, extracting and saving...\r\n                Will extract 90 orders for object fibre...\r\n0\r\n1\r\n2\r\n... (skipped for obvious reasons)\r\n87\r\n88\r\npython(48520,0x7fff7717f000) malloc: *** error for object 0x145ff6208: incorrect checksum for freed object - object was probably modified after being freed.\r\n*** set a breakpoint in malloc_error_break to debug\r\n[1]    48520 abort      python cafepipe.py /Users/James/Dropbox/CAFE-OBS/data/160910_CAFE\r\n```\r\n\r\nIt seems that the first 89 orders seem ok but the last one dies. On a different night's data I get a segmentation fault on the same order:\r\n\r\n```\r\n        Tracing echelle orders...\r\n                90 orders found.\r\n\r\n        Extraction of Flat calibration frames:\r\n                No extracted flat object spectra found or extraction forced, extracting and saving...\r\n                Will extract 90 orders for object fibre...\r\n0\r\n1\r\n2\r\n... (skipped for obvious reasons)\r\n87\r\n88\r\n[1]    49833 segmentation fault  python cafepipe.py /Users/James/Dropbox/CAFE-OBS/data/160909_CAFE\r\n```\r\n\r\nMaybe these orders are too faint for optimal extraction. To test this I tweaked ```nord=90``` to ```nord=89``` and the problem went away. \r\n\r\n```python\r\n186     nord=89                                                                                                                                                                           \r\n187     c_all = c_all[:nord]                                                                                                                                                              \r\n188     print '\\t\\t'+ str(nord)+' orders found.' \r\n```\r\n\r\nI plan to add a command line argument to ```cafepipe.py``` to allow manual selection of the orders.  \r\n\r\nI thought I'd let you know as the underlying error causing the segfault/malloc errors (if they are not the same) are not handled. I can give you some data to test this with if you like. I've not looked at the Marsh.c code in depth."},"comment":{"url":"https://api.github.com/repos/rabrahm/ceres/issues/comments/247677228","html_url":"https://github.com/rabrahm/ceres/issues/5#issuecomment-247677228","issue_url":"https://api.github.com/repos/rabrahm/ceres/issues/5","id":247677228,"user":{"login":"rabrahm","id":16330156,"avatar_url":"https://avatars.githubusercontent.com/u/16330156?v=3","gravatar_id":"","url":"https://api.github.com/users/rabrahm","html_url":"https://github.com/rabrahm","followers_url":"https://api.github.com/users/rabrahm/followers","following_url":"https://api.github.com/users/rabrahm/following{/other_user}","gists_url":"https://api.github.com/users/rabrahm/gists{/gist_id}","starred_url":"https://api.github.com/users/rabrahm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rabrahm/subscriptions","organizations_url":"https://api.github.com/users/rabrahm/orgs","repos_url":"https://api.github.com/users/rabrahm/repos","events_url":"https://api.github.com/users/rabrahm/events{/privacy}","received_events_url":"https://api.github.com/users/rabrahm/received_events","type":"User","site_admin":false},"created_at":"2016-09-16T18:45:14Z","updated_at":"2016-09-16T18:45:14Z","body":"Hi James, the problem was that the trace of the last order found was actually out of the CCD at the edges (due to the curvature of echelle orders). Now the pipeline checks for this and removes the orders that go out of the CCD. Please check if this change works for all your nights. In addition, the spectral classification module should work now if you download the models that are specified now at the end of the README. "}}
{"actor":{"display_login":"rabrahm"}}