{"action":"opened","issue":{"url":"https://api.github.com/repos/vortex-exoplanet/NIRC2_Preprocessing/issues/8","repository_url":"https://api.github.com/repos/vortex-exoplanet/NIRC2_Preprocessing","labels_url":"https://api.github.com/repos/vortex-exoplanet/NIRC2_Preprocessing/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/vortex-exoplanet/NIRC2_Preprocessing/issues/8/comments","events_url":"https://api.github.com/repos/vortex-exoplanet/NIRC2_Preprocessing/issues/8/events","html_url":"https://github.com/vortex-exoplanet/NIRC2_Preprocessing/issues/8","id":161591801,"number":8,"title":"Request: bad pixel mapping from NIRC2 flats","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":0,"created_at":"2016-06-22T04:32:15Z","updated_at":"2016-06-22T04:32:15Z","closed_at":null,"body":"Hello!\r\n\r\nRecently, when Dimitri and I tried to build a super-cube with vip for RDI processing, we notice that we have a lot of trouble finding frames with enough correlation. After inspecting the frames, we see that there are image artifacts due to bad pixels that might be making it hard for VIP to find correlations.\r\n\r\nI inspected the \"master\" method in NIRC2_Preprocessing (the wrapper is \"masterFlat\") and notice that there is currently very little filtering options for creating the master flat. \r\n\r\nIn particular, the only option is line 484, where you set the flatfield value to 1.0 if the pixel value falls below some user-defined sigma cutoff (e.g. if I set filtering=5 then all values below 5 standard deviations of 1.0 gets replaced with 1.0). \r\n\r\nI don't think this does enough though. Firstly, there is no upper filtering for removing the NIRC2 pixels that always show a high value. Secondly, it is important to note the locations of these bad pixels so that we smooth out the science frames too.\r\n\r\nI would like to ask for two additional features for the \"master\" method:\r\n1. Add a user defined keyword for an upper filtering.\r\n\r\n2. The routine should return the locations of filtered pixels. Maybe as an array of 0 and 1 where 0's are locations not filtered and 1's are locations filtered (or boolean array).\r\n\r\nIn our \"Friends of Hot Jupiters\" work, I found that it's best for us to ignore all flatfield pixels less than 0.1 (absolute value) and flatfield pixels 10 standard deviations greater than the median. I came to these values by examining the NIRC2 engineering manual and from empirical trials to determine what worked. I don't remember the URL where I downloaded the manual but I can send it via email if you have not yet seen it."}}
{"actor":{"display_login":"henry-ngo"}}