{"id":122,"date":"2018-04-03T10:07:36","date_gmt":"2018-04-03T15:07:36","guid":{"rendered":"https:\/\/pctk.jhu.edu\/?p=122"},"modified":"2018-04-03T10:07:36","modified_gmt":"2018-04-03T15:07:36","slug":"correction-normrnd-in-script-with-no-correlation","status":"publish","type":"post","link":"https:\/\/pctk.jhu.edu\/index.php\/2018\/04\/03\/correction-normrnd-in-script-with-no-correlation\/","title":{"rendered":"Correction: normrnd in script with no correlation"},"content":{"rendered":"<p>script_workflow_PcTK_NoCorrelation.m has been updated to version 1.1. The new file can be downloaded <a href=\"https:\/\/pctk.jhu.edu\/wp-content\/uploads\/2018\/04\/script_workflow_PcTK_NoCorrelation.m.zip\">from here<\/a>\u00a0and will be included in the package version 3.22.<\/p>\n<p>There was a mistake on how to use a Matlab function normrnd(mu, sigma). The &#8216;sigma&#8217; must be the standard deviation of data, <strong>sqrt(m2_yt)<\/strong>, not the variance of data, m2_yt. The corrected code in lines 260\u2013268 in version 1.1 appears:<\/p>\n<ul>\n<li>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\u00a0% \u00a0 Step 5. Generate a noisy 4-D count sinogram, nRm(Nl,ch,row,view)<\/li>\n<li>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 switch iflag_noise<\/li>\n<li>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 case flag_noise_normal\u00a0 % gen Gaussian data<\/li>\n<li>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 m2_yn = normrnd(m2_yt, <strong>sqrt(m2_yt)<\/strong>);\u00a0 \u00a0 \u00a0 \u00a0 % ver 1.1<\/li>\n<li>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 case flag_noise_Poisson % gen Poisson data<\/li>\n<li>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 m2_yn = random(&#8216;Poisson&#8217;, m2_yt);<\/li>\n<li>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 end<\/li>\n<li>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 m3_yt(:,:,irow) = m2_yt;<\/li>\n<li>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 m3_yn(:,:,irow) = m2_yn;<\/li>\n<\/ul>\n<p>We thank Danyang Li of The Southern Medical University for drawing our attention to it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>script_workflow_PcTK_NoCorrelation.m has been updated to version 1.1. The new file can be downloaded from here\u00a0and will be included in the package version 3.22. There was a mistake on how to use a Matlab function normrnd(mu, sigma). The &#8216;sigma&#8217; must be the standard deviation of data, sqrt(m2_yt), not the variance of data, m2_yt. The corrected code &hellip; <\/p>\n<p class=\"read-more\"><a class=\"btn btn-default\" href=\"https:\/\/pctk.jhu.edu\/index.php\/2018\/04\/03\/correction-normrnd-in-script-with-no-correlation\/\"> Read More<span class=\"screen-reader-text\">  Read More<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-122","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/pctk.jhu.edu\/index.php\/wp-json\/wp\/v2\/posts\/122","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pctk.jhu.edu\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pctk.jhu.edu\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pctk.jhu.edu\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pctk.jhu.edu\/index.php\/wp-json\/wp\/v2\/comments?post=122"}],"version-history":[{"count":2,"href":"https:\/\/pctk.jhu.edu\/index.php\/wp-json\/wp\/v2\/posts\/122\/revisions"}],"predecessor-version":[{"id":246,"href":"https:\/\/pctk.jhu.edu\/index.php\/wp-json\/wp\/v2\/posts\/122\/revisions\/246"}],"wp:attachment":[{"href":"https:\/\/pctk.jhu.edu\/index.php\/wp-json\/wp\/v2\/media?parent=122"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pctk.jhu.edu\/index.php\/wp-json\/wp\/v2\/categories?post=122"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pctk.jhu.edu\/index.php\/wp-json\/wp\/v2\/tags?post=122"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}