Skip to content

Commit

Permalink
Use changeAttr() instead of setAttr(). Add note about varying results.
Browse files Browse the repository at this point in the history
  • Loading branch information
HazenBabcock committed Sep 17, 2018
1 parent 55e4793 commit 7a3c587
Showing 1 changed file with 29 additions and 24 deletions.
53 changes: 29 additions & 24 deletions jupyter_notebooks/smlm_challenge_2013_dao3d_2dfixed.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -82,32 +82,35 @@
"params = parameters.ParametersDAO()\n",
"\n",
"# Analyze the whole movie.\n",
"params.setAttr(\"max_frame\", \"int\", -1) \n",
"params.setAttr(\"start_frame\", \"int\", -1)\n",
"params.changeAttr(\"max_frame\", -1) \n",
"params.changeAttr(\"start_frame\", -1)\n",
"\n",
"params.setAttr(\"background_sigma\", \"float\", 8.0)\n",
"params.changeAttr(\"background_sigma\", 8.0)\n",
"\n",
"# These were specified on the website for this dataset.\n",
"params.setAttr(\"camera_gain\", \"float\", 1.0)\n",
"params.setAttr(\"camera_offset\", \"float\", 100.0)\n",
"params.changeAttr(\"camera_gain\", 1.0)\n",
"params.changeAttr(\"camera_offset\", 100.0)\n",
"\n",
"params.setAttr(\"find_max_radius\", \"int\", 5)\n",
"params.setAttr(\"foreground_sigma\", \"float\", 1.0)\n",
"params.setAttr(\"iterations\", \"int\", 20)\n",
"params.setAttr(\"model\", \"string\", \"2dfixed\")\n",
"params.setAttr(\"pixel_size\", \"float\", 100.0)\n",
"params.setAttr(\"roi_size\", \"int\", 9)\n",
"# Since this parameter can be either a float or an int we need\n",
"# to specify which type we want it to be.\n",
"params.changeAttr(\"find_max_radius\", 5, node_type = \"float\")\n",
"\n",
"params.changeAttr(\"foreground_sigma\", 1.0)\n",
"params.changeAttr(\"iterations\", 20)\n",
"params.changeAttr(\"model\", \"2dfixed\")\n",
"params.changeAttr(\"pixel_size\", 100.0)\n",
"params.changeAttr(\"roi_size\", 9)\n",
"\n",
"# Convert from FWHM in nanometers to sigma in pixels.\n",
"params.setAttr(\"sigma\", \"float\", 258.21/(100.0 * 2.355))\n",
"params.setAttr(\"threshold\", \"float\", 6)\n",
"params.changeAttr(\"sigma\", 258.21/(100.0 * 2.355))\n",
"params.changeAttr(\"threshold\", 6)\n",
"\n",
"# Don't do tracking.\n",
"params.setAttr(\"radius\", \"float\", \"0\")\n",
"params.setAttr(\"descriptor\", \"string\", \"1\")\n",
"params.changeAttr(\"radius\", \"0.0\")\n",
"params.changeAttr(\"descriptor\", \"1\")\n",
"\n",
"# Don't do drift-correction.\n",
"params.setAttr(\"drift_correction\", \"int\", 0)\n",
"params.changeAttr(\"drift_correction\", 0)\n",
"\n",
"params.toXMLFile(\"analysis.xml\", pretty = True)"
]
Expand Down Expand Up @@ -141,28 +144,30 @@
"Reference results:\n",
"\n",
"```\n",
"Added 46444\n",
" 4708 peak finding iterations.\n",
"Added 46437\n",
" 4705 peak finding iterations.\n",
"\n",
" 0 fits reset due to Cholesky failure.\n",
" 14 fits reset due to image margin.\n",
" 677 fits reset due to negative value in fit function.\n",
" 115 fits reset due to negative height.\n",
" 534072 fits reset due to non-decreasing error (LM).\n",
" 110 fits reset due to negative height.\n",
" 533925 fits reset due to non-decreasing error (LM).\n",
" 0 fits did not converge.\n",
" 17 fits were lost.\n",
" 415 peaks lost to proximity filter.\n",
" 244 peaks lost to low significance.\n",
" 6711697 fitting iterations.\n",
" 6706925 fitting iterations.\n",
"\n",
"Tracking.\n",
"\n",
"Checking z values.\n",
"\n",
"Analysis complete\n",
"CPU times: user 55 s, sys: 171 ms, total: 55.1 s\n",
"Wall time: 55 s\n",
"```"
"CPU times: user 55.5 s, sys: 486 ms, total: 56 s\n",
"Wall time: 55.4 s\n",
"```\n",
"\n",
"Results may vary slightly. In particular the FFTW library is not completely deterministic when run with `FFTW_MEASURE`."
]
},
{
Expand Down

0 comments on commit 7a3c587

Please sign in to comment.