| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -309,7 +309,7 @@ def plot(self, test): | |||
| 309 | 309 | self.set_legend(ax) | |
| 310 | 310 | ||
| 311 | 311 | ||
| 312 | - class PlotHorizontalSpectogramPRNU(Emva1288Plot): | ||
| 312 | + class PlotHorizontalSpectrogramPRNU(Emva1288Plot): | ||
| 313 | 313 | '''Create Horizontal spectrogram PRNU plot''' | |
| 314 | 314 | ||
| 315 | 315 | name = 'Horizontal spectrogram PRNU' | |
@@ -321,17 +321,25 @@ def plot(self, test): | |||
| 321 | 321 | ax = self.ax | |
| 322 | 322 | ||
| 323 | 323 | # In Release 3.2, there is no subtraction of the residue. | |
| 324 | - spectrogram = routines.FFT1288(test.spatial['avg'][0]) | ||
| 324 | + spectrogram = routines.FFT1288(test.spatial['avg'][0] - | ||
| 325 | + test.spatial['avg_dark'][0]) | ||
| 325 | 326 | ||
| 326 | 327 | ax.plot(routines.GetFrecs(spectrogram[:(np.shape(spectrogram)[0] // | |
| 327 | 328 | 2)]), | |
| 328 | 329 | (np.sqrt(spectrogram[:(np.shape(spectrogram)[0] // 2)])), | |
| 329 | 330 | label='Data', | |
| 330 | 331 | gid='%d:data' % test.id) | |
| 331 | 332 | ||
| 333 | + ax.axhline(test.PRNU1288, | ||
| 334 | + label='$PRNU_{1288}$', | ||
| 335 | + linestyle='--', | ||
| 336 | + color='r', | ||
| 337 | + gid='%d:marker' % test.id) | ||
| 338 | + | ||
| 332 | 339 | ax.axhline(np.sqrt(test.sigma_2_y_stack), | |
| 333 | 340 | label='$\sigma^2_{y.stack}$', | |
| 334 | 341 | linestyle='--', | |
| 342 | + color='g', | ||
| 335 | 343 | gid='%d:marker' % test.id) | |
| 336 | 344 | ||
| 337 | 345 | # TODO: Standard EMVA3 asks to print on graph s_w and F. | |
@@ -359,6 +367,13 @@ def plot(self, test): | |||
| 359 | 367 | ax.axhline(np.sqrt(test.sigma_2_y_stack_dark), | |
| 360 | 368 | label='$\sigma^2_{y.stack.dark}$', | |
| 361 | 369 | linestyle='--', | |
| 370 | + color='g', | ||
| 371 | + gid='%d:marker' % test.id) | ||
| 372 | + | ||
| 373 | + ax.axhline(test.DSNU1288_DN(), | ||
| 374 | + label='$DSNU_{1288.DN}$', | ||
| 375 | + linestyle='--', | ||
| 376 | + color='r', | ||
| 362 | 377 | gid='%d:marker' % test.id) | |
| 363 | 378 | ||
| 364 | 379 | self.set_legend(ax) | |
@@ -375,17 +390,26 @@ class PlotVerticalSpectrogramPRNU(Emva1288Plot): | |||
| 375 | 390 | def plot(self, test): | |
| 376 | 391 | ax = self.ax | |
| 377 | 392 | ||
| 378 | - spectrogram = routines.FFT1288(test.spatial['avg'][0], rotate=True) | ||
| 393 | + spectrogram = routines.FFT1288(test.spatial['avg'][0] - | ||
| 394 | + test.spatial['avg_dark'][0], | ||
| 395 | + rotate=True) | ||
| 379 | 396 | ||
| 380 | 397 | ax.plot((routines.GetFrecs(spectrogram[:(np.shape(spectrogram)[0] // | |
| 381 | 398 | 2)])), | |
| 382 | 399 | (np.sqrt(spectrogram[:(np.shape(spectrogram)[0] // 2)])), | |
| 383 | 400 | label='Data', | |
| 384 | 401 | gid='%d:data' % test.id) | |
| 385 | 402 | ||
| 403 | + ax.axhline(test.PRNU1288, | ||
| 404 | + label='$PRNU_{1288}$', | ||
| 405 | + linestyle='--', | ||
| 406 | + color='r', | ||
| 407 | + gid='%d:marker' % test.id) | ||
| 408 | + | ||
| 386 | 409 | ax.axhline(np.sqrt(test.sigma_2_y_stack), | |
| 387 | 410 | label='$\sigma^2_{y.stack}$', | |
| 388 | 411 | linestyle='--', | |
| 412 | + color='g', | ||
| 389 | 413 | gid='%d:marker' % test.id) | |
| 390 | 414 | ||
| 391 | 415 | self.set_legend(ax) | |
@@ -410,9 +434,16 @@ def plot(self, test): | |||
| 410 | 434 | label='Data', | |
| 411 | 435 | gid='%d:data' % test.id) | |
| 412 | 436 | ||
| 437 | + ax.axhline(test.DSNU1288_DN(), | ||
| 438 | + label='$DSNU_{1288.DN}$', | ||
| 439 | + linestyle='--', | ||
| 440 | + color='r', | ||
| 441 | + gid='%d:marker' % test.id) | ||
| 442 | + | ||
| 413 | 443 | ax.axhline(np.sqrt(test.sigma_2_y_stack_dark), | |
| 414 | 444 | label='$\sigma^2_{y.stack.dark}$', | |
| 415 | 445 | linestyle='--', | |
| 446 | + color='g', | ||
| 416 | 447 | gid='%d:marker' % test.id) | |
| 417 | 448 | ||
| 418 | 449 | self.set_legend(ax) | |
@@ -590,7 +621,7 @@ def plot(self, test): | |||
| 590 | 621 | ax = self.ax | |
| 591 | 622 | ax2 = self.ax2 | |
| 592 | 623 | ||
| 593 | - bimg = test.spatial['avg'][0] | ||
| 624 | + bimg = test.spatial['avg'][0] - test.spatial['avg_dark'][0] | ||
| 594 | 625 | dimg = test.spatial['avg_dark'][0] | |
| 595 | 626 | profiles = self.get_profiles(bimg, dimg, False) | |
| 596 | 627 | ||
@@ -714,7 +745,7 @@ def plot(self, test): | |||
| 714 | 745 | PlotUyDark, | |
| 715 | 746 | PlotLinearity, | |
| 716 | 747 | PlotDeviationLinearity, | |
| 717 | - PlotHorizontalSpectogramPRNU, | ||
| 748 | + PlotHorizontalSpectrogramPRNU, | ||
| 718 | 749 | PlotHorizontalSpectrogramDSNU, | |
| 719 | 750 | PlotVerticalSpectrogramPRNU, | |
| 720 | 751 | PlotVerticalSpectrogramDSNU, | |
| Back | FazBrowse Home | New Git URL |
0 commit comments