Skip to content

Commit 67c120b

Browse files
authored
Merge pull request #35 from bmaranville/patch-1
Bug in logic for 2d Gaussian
2 parents 212c1a7 + c3e9a6b commit 67c120b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ipython/FittingData.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -368,9 +368,9 @@
368368
" x = (X*data).sum()/total\n",
369369
" y = (Y*data).sum()/total\n",
370370
" col = data[:, int(y)]\n",
371-
" width_x = np.sqrt(np.abs((np.arange(col.size)-y)**2*col).sum()/col.sum())\n",
371+
" width_x = np.sqrt(np.abs((np.arange(col.size)-x)**2*col).sum()/col.sum())\n",
372372
" row = data[int(x), :]\n",
373-
" width_y = np.sqrt(np.abs((np.arange(row.size)-x)**2*row).sum()/row.sum())\n",
373+
" width_y = np.sqrt(np.abs((np.arange(row.size)-y)**2*row).sum()/row.sum())\n",
374374
" height = data.max()\n",
375375
" return height, x, y, width_x, width_y\n",
376376
"\n",

0 commit comments

Comments
 (0)