{"action":"opened","issue":{"url":"https://api.github.com/repos/D3DEnergetic/FIDASIM/issues/50","labels_url":"https://api.github.com/repos/D3DEnergetic/FIDASIM/issues/50/labels{/name}","comments_url":"https://api.github.com/repos/D3DEnergetic/FIDASIM/issues/50/comments","events_url":"https://api.github.com/repos/D3DEnergetic/FIDASIM/issues/50/events","html_url":"https://github.com/D3DEnergetic/FIDASIM/issues/50","id":74628942,"number":50,"title":"Proposal: Aperture Specification for NPA and NBI","user":{"login":"lstagner","id":4305891,"avatar_url":"https://avatars.githubusercontent.com/u/4305891?v=3","gravatar_id":"","url":"https://api.github.com/users/lstagner","html_url":"https://github.com/lstagner","followers_url":"https://api.github.com/users/lstagner/followers","following_url":"https://api.github.com/users/lstagner/following{/other_user}","gists_url":"https://api.github.com/users/lstagner/gists{/gist_id}","starred_url":"https://api.github.com/users/lstagner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lstagner/subscriptions","organizations_url":"https://api.github.com/users/lstagner/orgs","repos_url":"https://api.github.com/users/lstagner/repos","events_url":"https://api.github.com/users/lstagner/events{/privacy}","received_events_url":"https://api.github.com/users/lstagner/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-05-09T09:03:54Z","updated_at":"2015-05-09T09:03:54Z","closed_at":null,"body":"We currently define a NPA diagnostic by 5 parameters ( 2 points in space, radius of detector and aperture, and the separation between the aperture and detector). This is flawed in a few ways\r\n\r\n1. Only supports detectors with circular apertures and detectors\r\n2. Disregards orientation of the detector (i.e. is the detector tilted w.r.t. the midplane)\r\n3. Assumes the aperture and detector are parallel (e.g like an equal sign =)\r\n\r\nI propose that we specify an aperture/detector by 3 points in space. Like so...\r\n![index](https://cloud.githubusercontent.com/assets/4305891/7549564/76ae11d0-f5ef-11e4-8044-d932f2378518.png)\r\n\r\nUsing these three points we can also define a set of basis vectors for the aperture/detector plane. With the basis vectors it is easy to go between plane coordinates and machine coordinates. \r\n\r\nTo determine if a particle goes through the aperture and hits the detector we find the point on the plane where the particle crosses the aperture and detector planes. We then use an indicator function to determine if the point lies within the aperture/detector region. This can all be done in a single function. Here is an example\r\n\r\n![aperture](https://cloud.githubusercontent.com/assets/4305891/7549530/e0f85516-f5ed-11e4-9a0c-7bb132fda111.png)\r\n\r\nSo the full NPA diagnostic specifications would be \r\n\r\n* Three points for the aperture (like pictured)\r\n* Three points for the detector\r\n* Aperture shape e.g. \"ellipsoidal\" or \"rectangular\"\r\n* Detector shape\r\n\r\nAnother advantage with this specification is that with the infrastructure we develop to model the NPA aperture/detector could also be used to model NBI apertures.\r\n"}}