FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Merge pull request #36 from fariza/plots-for-report · fariza/matplotlib@7c7ec5b · GitHub

Repository navigation

Commit 7c7ec5b

Browse files
committed
Merge pull request matplotlib#36 from fariza/plots-for-report
modification to conform to document plots
2 parents 5c4edaa + 738401e commit 7c7ec5b

1 file changed

Lines changed: 36 additions & 5 deletions

File tree

‎emva1288/plotting.py‎

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ def plot(self, test):
309309
self.set_legend(ax)
310310

311311

312-
class PlotHorizontalSpectogramPRNU(Emva1288Plot):
312+
class PlotHorizontalSpectrogramPRNU(Emva1288Plot):
313313
'''Create Horizontal spectrogram PRNU plot'''
314314

315315
name = 'Horizontal spectrogram PRNU'
@@ -321,17 +321,25 @@ def plot(self, test):
321321
ax = self.ax
322322

323323
# 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])
325326

326327
ax.plot(routines.GetFrecs(spectrogram[:(np.shape(spectrogram)[0] //
327328
2)]),
328329
(np.sqrt(spectrogram[:(np.shape(spectrogram)[0] // 2)])),
329330
label='Data',
330331
gid='%d:data' % test.id)
331332

333+
ax.axhline(test.PRNU1288,
334+
label='$PRNU_{1288}$',
335+
linestyle='--',
336+
color='r',
337+
gid='%d:marker' % test.id)
338+
332339
ax.axhline(np.sqrt(test.sigma_2_y_stack),
333340
label='$\sigma^2_{y.stack}$',
334341
linestyle='--',
342+
color='g',
335343
gid='%d:marker' % test.id)
336344

337345
# TODO: Standard EMVA3 asks to print on graph s_w and F.
@@ -359,6 +367,13 @@ def plot(self, test):
359367
ax.axhline(np.sqrt(test.sigma_2_y_stack_dark),
360368
label='$\sigma^2_{y.stack.dark}$',
361369
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',
362377
gid='%d:marker' % test.id)
363378

364379
self.set_legend(ax)
@@ -375,17 +390,26 @@ class PlotVerticalSpectrogramPRNU(Emva1288Plot):
375390
def plot(self, test):
376391
ax = self.ax
377392

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)
379396

380397
ax.plot((routines.GetFrecs(spectrogram[:(np.shape(spectrogram)[0] //
381398
2)])),
382399
(np.sqrt(spectrogram[:(np.shape(spectrogram)[0] // 2)])),
383400
label='Data',
384401
gid='%d:data' % test.id)
385402

403+
ax.axhline(test.PRNU1288,
404+
label='$PRNU_{1288}$',
405+
linestyle='--',
406+
color='r',
407+
gid='%d:marker' % test.id)
408+
386409
ax.axhline(np.sqrt(test.sigma_2_y_stack),
387410
label='$\sigma^2_{y.stack}$',
388411
linestyle='--',
412+
color='g',
389413
gid='%d:marker' % test.id)
390414

391415
self.set_legend(ax)
@@ -410,9 +434,16 @@ def plot(self, test):
410434
label='Data',
411435
gid='%d:data' % test.id)
412436

437+
ax.axhline(test.DSNU1288_DN(),
438+
label='$DSNU_{1288.DN}$',
439+
linestyle='--',
440+
color='r',
441+
gid='%d:marker' % test.id)
442+
413443
ax.axhline(np.sqrt(test.sigma_2_y_stack_dark),
414444
label='$\sigma^2_{y.stack.dark}$',
415445
linestyle='--',
446+
color='g',
416447
gid='%d:marker' % test.id)
417448

418449
self.set_legend(ax)
@@ -590,7 +621,7 @@ def plot(self, test):
590621
ax = self.ax
591622
ax2 = self.ax2
592623

593-
bimg = test.spatial['avg'][0]
624+
bimg = test.spatial['avg'][0] - test.spatial['avg_dark'][0]
594625
dimg = test.spatial['avg_dark'][0]
595626
profiles = self.get_profiles(bimg, dimg, False)
596627

@@ -714,7 +745,7 @@ def plot(self, test):
714745
PlotUyDark,
715746
PlotLinearity,
716747
PlotDeviationLinearity,
717-
PlotHorizontalSpectogramPRNU,
748+
PlotHorizontalSpectrogramPRNU,
718749
PlotHorizontalSpectrogramDSNU,
719750
PlotVerticalSpectrogramPRNU,
720751
PlotVerticalSpectrogramDSNU,

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL