forked from sreejithpa/DeltaDet
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathartrk_mkmov.pro
136 lines (125 loc) · 4.17 KB
/
artrk_mkmov.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
; IDL procedure by Sreejith
; Start : 11 Oct 2013 00:44
; Last Mod : 15 Oct 2014 21:24
;------------------- Details of the program --------------------------;
PRO artrk_mkmov,strar,movdir,hor=hor,plotmap=plotmap,yr=yr
;+
; NAME:
; Function
;
; PURPOSE:
; This function writes
;
; CALLING SEQUENCE:
; Function, input,output
device,decomposed=0.
tvlct,250,0,0,10
tvlct,0,220,0,20
tvlct,0,0,255,30
tvlct,150,0,255,40
tvlct,0,150,255,50
tvlct,50,90,255,60
tvlct,255,255,255,1
tvlct,200,200,200,2
ss=size(strar,/dim)
ss1=size(strar.cmap.data,/dim)
dirname=movdir
spawn,'mkdir -p '+dirname
for ii=0,ss[0]-1 do begin
;for ii=206,206 do begin
fname = strcompress(dirname+"/"+string(ii,FORMAT='(I05)')+".eps",$
/remove_all)
xl=ss1[0] & yl=ss1[1]
if keyword_set(hor) then xl=2.*xl else yl=2.*yl
set_plot,'x'
set_plot,'ps'
device,bits_per_pixel = 8,/portrait,filename = fname,/color,encapsulated=0,$
YSIZE=yl/15.,xsize=xl/15.
device,decomposed=0.
!p.charthick = 2.5
!p.charsize = 2.0
if keyword_set(hor) then !p.multi=[0,2,1] else !p.multi=[0,1,2]
loadct,0
plot_map,strar[ii].cmap,dmin=75000,dmax=20000;,yrange=[-400,-250]
tvlct,250,0,0,10
tvlct,0,220,0,20
tvlct,0,0,255,30
tvlct,255,0,255,40
if strar[ii].ndelta ne 0 then begin
for jj=0,strar[ii].ndelta-1 do begin
cumap=strar[ii].dltmap
cumap.data=cumap.data*0b
circu=cir_mask(cumap.data,strar[ii].dltcenpx[0,jj],strar[ii].dltcenpx[1,jj],70)
cumap.data(circu)=byte(1)
plot_map,cumap,/over,/cont,c_level=[1],c_color=[40],c_thick=3.5
endfor
; plot_map,strar[ii].mskmap,/over,/cont,levels=[60,150],c_color=[30,20],c_thick=7.0,max_val=160
; plot_map,strar[ii].mskmap,/over,/cont,levels=[byte(60),byte(200)],c_color=[30,10],c_thick=7.0
plot_map,strar[ii].dltmap,/over,/cont,levels=[126,127,128,129,130],c_color=[30,30,30,10,10],c_thick=3.0
endif
loadct,0
plot_map,strar[ii].mmap,dmin=-1000,dmax=1000;,yrange=[-150,-300]
tvlct,250,0,0,10
tvlct,0,220,0,20
tvlct,0,0,255,30
tvlct,255,0,255,40
tmpmap=strar[ii].cmap
if strar[ii].ndelta ne 0 then begin
for jj=0,strar[ii].ndelta-1 do begin
cumap=strar[ii].dltmap
cumap.data=cumap.data*0b
circu=cir_mask(cumap.data,strar[ii].dltcenpx[0,jj],strar[ii].dltcenpx[1,jj],70)
cumap.data(circu)=byte(1)
tmpmap.data=cumap.data*0.
tmpmap.data=strar[ii].mskmap.data*cumap.data
plot_map,tmpmap,/over,/cont,c_color=[20],c_thick=2.0
plot_map,cumap,/over,/cont,c_level=[1],c_color=[40],c_thick=5.5
endfor
;plot_map,strar[ii].mskmap,/over,/cont,levels=[60,150],c_color=[30,20],c_thick=7.0,max_val=160
;plot_map,strar[ii].mskmap,/over,/cont,levels=[byte(60),byte(200)],c_color=[30,10],c_thick=7.0
plot_map,strar[ii].dltmap,/over,/cont,levels=[126,127,128,129,130],c_color=[30,30,30,10,10],c_thick=4.0
endif
loadct,0
device,/close
set_plot,'x'
if (keyword_set(plotmap)) then begin
loadct,0
plot_map,strar[ii].cmap
tvlct,250,0,0,10
tvlct,0,220,0,20
tvlct,0,0,255,30
if strar[ii].ndelta ne 0 then begin
for jj=0,strar[ii].ndelta-1 do begin
cumap=strar[ii].dltmap
cumap.data=cumap.data*0b
circu=cir_mask(cumap.data,strar[ii].dltcenpx[0,jj],strar[ii].dltcenpx[1,jj],70)
cumap.data(circu)=byte(1)
plot_map,cumap,/over,/cont,c_level=[1],c_color=[20],c_thick=2.5
endfor
plot_map,strar[ii].dltmap,/over,/cont,levels=[126,127,128,129,130],c_color=[30,30,30,10,10],c_thick=1.5
endif
loadct,0
plot_map,strar[ii].mmap,dmin=-1000,dmax=1000
tvlct,250,0,0,10
tvlct,0,220,0,20
tvlct,0,0,255,30
tvlct,255,0,255,40
if strar[ii].ndelta ne 0 then begin
for jj=0,strar[ii].ndelta-1 do begin
cumap=strar[ii].dltmap
cumap.data=cumap.data*0b
circu=cir_mask(cumap.data,strar[ii].dltcenpx[0,jj],strar[ii].dltcenpx[1,jj],70)
cumap.data(circu)=byte(1)
tmpmap.data=cumap.data*0.
tmpmap.data=strar[ii].mskmap.data*cumap.data
plot_map,tmpmap,/over,/cont,levels=[0,1],c_color=[20],c_thick=2.0
plot_map,cumap,/over,/cont,c_level=[1],c_color=[40],c_thick=2.5
endfor
plot_map,strar[ii].dltmap,/over,/cont,levels=[126,127,128,129,130],c_color=[30,30,30,10,10],c_thick=1.5
wait,1
endif
loadct,0
endif
!p.multi=0.
endfor
END