- Timestamp:
- 06/29/09 15:56:48 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/lagflagger.py
r1578 r1583 43 43 self.figure.show() 44 44 raw_input("Press any key to continue...") 45 print "Now select a start and end point by clicking on the middle plot" 46 print 45 47 flagstart = int(ginput(show_clicks=False)[0][0]+0.5) 46 48 flagend = int(ginput(show_clicks=False)[0][0]+0.5) 47 49 xfft = range(len(yfft)) 48 50 self.fftaxes.axvspan(flagstart, flagend, alpha=0.3) 49 self.fftaxes.axvspan(xfft[-flagend], xfft[-flagstart], alpha=0.3)50 51 yfft[flagstart:flagend] = 0+0j 51 52 yfft[-flagend:-flagstart] = 0+0j … … 53 54 self.resultaxes.plot(x, yi) 54 55 self.figure.show() 55 approve=raw_input("Commit flags y/n ? ")56 if approve in ["y", "Y"]:56 inp = raw_input("Commit flags (c), keep (k) or ignore(i)? ").lower() 57 if inp.startswith("c") 57 58 self.flags.append([flagstart, flagend]) 58 59 self._scan.set_spectrum(yi.real, i) 60 elif inp.startswith("k"): 61 self.flags.append([flagstart, flagend]) 59 62 else: 60 63 del self.fftaxes.patches[-1]
Note:
See TracChangeset
for help on using the changeset viewer.