VERY quick start: if not yet compiled: [qatscpp]$ make [qatscpp]$ idl IDL> .com searchQATS IDL> restore, 'koi806data.sav' IDL> searchQats,x,sigma=robust_sigma(f),pmin=250,pmax=22000,fraction=[0.025],q0=1.08d0,ql=0.75,qr=1.25,deltabg=[2],threshold=7.1d0,output='KOI806test',header=['KOI-806 test'],tstart=min(time),dt=0.0204335d0,maxDetect=6 ------------ QUICK NOTES ON QATS ROUTINES IN C++ AND IDL HELPER FUNCTIONS (JOSH CARTER 2012) Setup the data to be searched: If flux (detrended, normalized by median) is in vector "flux" and the cadence numbers for those flux measurements are in vector "cadn" then you can quickly setup the input to QATS in IDL: IDL> c = lindgen(max(cadn)-min(cadn)) ; list of all cadences IDL> x = replicate(0d0,n_elements(c)) ; fill sequence with zeroes IDL> x(cadn-min(cadn)) = flux-1 ; fill in observed cadences where x is the final sequence to be searched. Missing cadences are now zero and no cadences are skipped! SEARCH!: Example for typical data through Q11 search using the command line: ./qats data.bin 47315 250 22000 0.020000 1.080000 0.7500000 1.500000 1 > result data.bin holds x (via a write command from IDL, for example) There are 47315 values in data.bin. This means we are covering 47315 29.4 minute cadences in Kepler LC or about 966 days. PMin = 1000 cadences (or about 20 days) PMax = 22000 cadences (or about 450 days) The interval is allowed to vary by 2% of the "period." More specifically, if Delta_min and Delta_max are the minimum and maximum intervals then: Delta_max-Delta_min = (0.02)*Delta_min q0 = 1.08 cadences fqL = 0.75 fqR = 1.5 and the duration is searched through: q in q0*((TMax+TMin)/2)^(1/3)*[fqL, fqR] following Keplerian scaling. "result" will have 5 columns Delta_min, Delta_max, S (total transit S/N times sigma), q best (duration), M best (number of transits in sequence) Delta_min, Delta_max, or (Delta_min+Delta_max)/2 or similar can be regarded as the "period" searched. - OR - You can call the helper IDL routine to handle the writing of the binary file and reading the result into IDL variables: IDL> QATS,x,250,22000,0.02d0,1.08d0,0.75,1.5,S=S,M=M,tmin=tmin,tmax=tmax,q=q Plot up the spectrum! IDL> plot,tmin,S,/Ynozero,/xlog Now you can pick out the peak of that spectrum and its corresponding Delta_min, Delta_max, q, and M. Now, use these values to return the o ptimal times: From the command line: ./run_opttimes tempQats.bin 47315 16 2881 2954 11 > indices where: ./run_opttimes data.bin 47315 [M best] [Delta_min] [Delta_max] [q best] indices holds the indices in x where the box pulse starts! - OR - Use the IDL helper routine: IDL> dummy = max(S,j) j now holds the index where S is maxed out! Call timesQATS (really quick) IDL> indices=timesQATS(x,tmin(j),tmax(j),m(j),q(j)) IDL> print,indices 2594 5495 8448 11400 14352 17304 20257 23209 26161 29110 32064 35016 37969 40920 43873 46826 AND lastly\'85 the searchQATS.pro report program Given a data sequence (zero mean, as used above) call: searchQATS,seq,sigma = sigma,pmin = pmin,pmax = pmax,fraction = fraction,q0 = q0,ql = ql,qr = qr, deltabg = deltabg, threshold = threshold,output = output, header = header, tstart = tstart, dt = dt, maxDetect= maxDetect to produce a river plot report that detects multiple planets\'85 sigma = estimate of per point scatter of the flux pmin - as above pmax - as above fraction = vector of fractions (as above) to search through. All detections at one fraction are exhausted (according the metric below) bef ore moving to the next one q0 - as above ql - as above qr - as above deltabg = vector (same size as fraction) that gives the difference in total S/N of a detection relative to the background. One deltabg per fraction threshold = S/N of a detection. This condition must be met. Also must be above the background by deltabg. output = root name of file to save result (and eps figure and a text value with returned times). header = vector of strings (up to three) that are printed on the report (top of eps figure and in text file) tstart = time of first cadence in sequence (to produce absolute time results in the reports) dt = interval between cadences in absolute time maxDetect = maximum detections before the algorithm quits. It will quit if no detections are made. If you run on our example IDL> searchQats,x,sigma=robust_sigma(f),pmin=250,pmax=22000,fraction=[0.025],q0=1.08d0,ql=0.75,qr=1.25,deltabg=[2],threshold=7.1d0,output=' KOI806test',header=['KOI-806 test'],tstart=min(time),dt=0.0204335d0,maxDetect=6 You will see\'85 fractional width =2.500000% searching... 1 : T_0 = 55005.860936 d ; P = 60.299199 d ; S/N =333.596503 ; Delta BG = 257.574508 fractional width =2.500000% searching... 2 : T_0 = 54976.265877 d ; P = 143.205461 d ; S/N =121.693036 ; Delta BG = 85.106748 fractional width =2.500000% searching... 3 : T_0 = 54971.706425 d ; P = 29.378125 d ; S/N =43.290925 ; Delta BG = 23.406206 fractional width =2.500000% searching... 4 : T_0 = 54957.112506 d ; P = 27.801510 d ; S/N =18.813096 ; Delta BG = 2.109294 fractional width =2.500000% searching... Finished normally and the attached reports will pop out!