{"action":"created","issue":{"url":"https://api.github.com/repos/cta-observatory/ctapipe/issues/828","repository_url":"https://api.github.com/repos/cta-observatory/ctapipe","labels_url":"https://api.github.com/repos/cta-observatory/ctapipe/issues/828/labels{/name}","comments_url":"https://api.github.com/repos/cta-observatory/ctapipe/issues/828/comments","events_url":"https://api.github.com/repos/cta-observatory/ctapipe/issues/828/events","html_url":"https://github.com/cta-observatory/ctapipe/issues/828","id":383020067,"node_id":"MDU6SXNzdWUzODMwMjAwNjc=","number":828,"title":"Impact reconstruction still fails for different azimuth directions","user":{"login":"MaxNoe","id":5488440,"node_id":"MDQ6VXNlcjU0ODg0NDA=","avatar_url":"https://avatars3.githubusercontent.com/u/5488440?v=4","gravatar_id":"","url":"https://api.github.com/users/MaxNoe","html_url":"https://github.com/MaxNoe","followers_url":"https://api.github.com/users/MaxNoe/followers","following_url":"https://api.github.com/users/MaxNoe/following{/other_user}","gists_url":"https://api.github.com/users/MaxNoe/gists{/gist_id}","starred_url":"https://api.github.com/users/MaxNoe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaxNoe/subscriptions","organizations_url":"https://api.github.com/users/MaxNoe/orgs","repos_url":"https://api.github.com/users/MaxNoe/repos","events_url":"https://api.github.com/users/MaxNoe/events{/privacy}","received_events_url":"https://api.github.com/users/MaxNoe/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"mackaiver","id":4076745,"node_id":"MDQ6VXNlcjQwNzY3NDU=","avatar_url":"https://avatars3.githubusercontent.com/u/4076745?v=4","gravatar_id":"","url":"https://api.github.com/users/mackaiver","html_url":"https://github.com/mackaiver","followers_url":"https://api.github.com/users/mackaiver/followers","following_url":"https://api.github.com/users/mackaiver/following{/other_user}","gists_url":"https://api.github.com/users/mackaiver/gists{/gist_id}","starred_url":"https://api.github.com/users/mackaiver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mackaiver/subscriptions","organizations_url":"https://api.github.com/users/mackaiver/orgs","repos_url":"https://api.github.com/users/mackaiver/repos","events_url":"https://api.github.com/users/mackaiver/events{/privacy}","received_events_url":"https://api.github.com/users/mackaiver/received_events","type":"User","site_admin":false},"assignees":[{"login":"mackaiver","id":4076745,"node_id":"MDQ6VXNlcjQwNzY3NDU=","avatar_url":"https://avatars3.githubusercontent.com/u/4076745?v=4","gravatar_id":"","url":"https://api.github.com/users/mackaiver","html_url":"https://github.com/mackaiver","followers_url":"https://api.github.com/users/mackaiver/followers","following_url":"https://api.github.com/users/mackaiver/following{/other_user}","gists_url":"https://api.github.com/users/mackaiver/gists{/gist_id}","starred_url":"https://api.github.com/users/mackaiver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mackaiver/subscriptions","organizations_url":"https://api.github.com/users/mackaiver/orgs","repos_url":"https://api.github.com/users/mackaiver/repos","events_url":"https://api.github.com/users/mackaiver/events{/privacy}","received_events_url":"https://api.github.com/users/mackaiver/received_events","type":"User","site_admin":false},{"login":"MaxNoe","id":5488440,"node_id":"MDQ6VXNlcjU0ODg0NDA=","avatar_url":"https://avatars3.githubusercontent.com/u/5488440?v=4","gravatar_id":"","url":"https://api.github.com/users/MaxNoe","html_url":"https://github.com/MaxNoe","followers_url":"https://api.github.com/users/MaxNoe/followers","following_url":"https://api.github.com/users/MaxNoe/following{/other_user}","gists_url":"https://api.github.com/users/MaxNoe/gists{/gist_id}","starred_url":"https://api.github.com/users/MaxNoe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaxNoe/subscriptions","organizations_url":"https://api.github.com/users/MaxNoe/orgs","repos_url":"https://api.github.com/users/MaxNoe/repos","events_url":"https://api.github.com/users/MaxNoe/events{/privacy}","received_events_url":"https://api.github.com/users/MaxNoe/received_events","type":"User","site_admin":false},{"login":"thomasgas","id":24605557,"node_id":"MDQ6VXNlcjI0NjA1NTU3","avatar_url":"https://avatars2.githubusercontent.com/u/24605557?v=4","gravatar_id":"","url":"https://api.github.com/users/thomasgas","html_url":"https://github.com/thomasgas","followers_url":"https://api.github.com/users/thomasgas/followers","following_url":"https://api.github.com/users/thomasgas/following{/other_user}","gists_url":"https://api.github.com/users/thomasgas/gists{/gist_id}","starred_url":"https://api.github.com/users/thomasgas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomasgas/subscriptions","organizations_url":"https://api.github.com/users/thomasgas/orgs","repos_url":"https://api.github.com/users/thomasgas/repos","events_url":"https://api.github.com/users/thomasgas/events{/privacy}","received_events_url":"https://api.github.com/users/thomasgas/received_events","type":"User","site_admin":false}],"milestone":null,"comments":9,"created_at":"2018-11-21T09:09:43Z","updated_at":"2018-11-22T11:20:50Z","closed_at":null,"author_association":"MEMBER","body":"Impact reconstruction on current master still fails dependent on pointing azimuth:\r\n\r\nThe files I used are here (standard cta password):\r\nhttps://nextcloud.e5.physik.tu-dortmund.de/index.php/s/nA5SrraRjjCZRPc\r\n\r\n\r\n\r\n\r\n\r\nAzimuth 0deg:\r\n![impact2](https://user-images.githubusercontent.com/5488440/48830721-8d288680-ed75-11e8-9035-f623f3b2f4f2.png)\r\n\r\nAzimuth 180deg:\r\n![impact1](https://user-images.githubusercontent.com/5488440/48830722-8d288680-ed75-11e8-8367-8c99c3f90e6e.png)\r\n\r\n\r\nI'm using this code to do the analysis:\r\n```python\r\nimport astropy.units as u\r\n\r\nfrom ctapipe.io import EventSourceFactory\r\nfrom ctapipe.calib import CameraCalibrator\r\n\r\nfrom ctapipe.image.cleaning import tailcuts_clean, number_of_islands\r\n\r\nfrom ctapipe.reco import HillasReconstructor\r\n\r\n\r\n# unoptimized cleaning levels, copied from \r\n# https://github.com/tudo-astroparticlephysics/cta_preprocessing\r\ncleaning_level = {\r\n    'LSTCam': (3.5, 7.5, 2),  # ?? (3, 6) for Abelardo...\r\n    'FlashCam': (4, 8, 2),  # there is some scaling missing?\r\n    'CHEC': (2, 4, 2),\r\n}\r\n\r\nallowed_cameras = {'LSTCam', 'CHEC', 'FlashCam'}\r\n\r\n\r\ninput_url = '/home/maxnoe/Downloads/gamma_20deg_180deg_run7360___cta-prod3-merged_desert-2150m-Paranal-3HB89-NGFD.simtel.gz'\r\nevent_source = EventSourceFactory.produce(input_url=input_url, max_events=8)\r\n\r\ncalibrator = CameraCalibrator(\r\n    eventsource=event_source,\r\n)\r\n\r\nreco = HillasReconstructor()\r\n\r\nfor event in event_source:\r\n    print(f'Id: {event.count}', f'E = {event.mc.energy:1.3f}', f'Telescopes: {len(event.r0.tel)}', sep=', ')\r\n    \r\n    calibrator.calibrate(event)\r\n    \r\n    # mapping of telescope_id to parameters for stereo reconstruction\r\n    hillas_containers = {}\r\n    pointing_azimuth = {}\r\n    pointing_altitude = {}\r\n    time_gradients = {}\r\n    \r\n    for telescope_id, dl1 in event.dl1.tel.items():\r\n        camera = event.inst.subarray.tels[telescope_id].camera\r\n        \r\n        if camera.cam_id not in allowed_cameras:\r\n            continue\r\n            \r\n        image = dl1.image[0]\r\n        peakpos = dl1.peakpos[0]\r\n        \r\n        boundary, picture, min_neighbors = cleaning_level[camera.cam_id]\r\n\r\n        clean = tailcuts_clean(\r\n            camera, \r\n            image,\r\n            boundary_thresh=boundary,\r\n            picture_thresh=picture,\r\n            min_number_picture_neighbors=min_neighbors\r\n        )\r\n        if clean.sum() < 5:\r\n            continue\r\n        \r\n        hillas_c = hillas_parameters(camera[clean], image[clean])\r\n        leakage_c = leakage(camera, image, clean)\r\n        n_islands, island_ids = number_of_islands(camera, clean)\r\n        \r\n        timing_c = timing_parameters(camera[clean], image[clean], peakpos[clean], hillas_c)\r\n        \r\n        hillas_containers[telescope_id] = hillas_c\r\n        \r\n        # ssts have no timing in prod3b, so we'll use the skewness\r\n        time_gradients[telescope_id] = timing_c.slope.value if camera.cam_id != 'CHEC' else hillas_c.skewness\r\n        \r\n        pointing_azimuth[telescope_id] = event.mc.tel[telescope_id].azimuth_raw * u.rad\r\n        pointing_altitude[telescope_id] = event.mc.tel[telescope_id].altitude_raw * u.rad\r\n    \r\n    if len(hillas_containers) < 2:\r\n        continue\r\n        \r\n    stereo = reco.predict(\r\n        hillas_containers, event.inst, pointing_alt=pointing_altitude, pointing_az=pointing_azimuth\r\n    )\r\n    \r\n    plt.figure()\r\n    angle_offset = event.mcheader.run_array_direction[0]\r\n    disp = ArrayDisplay(event.inst.subarray)\r\n\r\n    disp.set_vector_hillas(hillas_containers, time_gradient=time_gradients, angle_offset=angle_offset, length=500)\r\n    plt.scatter(event.mc.core_x, event.mc.core_y, s=200, c='k', marker='x', label='True Impact',)\r\n    plt.scatter(stereo.core_x, stereo.core_y, s=200, c='r', marker='x', label='Estimated Impact',)\r\n\r\n    plt.legend()\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/cta-observatory/ctapipe/issues/comments/440999375","html_url":"https://github.com/cta-observatory/ctapipe/issues/828#issuecomment-440999375","issue_url":"https://api.github.com/repos/cta-observatory/ctapipe/issues/828","id":440999375,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MDk5OTM3NQ==","user":{"login":"thomasgas","id":24605557,"node_id":"MDQ6VXNlcjI0NjA1NTU3","avatar_url":"https://avatars2.githubusercontent.com/u/24605557?v=4","gravatar_id":"","url":"https://api.github.com/users/thomasgas","html_url":"https://github.com/thomasgas","followers_url":"https://api.github.com/users/thomasgas/followers","following_url":"https://api.github.com/users/thomasgas/following{/other_user}","gists_url":"https://api.github.com/users/thomasgas/gists{/gist_id}","starred_url":"https://api.github.com/users/thomasgas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomasgas/subscriptions","organizations_url":"https://api.github.com/users/thomasgas/orgs","repos_url":"https://api.github.com/users/thomasgas/repos","events_url":"https://api.github.com/users/thomasgas/events{/privacy}","received_events_url":"https://api.github.com/users/thomasgas/received_events","type":"User","site_admin":false},"created_at":"2018-11-22T11:20:50Z","updated_at":"2018-11-22T11:20:50Z","author_association":"MEMBER","body":"Seems good! thanks @MaxNoe!"}}
{"actor":{"display_login":"thomasgas"}}