{"action":"created","issue":{"url":"https://api.github.com/repos/bleutner/RStoolbox/issues/4","labels_url":"https://api.github.com/repos/bleutner/RStoolbox/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/bleutner/RStoolbox/issues/4/comments","events_url":"https://api.github.com/repos/bleutner/RStoolbox/issues/4/events","html_url":"https://github.com/bleutner/RStoolbox/issues/4","id":126868622,"number":4,"title":"estimateHaze","user":{"login":"BayAludra","id":16718648,"avatar_url":"https://avatars.githubusercontent.com/u/16718648?v=3","gravatar_id":"","url":"https://api.github.com/users/BayAludra","html_url":"https://github.com/BayAludra","followers_url":"https://api.github.com/users/BayAludra/followers","following_url":"https://api.github.com/users/BayAludra/following{/other_user}","gists_url":"https://api.github.com/users/BayAludra/gists{/gist_id}","starred_url":"https://api.github.com/users/BayAludra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BayAludra/subscriptions","organizations_url":"https://api.github.com/users/BayAludra/orgs","repos_url":"https://api.github.com/users/BayAludra/repos","events_url":"https://api.github.com/users/BayAludra/events{/privacy}","received_events_url":"https://api.github.com/users/BayAludra/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-01-15T13:06:13Z","updated_at":"2016-01-22T12:42:35Z","closed_at":null,"body":"Dear authors, \r\n\r\nfirst of all congratulations and thank you very much for this very nice package. \r\n\r\nI mainly used the package to calculate the atmospheric correction using the DOS method with LandSat8 images from 2014.\r\n\r\nIn Landsat8 images the DN values are encoded in 16bit and thus have the range 0 - 65535. Because of that the default value of the darkProp = 0.02 seems not to be appropriate since if running estimateHaze on gets the Warnings for each band: \r\n\r\ndarkProp for band X was chosen too high. It exceeds the value range.\r\n\r\n![haze1](https://cloud.githubusercontent.com/assets/16718648/12353536/36d81aee-bb90-11e5-9607-a419ae4c4a34.PNG)\r\n\r\nAdjusting the value of darkProp to about 0.000025 fixes the problem and SHV values are evaluated properly. \r\n![haze2](https://cloud.githubusercontent.com/assets/16718648/12353541/4394d48e-bb90-11e5-8f09-f5915d703c29.PNG)\r\n\r\nNevertheless the provided examples are not working with my images and the manual setting of the darkProp parameter might not always be applicable. Thus, I was wondering if you could add some piece of code to check the DN values and adjust the default parameters somehow. \r\n\r\nIn addition I am seeing that the following two corrections are giving exactly the same result: \r\n\r\n  ## Convert DN to top of atmosphere reflectance and brightness temperature\r\n  lsat_ref <- radCor(lsat, metaData = metaData, method = \"apref\")\r\n\r\n  hazeDN <- estimateHaze(lsat, hazeBands = 1:4, darkProp = 0.000025, plot = TRUE)\r\n  lsat_sref <- radCor(lsat, metaData = metaData, method = \"sdos\",\r\n                      hazeValues = hazeDN, hazeBands = 1:4)\r\n\r\nSo it seems that in my case the atmospheric correction is not doing anything which does not seem right. Do you have an idea where this could be coming from? Maybe it is somehow related to the issue with the very small haze values I mentioned. \r\n\r\nThank you very much in advance for your help,\r\nHendrik\r\n"},"comment":{"url":"https://api.github.com/repos/bleutner/RStoolbox/issues/comments/173910341","html_url":"https://github.com/bleutner/RStoolbox/issues/4#issuecomment-173910341","issue_url":"https://api.github.com/repos/bleutner/RStoolbox/issues/4","id":173910341,"user":{"login":"BayAludra","id":16718648,"avatar_url":"https://avatars.githubusercontent.com/u/16718648?v=3","gravatar_id":"","url":"https://api.github.com/users/BayAludra","html_url":"https://github.com/BayAludra","followers_url":"https://api.github.com/users/BayAludra/followers","following_url":"https://api.github.com/users/BayAludra/following{/other_user}","gists_url":"https://api.github.com/users/BayAludra/gists{/gist_id}","starred_url":"https://api.github.com/users/BayAludra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BayAludra/subscriptions","organizations_url":"https://api.github.com/users/BayAludra/orgs","repos_url":"https://api.github.com/users/BayAludra/repos","events_url":"https://api.github.com/users/BayAludra/events{/privacy}","received_events_url":"https://api.github.com/users/BayAludra/received_events","type":"User","site_admin":false},"created_at":"2016-01-22T12:42:35Z","updated_at":"2016-01-22T12:42:35Z","body":"Dear authors, \r\n\r\nthank you very much for taking care of this so quickly. I tested the new code and it now works fine with my images. Great!\r\n\r\nIn the meantime I spotted another issue. In Landsat 8 the RGB bands are 2:4 and when I tried to use only these three bands to estimate the haze some layers become filled with NAs. This is because the code can not handle when layer 1 is left out. If one uses 1:4 everything works fine but you might want to add some protection an a future release. \r\n\r\nBy the way, are you planning to create a new version soon or should I keep using the development branch? \r\n\r\nBest\r\nHendrik \r\n\r\n"}}