Changeset 1583


Ignore:
Timestamp:
06/29/09 15:56:48 (16 years ago)
Author:
Malte Marquarding
Message:

Some instructions via print, change behaviour to also just keep flags without appplting them to the data

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/python/lagflagger.py

    r1578 r1583  
    4343            self.figure.show()
    4444            raw_input("Press any key to continue...")
     45            print "Now select a start and end point by clicking on the middle plot"
     46            print
    4547            flagstart = int(ginput(show_clicks=False)[0][0]+0.5)
    4648            flagend = int(ginput(show_clicks=False)[0][0]+0.5)
    4749            xfft = range(len(yfft))
    4850            self.fftaxes.axvspan(flagstart, flagend, alpha=0.3)
    49             self.fftaxes.axvspan(xfft[-flagend], xfft[-flagstart], alpha=0.3)
    5051            yfft[flagstart:flagend] = 0+0j
    5152            yfft[-flagend:-flagstart] = 0+0j
     
    5354            self.resultaxes.plot(x, yi)
    5455            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")
    5758                self.flags.append([flagstart, flagend])
    5859                self._scan.set_spectrum(yi.real, i)
     60            elif inp.startswith("k"):
     61                self.flags.append([flagstart, flagend])
    5962            else:
    6063                del self.fftaxes.patches[-1]
Note: See TracChangeset for help on using the changeset viewer.