Skip to content

Commit

Permalink
multi debug
Browse files Browse the repository at this point in the history
  • Loading branch information
jradavenport committed Feb 23, 2016
1 parent 773e807 commit 226e5b8
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 13 deletions.
14 changes: 10 additions & 4 deletions fbeye/fbeye.pro
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ device, retain = 2
device, true_color = 2
device, decomposed = 0

VERSION = 'v1.3.10'
VERSION = 'v1.3.11'
if not keyword_set(silent) then $
print," You are currently running FBEYE "+VERSION

Expand Down Expand Up @@ -189,8 +189,9 @@ if already_done eq 0 then begin
s2n = fltarr(n_elements(fevent))
quies = fltarr(n_elements(fevent))

cksum = 123
save, fevent,fstartpos,fstoppos,tpeak,tstart,tstop,trise,tdecay, $
lpeak,ed,cplx_flg,mltpk_flg,mltpk_num,tmltpk,lmltpk,multpos,s2n, $
lpeak,ed,cplx_flg,mltpk_flg,mltpk_num,tmltpk,lmltpk,multpos,s2n,cksum, $
quies,filename=lightcurve+'.out'

; spawn,'chmod 777 '+lightcurve+'.out'
Expand Down Expand Up @@ -557,7 +558,11 @@ if btn eq 99 then begin
dtlast = dt
; FBEYE_MSG,'Quit Selected. Have a nice day.'
task = 1 ;this is how to quit
save,fevent,fstartpos,fstoppos,tpeak,tstart,tstop,trise,tdecay,lpeak,ed,cplx_flg,mltpk_flg,mltpk_num,tmltpk,lmltpk,multpos,tlastviewed,dtlast,s2n,quies,filename=lightcurve+'.out'
cksum = 995
save, fevent, fstartpos, fstoppos, tpeak, tstart, tstop, trise, tdecay, $
lpeak, ed, cplx_flg, mltpk_flg, mltpk_num, tmltpk, lmltpk, multpos, $
tlastviewed, dtlast, s2n, quies, cksum, $
filename=lightcurve+'.out'
;; save,fevent,fstartpos,fstoppos,tpeak,tstart,tstop,trise,tdecay,lpeak,ed,cplx_flg,mltpk_flg,mltpk_num,tmltpk,lmltpk,multpos,tlastviewed,dtlast,filename=lightcurve+'.sav'

;; spawn,'chmod 777 '+lightcurve+'.out'
Expand Down Expand Up @@ -891,8 +896,9 @@ if xx0[0] gt -1 then begin
cplx_flg[n],mltpk_flg[n],mltpk_num[n],$
tmltpk[n],lmltpk[n],multpos[n],quies[n],$
f='(i,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f," ;")'
close,4
endif
close,4

;print,'> OUTPUT being saved to local text file'
;; spawn,'chmod 777 '+lightcurve+'.fbeye'
FILE_CHMOD,lightcurve+'.fbeye', '777'o
Expand Down
2 changes: 1 addition & 1 deletion fbeye/fbeye_addflare.pro
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pro FBEYE_ADDFLARE,time,flux,flux_sm,f0,f1,$
lpeak,ed,cplx_flg,mltpk_flg,mltpk_num,$
tmltpk,lmltpk,multpos,s2n,quies,$
filename=filename,noauto=noauto

compile_opt defint32, strictarr, strictarrsubs
compile_opt HIDDEN

Expand Down
10 changes: 6 additions & 4 deletions fbeye/fbeye_apimport.pro
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,9 @@ if FILE_TEST(flare_file) eq 1 then begin
FWHM, duration, t_peak_aflare1, t_FWHM_aflare1, amplitude_aflare1, $
flare_chisq, KS_d_model, KS_p_model, KS_d_cont, KS_p_cont, ed

; create flare event ID's. Events with ID=0 are ignored, so start at 1
fevent = findgen(n_elements(tstart)) + 1
; create flare event ID's. Events with ID=0 are ignored, so put an extra
; event w/ ID=0 up front so arrays are always full
fevent = findgen(n_elements(tstart) + 1)
endif else begin
print,'>> No .flare file found, creating a blank .out file.'

Expand All @@ -72,7 +73,7 @@ endif else begin
tpeak = [-1]

; make a flare event to be ignored
fevent = [-1]
fevent = [0]
endelse

trise = tpeak - tstart
Expand All @@ -96,12 +97,13 @@ dtlast = -9d9


outfilename = lightcurve + ".out"
cksum = 0

; make a save file
save,fevent,fstartpos,fstoppos,$
tpeak,tstart,tstop,trise,tdecay,lpeak,ed,$
cplx_flg,mltpk_flg,mltpk_num,tmltpk,lmltpk,multpos,$
s2n,quies,tlastviewed,dtlast,$
s2n,quies,tlastviewed,dtlast,cksum,$
filename=outfilename

print, '>> Generating file '+outfilename
Expand Down
8 changes: 4 additions & 4 deletions fbeye/fbeye_recalc.pro
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ print,'> Using previous flare t_start and t_stop from '+outfilename
restore, outfilename

print,'> Recalculating properties for ', $
strtrim(string(n_elements(where(fevent gt 0))),2),' flare events...'
strtrim(string(total(fevent gt 0),f='(I)'),2),' valid flare events...'

nflare = n_elements(tstart)

Expand All @@ -22,7 +22,7 @@ s2n = fltarr(nflare)
quies = fltarr(nflare)

FOR n=0L,nflare-1 DO BEGIN
if fevent[n] gt 0 then continue
if fevent[n] le 0 then continue

fstarttmp = where(abs(time-tstart[n[0]]) eq $
min(abs(time-tstart[n[0]])))
Expand All @@ -48,11 +48,11 @@ FOR n=0L,nflare-1 DO BEGIN

ENDFOR


cksum = 0
; dont save tlastviewed or dtlast
save,fevent,fstartpos,fstoppos,$
tpeak,tstart,tstop,trise,tdecay,lpeak,ed,$
cplx_flg,mltpk_flg,mltpk_num,tmltpk,lmltpk,multpos,s2n,quies,$
cplx_flg,mltpk_flg,mltpk_num,tmltpk,lmltpk,multpos,s2n,quies,cksum,$
filename=outfilename


Expand Down

0 comments on commit 226e5b8

Please sign in to comment.