-
Notifications
You must be signed in to change notification settings - Fork 1
/
fitting_them.pro
46 lines (38 loc) · 1.27 KB
/
fitting_them.pro
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
FUNCTION fitting_them,fit_flag,damped=damped,tdp=tdp
COMMON located_dat, located, nx, nt
COMMON threads_dat, threads
COMMON extended_dat, threads_fit_fg
IF fit_flag EQ 0 THEN BEGIN
ENDIF ELSE BEGIN
s=''
CASE fit_flag OF
1:s='NOW FITTING POSITION VARIATIONS'
2:s='NOW FITTING INTENSITY VARIATIONS'
3:s='NOW FITTING WIDTH VARIATIONS'
4: ;Something to do with doppler data
ELSE:res=0
ENDCASE
print,'##################################'
print,s
print,'##################################'
IF NOT keyword_set(damped) THEN BEGIN
moscill,fit_flag=fit_flag
ENDIF ELSE BEGIN
IF NOT keyword_set(tdp) THEN BEGIN
moscill,fit_flag=fit_flag,/damped
ENDIF ELSE BEGIN
moscill,fit_flag=fit_flag,/damped,/tdp
ENDELSE
ENDELSE
CASE fit_flag OF
1:res=where(threads_fit_fg[*].fit_result_pos[1] ne 0)
2:res=where(threads_fit_fg[*].fit_result_inten[1] ne 0)
3:res=where(threads_fit_fg[*].fit_result_wid[1] ne 0)
4: ;Something to do with doppler data
ELSE:res=0
ENDCASE
nfits=n_elements(res)
print,'No. fits saved',nfits-1
ENDELSE
return,nfits
END