-
Notifications
You must be signed in to change notification settings - Fork 2
/
mvn_kp_iuvs_corona.pro
3319 lines (3113 loc) · 133 KB
/
mvn_kp_iuvs_corona.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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
;+
;
; :Name: mvn_kp_iuvs_corona
;
; Copyright 2017 Regents of the University of Colorado. All Rights Reserved.
; Released under the MIT license.
; This software was developed at the University of Colorado's Laboratory for Atmospheric and Space Physics.
; Verify current version before use at: https://lasp.colorado.edu/maven/sdc/public/pages/software.html
; :Author: Kristopher Larsen
;
; :Description:
; This routine plots all the coronal scan data held within the
; IUVS KP structure in a variety of ways.
; By default, calling this routine with just the data structure defined
; will plot ALL the coronal data.
;
; :Params:
; kp_data: in, required, type=structure
; This is the MAVEN IUVS KP data structure. It should contain at least
; some Coronal Scan observations to plot.
; colortable, in, optional, type=integer
; This variable is the integer index of a pre-defined IDL color table.
; By default, the routine will use #39 (Rainbow+White).
;
; :Keywords:
; echelle: in, optional, type=boolean
; Used to plot the Echelle coronal data. Can be used in conjunction
; with /lores, but that is equivalent to using neither.
; lores: in, optional, type=boolean
; Used to plot the LoRes coronal data. Can be used in conjunction
; with /echelle, but that is equivalent to using niether.
; disk: in, optional, type=boolean
; Used to plot all the Disk Coronal data within the structure.
; This keyword may be used in conjunction with /limb and /high, as well
; as /echelle and /lores, to show the desired subset of IUVS data.
; limb: in, optional, type=boolean
; Used to plot all the Limb Coronal Scan data within the input structure.
; This keyword may be used in conjunction with /disk and /high, as well
; as /echelle and /lores, to show the desired subset of IUVS data.
; high: in, optional, type=boolean
; Used to plot all the High Altitude Coronal Scan data within the
; input structure
; This keyword may be used in conjunction with /disk and /limb, as well
; as /echelle and /lores, to show the desired subset of IUVS data.
; range: in, optional, type=boolean
; Used to print the beginning and end times/orbits contained within the
; input data structure.
; Using this keyword will result in no plot.
; nolabels: in, optional, type=boolean
; Used to suppress the labels on each plot.
; nolegend: in, optional, type=boolean
; Used to suppress the additional legend windows created by the routine.
; window: in, optional, type=boolean
; If this keyword is used, the currently displayed idl direct graphic
; plot windows are retained.
; Useful for making multiple plots to compare different coronal scans.
;
; :Version: 1.0 July 8, 2014
;-
pro MVN_KP_IUVS_CORONA, kp_data, echelle=echelle, lores=lores, disk=disk, $
limb=limb, high=high, range=range, $
colortable=colortable, nolabels=nolabels, $
nolegend=nolegend, $
window=window, help=help
;provide help for those who don't have IDLDOC installed
if keyword_set(help) then begin
mvn_kp_get_help,'mvn_kp_iuvs_corona'
return
endif
;CHECK THAT THE INPUT DATA STRUCTURE CONTAINS THE NECESSARY DATA
base_tags = tag_names(kp_data)
error = 0
data_choice = intarr(6)
disp_check = intarr(6)
;CHECK WHICH DATA THE INPUT STRUCTURE CONTAINS
check = where(base_tags eq 'CORONA_E_DISK' and $
kp_data.corona_e_disk.time_start ne '' )
if check ne -1 then data_choice[0] = 1
check = where(base_tags eq 'CORONA_E_LIMB' and $
kp_data.corona_e_limb.time_start ne '')
if check ne -1 then data_choice[1] = 1
check = where(base_tags eq 'CORONA_E_HIGH' and $
kp_data.corona_e_high.time_start ne '')
if check ne -1 then data_choice[2] = 1
check = where(base_tags eq 'CORONA_LO_DISK' and $
kp_data.corona_lo_disk.time_start ne '')
if check ne -1 then data_choice[3] = 1
check = where(base_tags eq 'CORONA_LO_LIMB' and $
kp_data.corona_lo_limb.time_start ne '')
if check ne -1 then data_choice[4] = 1
check = where(base_tags eq 'CORONA_LO_HIGH' and $
kp_data[0].corona_lo_high.time_start ne '')
if check ne -1 then data_choice[5] = 1
print,data_choice
;SET CHOICES BASED ON KEYWORDS
disp_check = data_choice
if (keyword_set(echelle) and keyword_set(lores)) then begin
if keyword_set(disk) or keyword_set(limb) or $
keyword_set(high) then begin
disp_check[0:5] = 0
if keyword_set(disk) then begin
disp_check[0] = 1
disp_check[3] = 1
endif
if keyword_set(limb) then begin
disp_check[1] = 1
disp_check[4] = 1
endif
if keyword_set(high) then begin
disp_check[2] = 1
disp_check[5] = 1
endif
endif
endif else begin
if keyword_set(echelle) then begin
disp_check[3:5] = 0
if keyword_set(disk) or keyword_set(limb) or $
keyword_set(high) then begin
disp_check[0:2] = 0
if keyword_set(disk) then disp_check[0] = 1
if keyword_set(limb) then disp_check[1] = 1
if keyword_set(high) then disp_check[2] = 1
endif
endif
if keyword_set(lores) then begin
disp_check[0:2] = 0
if keyword_set(disk) or keyword_set(limb) or $
keyword_set(high) then begin
disp_check[3:5] = 0
if keyword_set(disk) then disp_check[3] = 1
if keyword_set(limb) then disp_check[4] = 1
if keyword_set(high) then disp_check[5] = 1
endif
endif
endelse
if (keyword_set(echelle) eq 0) and (keyword_set(lores) eq 0) then begin
if keyword_set(disk) or keyword_set(limb) or $
keyword_set(high) then begin
disp_check[0:5] = 0
if keyword_set(disk) then begin
disp_check[0] = 1
disp_check[3] = 1
endif
if keyword_set(limb) then begin
disp_check[1] = 1
disp_check[4] = 1
endif
if keyword_set(high) then begin
disp_check[2] = 1
disp_check[5] = 1
endif
endif
endif
if error eq 1 then begin
print,'The data structure does not include the necessary data. '$
+'Check your structure and try again.'
return
endif
;SET DEFAULT COLORS
device,decompose=0
device,retain=2
!p.background='FFFFFF'x
!p.color=0
if keyword_set(colortable) then begin
loadct,colortable
endif else begin
loadct,39,/silent
endelse
;SET WINDOW NUMBERS
; if keyword_set(window) then begin
; plot_window = !window + 1
; legend_window = plot_window + 1
; endif else begin
; plot_window = 1
; legend_window = 2
; endelse
;CHECK DATE RANGES
if keyword_set(range) then begin
print,'The data structure contains data that spans the time range of ' $
+strtrim(string(kp_data[0].periapse[0].time_start),2)+' to '+$
strtrim(string(kp_data[n_elements(kp_data)-1]$
.periapse[2].time_stop),2)
print,'Equivalently, this includes the orbits of '$
+strtrim(string(kp_data[0].orbit),2)+' to '$
+strtrim(string(kp_data[n_elements(kp_data)-1].orbit),2)
return
endif
;
;INDIVIDUAL PLOT FLAGS
if disp_check[0] eq 1 then begin
e_d_r = 1 ;echelle disk radiacne
endif else begin
e_d_r = 0
endelse
if disp_check[1] eq 1 then begin
e_l_r = 1 ;echelle limb radiance
e_l_h = 1 ;echelle limb half int dist
endif else begin
e_l_r = 0
e_l_h = 0
endelse
if disp_check[2] eq 1 then begin
e_h_r = 1 ;echelle high radiance
e_h_h = 1 ;echelle high half int dist
endif else begin
e_h_r = 0
e_h_h = 0
endelse
if disp_check[3] eq 1 then begin
l_d_r = 1 ;lowres disk radiance
l_d_d = 1 ;lowres disk dust
l_d_a = 1 ;lowres disk aurora
l_d_o = 1 ;lowres disk ozone
endif else begin
l_d_r = 0
l_d_d = 0
l_d_a = 0
l_d_o = 0
endelse
if disp_check[4] eq 1 then begin
l_l_r = 1 ;lowres limb radiance
l_l_d = 1 ;lowres limb density
l_l_s = 1 ;lowres limb scale height
endif else begin
l_l_r = 0
l_l_d = 0
l_l_s = 0
endelse
if disp_check[5] eq 1 then begin
l_h_r = 1 ;lowres high radiance
l_h_d = 1 ;lowres high density
l_h_h = 1 ;lowres high half int dist
endif else begin
l_h_r = 0
l_h_d = 0
l_h_h = 0
endelse
;DETERMINE POSITIONS OF VARIOUS TITLES AND LEGENS
legend_count = 0
if (disp_check[0] eq 1) or (disp_check[1] eq 1) or $
(disp_check[2] eq 1) then begin
e_title_pos = [0.12, 0.97, 0.0]
if e_h_r eq 1 then begin
e_rad_high_title = [0.07, 0.93, 0.0]
legend_count = legend_count+1
endif
if e_h_h eq 1 then begin
e_half_high_title = [0.16, 0.93, 0.0]
legend_count = legend_count+1
endif
if e_l_r eq 1 then begin
e_rad_limb_title = [0.07, 0.55, 0.0]
legend_count = legend_count+1
endif
if e_l_h eq 1 then begin
e_half_limb_title = [0.16, 0.55, 0.0]
legend_count = legend_count+1
endif
if e_d_r eq 1 then begin
e_rad_disk_title = [0.07, 0.15, 0.0]
legend_count = legend_count+1
endif
endif ; disp_check
if (disp_check[3] eq 1) or (disp_check[4] eq 1) or $
(disp_check[5] eq 1) then begin
lo_title_pos = [0.4, 0.97, 0.0]
if l_h_r eq 1 then begin
lo_rad_high_title = [0.27, 0.93, 0.0]
legend_count = legend_count+1
endif
if l_h_d eq 1 then begin
lo_den_high_title = [0.37, 0.93, 0.0]
legend_count = legend_count+1
endif
if l_h_h eq 1 then begin
lo_half_high_title = [0.56, 0.93, 0.0]
legend_count = legend_count+1
endif
if l_l_r eq 1 then begin
lo_rad_limb_title = [0.27, 0.55, 0.0]
legend_count = legend_count+1
endif
if l_d_r eq 1 then begin
lo_rad_disk_title = [0.27, 0.15, 0.0]
legend_count = legend_count+1
endif
if l_l_d eq 1 then begin
lo_den_limb_title = [0.37, 0.55, 0.0]
legend_count = legend_count+1
endif
if l_d_d eq 1 then begin
lo_dust_disk_title = [0.38, 0.15, 0.0]
legend_count = legend_count+1
endif
if l_l_s eq 1 then begin
lo_scale_limb_title = [0.46, 0.55, 0.0]
legend_count = legend_count+1
endif
if l_d_a eq 1 then begin
lo_aurora_disk_title = [0.47, 0.15, 0.0]
legend_count = legend_count+1
endif
if l_d_o eq 1 then begin
lo_ozone_disk_title = [0.58, 0.15, 0.0]
legend_count = legend_count+1
endif
endif
;BUILD THE ARRAY THAT DEFINES HOW MANY PLOTS WILL
;BE DISPLAYED (ie the p.multi array)
rows = 3
columns = 6
order = 1
rad_plot = 0
den_plot = 0
half_plot = 0
scale_plot = 0
!p.multi = [0,columns,rows,0,order]
;EXTRACT THE ECHELLE DATA TO A PLOTTING ARRAY
if disp_check[0] eq 1 then begin ;extract echelle disk data
e_disk_total = 0
for i=0, n_elements(kp_data.corona_e_disk.time_start)-1 do begin
if kp_data[i].corona_e_disk.time_start ne '' then $
e_disk_total = e_disk_total+1
endfor
e_disk_radiance $
= fltarr(e_disk_total,n_elements(kp_data[0].corona_e_disk.radiance_id))
e_disk_radiance_err $
= fltarr(e_disk_total,n_elements(kp_data[0].corona_e_disk.radiance_id))
e_disk_timestamp = lonarr(e_disk_total)
e_disk_labels $
= strarr(e_disk_total,n_elements(kp_data[0].corona_e_disk.radiance_id))
e_disk_total=0
for i=0,n_elements(kp_data.corona_e_disk.time_start)-1 do begin
if kp_data[i].corona_e_disk.time_start ne '' then begin
e_disk_radiance[e_disk_total,*] = kp_data[i].corona_e_disk.radiance[*]
e_disk_radiance_err[e_disk_total,*] $
= kp_data[i].corona_e_disk.radiance_err[*]
e_disk_timestamp[e_disk_total] $
= time_double(kp_data[i].corona_e_disk.time_start, $
tformat="YYYY-MM-DDThh:mm:ss")
e_disk_labels[e_disk_total,*] $
= kp_data[i].corona_e_disk.radiance_id[*]
e_disk_total = e_disk_total+1
endif
endfor
endif
if disp_check[1] eq 1 then begin ;extract echelle limb data
e_limb_total = 0
for i=0, n_elements(kp_data.corona_e_limb.time_start)-1 do begin
if kp_data[i].corona_e_limb.time_start ne '' then $
e_limb_total = e_limb_total+1
endfor
; ToDo: What is the deal with the 31's?
;-km These are hard-wired numbers of altitudes and are now incorrect
e_limb_radiance $
= fltarr(e_limb_total, $
n_elements(kp_data[0].corona_e_limb.radiance_id), $
31)
e_limb_radiance_err $
= fltarr(e_limb_total, $
n_elements(kp_data[0].corona_e_limb.radiance_id), $
31)
e_limb_rad_labels $
= strarr(e_limb_total, $
n_elements(kp_data[0].corona_e_limb.radiance_id))
e_limb_rad_alt = fltarr(e_limb_total,31)
e_limb_half $
= fltarr(e_limb_total, $
n_elements(kp_data[0].corona_e_limb.half_int_distance_id))
e_limb_half_err $
= fltarr(e_limb_total, $
n_elements(kp_data[0].corona_e_limb.half_int_distance_id))
e_limb_half_labels $
= strarr(e_limb_total, $
n_elements(kp_data[0].corona_e_limb.half_int_distance_id))
e_limb_timestamp = lonarr(e_limb_total)
e_limb_total = 0
for i=0,n_elements(kp_data.corona_e_limb.time_start)-1 do begin
if kp_data[i].corona_e_limb.time_start ne '' then begin
e_limb_radiance[e_limb_total,*,*] $
= kp_data[i].corona_e_limb.radiance
e_limb_radiance_err[e_limb_total,*,*] $
= kp_data[i].corona_e_limb.radiance_err
e_limb_rad_labels[e_limb_total,*] $
= kp_data[i].corona_e_limb.radiance_id
e_limb_rad_alt[e_limb_total,*] $
= kp_data[i].corona_e_limb.alt
e_limb_half[e_limb_total,*] $
= kp_data[i].corona_e_limb.half_int_distance
e_limb_half_err[e_limb_total,*] $
= kp_data[i].corona_e_limb.half_int_distance_err
e_limb_half_labels[e_limb_total,*] $
= kp_data[i].corona_e_limb.half_int_distance_id
e_limb_timestamp $
= time_double(kp_data[i].corona_e_limb.time_start, $
tformat="YYYY-MM-DDThh:mm:ss")
e_limb_total = e_limb_total + 1
endif
endfor
endif
if disp_check[2] eq 1 then begin ;extract echelle high altitude data
e_high_total = 0
for i=0, n_elements(kp_data.corona_e_high.time_start)-1 do begin
if kp_data[i].corona_e_high.time_start ne '' then $
e_high_total = e_high_total+1
endfor
; ToDo: What is the deal with the 77's?
;-km These are hard-wired numbers of altitudes and are now incorrect
e_high_radiance $
= fltarr(e_high_total,$
n_elements(kp_data[0].corona_e_high.radiance_id), $
77)
e_high_radiance_err $
= fltarr(e_high_total, $
n_elements(kp_data[0].corona_e_high.radiance_id), $
77)
e_high_rad_labels $
= strarr(e_high_total, $
n_elements(kp_data[0].corona_e_high.radiance_id))
e_high_rad_alt = fltarr(e_high_total,77)
e_high_half $
= fltarr(e_high_total, $
n_elements(kp_data[0].corona_e_high.half_int_distance_id))
e_high_half_err $
= fltarr(e_high_total, $
n_elements(kp_data[0].corona_e_high.half_int_distance_id))
e_high_half_labels $
= strarr(e_high_total, $
n_elements(kp_data[0].corona_e_high.half_int_distance_id))
e_high_timestamp = lonarr(e_high_total)
e_high_total = 0
for i=0,n_elements(kp_data.corona_e_high.time_start)-1 do begin
if kp_data[i].corona_e_high.time_start ne '' then begin
e_high_radiance[e_high_total,*,*] $
= kp_data[i].corona_e_high.radiance
e_high_radiance_err[e_high_total,*,*] $
= kp_data[i].corona_e_high.radiance_err
e_high_rad_labels[e_high_total,*] $
= kp_data[i].corona_e_high.radiance_id
e_high_rad_alt[e_high_total,*] $
= kp_data[i].corona_e_high.alt
e_high_half[e_high_total,*] $
= kp_data[i].corona_e_high.half_int_distance
e_high_half_err[e_high_total,*] $
= kp_data[i].corona_e_high.half_int_distance_err
e_high_half_labels[e_high_total,*] $
= kp_data[i].corona_e_high.half_int_distance_id
e_high_timestamb $
= time_double(kp_data[i].corona_e_high.time_start)
e_high_total = e_high_total + 1
endif
endfor
endif
;EXTRACT THE LORES DATA TO PLOTTING ARRAYS
if disp_check[3] eq 1 then begin ;extract lores disk data
lo_disk_total = 0
for i=0, n_elements(kp_data.corona_lo_disk.time_start)-1 do begin
if kp_data[i].corona_lo_disk.time_start ne '' then $
lo_disk_total = lo_disk_total+1
endfor
lo_disk_radiance $
= fltarr(lo_disk_total,$
n_elements(kp_data[0].corona_lo_disk.radiance_id))
lo_disk_radiance_err $
= fltarr(lo_disk_total,$
n_elements(kp_data[0].corona_lo_disk.radiance_id))
lo_disk_timestamp = lonarr(lo_disk_total)
lo_disk_labels $
= strarr(lo_disk_total,$
n_elements(kp_data[0].corona_lo_disk.radiance_id))
lo_disk_dust $
= fltarr(lo_disk_total,$
n_elements(kp_data[0].corona_lo_disk.dust_depth))
lo_disk_dust_err $
= fltarr(lo_disk_total,$
n_elements(kp_data[0].corona_lo_disk.dust_depth))
lo_disk_ozone $
= fltarr(lo_disk_total,$
n_elements(kp_data[0].corona_lo_disk.ozone_depth))
lo_disk_ozone_err $
= fltarr(lo_disk_total,$
n_elements(kp_data[0].corona_lo_disk.ozone_depth))
lo_disk_auroral $
= fltarr(lo_disk_total,$
n_elements(kp_data[0].corona_lo_disk.auroral_index))
lo_disk_total=0
for i=0, n_elements(kp_data.corona_lo_disk.time_start)-1 do begin
if kp_data[i].corona_lo_disk.time_start ne '' then begin
lo_disk_radiance[lo_disk_total,*] $
= kp_data[i].corona_lo_disk.radiance
lo_disk_radiance_err[lo_disk_total,*] $
= kp_data[i].corona_lo_disk.radiance_err
lo_disk_labels[lo_disk_total,*] $
= kp_data[i].corona_lo_disk.radiance_id
lo_disk_timestamp[lo_disk_total] $
= time_double(kp_data[i].corona_lo_disk.time_start, $
tformat="YYYY-MM-DDThh:mm:ss")
lo_disk_dust[lo_disk_total,*] $
= kp_data[i].corona_lo_disk.dust_depth
lo_disk_dust_err[lo_disk_total,*] $
= kp_data[i].corona_lo_disk.dust_depth_err
lo_disk_ozone[lo_disk_total,*] $
= kp_data[i].corona_lo_disk.ozone_depth
lo_disk_ozone_err[lo_disk_total,*] $
= kp_data[i].corona_lo_disk.ozone_depth_err
lo_disk_auroral[lo_disk_total,*] $
= kp_data[i].corona_lo_disk.auroral_index
lo_disk_total = lo_disk_total+1
endif
endfor
endif
if disp_check[4] eq 1 then begin ;extract lores limb data
lo_limb_total = 0
for i=0, n_elements(kp_data.corona_lo_limb.time_start)-1 do begin
if kp_data[i].corona_lo_limb.time_start ne '' then $
lo_limb_total = lo_limb_total+1
endfor
lo_limb_radiance $
= fltarr(lo_limb_total,$
n_elements(kp_data[0].corona_lo_limb.radiance_id),$
31)
lo_limb_radiance_err $
= fltarr(lo_limb_total,$
n_elements(kp_data[0].corona_lo_limb.radiance_id),$
31)
lo_limb_rad_labels $
= strarr(lo_limb_total,$
n_elements(kp_data[0].corona_lo_limb.radiance_id))
lo_limb_rad_alt = fltarr(lo_limb_total,31)
lo_limb_density $
= fltarr(lo_limb_total,$
n_elements(kp_data[0].corona_lo_limb.density_id),$
31)
lo_limb_density_err $
= fltarr(lo_limb_total,$
n_elements(kp_data[0].corona_lo_limb.density_id),$
31)
lo_limb_den_labels $
= strarr(lo_limb_total,$
n_elements(kp_data[0].corona_lo_limb.density_id))
lo_limb_scale $
= fltarr(lo_limb_total,$
n_elements(kp_data[0].corona_lo_Limb.scale_height_id))
lo_limb_scale_err $
= fltarr(lo_limb_total,$
n_elements(kp_data[0].corona_lo_Limb.scale_height_id))
lo_limb_scale_labels $
= strarr(lo_limb_total,$
n_elements(kp_data[0].corona_lo_Limb.scale_height_id))
lo_limb_timestamp = lonarr(lo_limb_total)
lo_limb_total = 0
for i=0, n_elements(kp_data.corona_lo_limb.time_start)-1 do begin
if kp_data[i].corona_lo_limb.time_start ne '' then begin
lo_limb_radiance[lo_limb_total,*,*] $
= kp_data[i].corona_lo_limb.radiance
lo_limb_radiance_err[lo_limb_total,*,*] $
= kp_data[i].corona_lo_limb.radiance_err
lo_limb_rad_labels[lo_limb_total,*] $
= kp_data[i].corona_lo_limb.radiance_id
lo_limb_rad_alt[lo_limb_total,*] $
= kp_data[i].corona_lo_limb.alt
lo_limb_density[lo_limb_total,*,*] $
= kp_data[i].corona_lo_limb.density
lo_limb_density_err[lo_limb_total,*,*] $
= kp_data[i].corona_lo_limb.density_err
lo_limb_den_labels[lo_limb_total,*] $
= kp_data[i].corona_lo_limb.density_id
lo_limb_scale[lo_limb_total,*] $
= kp_data[i].corona_lo_limb.scale_height
lo_limb_scale_err[lo_limb_total,*] $
= kp_data[i].corona_lo_limb.scale_height_err
lo_limb_scale_labels[lo_limb_total,*] $
= kp_data[i].corona_lo_limb.scale_height_id
lo_limb_timestamp[lo_limb_total,*] $
= time_double(kp_data[i].corona_lo_limb.time_start, $
tformat="YYYY-MM-DDThh:mm:ss")
lo_limb_total = lo_limb_total + 1
endif
endfor
endif
if disp_check[5] eq 1 then begin ;extranct lores high data
lo_high_total = 0
for i=0, n_elements(kp_data.corona_lo_high.time_start)-1 do begin
if kp_data[i].corona_lo_high.time_start ne '' then $
lo_high_total = lo_high_total+1
endfor
;
; Hack for now to get nalt from *.alt; later, just grab *.nalt
;
nalt = n_elements(kp_data[0].corona_lo_high.alt)
lo_high_radiance $
= fltarr(lo_high_total,$
n_elements(kp_data[0].corona_lo_high.radiance_id),$
nalt)
lo_high_radiance_unc $
= fltarr(lo_high_total,$
n_elements(kp_data[0].corona_lo_high.radiance_id),$
nalt)
lo_high_rad_labels $
= strarr(lo_high_total,$
n_elements(kp_data[0].corona_lo_high.radiance_id))
lo_high_rad_alt = fltarr(lo_high_total,nalt)
lo_high_density $
= fltarr(lo_high_total,$
n_elements(kp_data[0].corona_lo_high.density_id),$
nalt)
lo_high_density_unc $
= fltarr(lo_high_total,$
n_elements(kp_data[0].corona_lo_high.density_id),$
nalt)
lo_high_den_labels $
= strarr(lo_high_total,$
n_elements(kp_data[0].corona_lo_high.density_id))
lo_high_half $
= fltarr(lo_high_total,$
n_elements(kp_data[0].corona_lo_high.half_int_distance_id))
lo_high_half_unc $
= fltarr(lo_high_total,$
n_elements(kp_data[0].corona_lo_high.half_int_distance_id))
lo_high_half_labels $
= strarr(lo_high_total,$
n_elements(kp_data[0].corona_lo_high.half_int_distance_id))
lo_high_timestamp = lonarr(lo_high_total)
lo_high_total = 0
for i=0, n_elements(kp_data.corona_lo_high.time_start)-1 do begin
if kp_data[i].corona_lo_high.time_start ne '' then begin
lo_high_radiance[lo_high_total,*,*] $
= kp_data[i].corona_lo_high.radiance
lo_high_radiance_unc[lo_high_total,*,*] $
= kp_data[i].corona_lo_high.radiance_unc
lo_high_rad_labels[lo_high_total,*] $
= kp_data[i].corona_lo_high.radiance_id
lo_high_rad_alt[lo_high_total,*] $
= kp_data[i].corona_lo_high.alt
lo_high_density[lo_high_total,*,*] $
= kp_data[i].corona_lo_high.column_density
lo_high_density_unc[lo_high_total,*,*] $
= kp_data[i].corona_lo_high.column_density_unc
lo_high_den_labels[lo_high_total,*] $
= kp_data[i].corona_lo_high.density_id
lo_high_half[lo_high_total,*] $
= kp_data[i].corona_lo_high.half_int_distance
lo_high_half_unc[lo_high_total,*] $
= kp_data[i].corona_lo_high.half_int_distance_unc
lo_high_half_labels[lo_high_total,*] $
= kp_data[i].corona_lo_high.half_int_distance_id
lo_high_timestamp[lo_high_total,*] $
= time_double(kp_data[i].corona_lo_high.time_start, $
tformat="YYYY-MM-DDThh:mm:ss")
lo_high_total = lo_high_total+1
endif
endfor
endif
;**********************************
; START THE PLOTTING ROUTINES HERE
;**********************************
;DEFAULT PLOT EVERYTHING IN ONE WINDOW
if total(disp_check) eq 6 then begin
;set up the plot window
a=get_screen_size()*0.8
if keyword_set(window) then begin
window,!window+1,xsize=a[0]*0.5,ysize=a[1]*0.8
endif else begin
window,0,xsize=a[0]*0.5,ysize=a[1]*0.8
endelse
device, decomposed=0
if e_h_r eq 1 then begin ;echelle high radiance
plot,e_high_radiance[0,0,*],e_high_rad_alt[0,*],/nodata,$
charsize=1.5,position=[.025,.6,.165,.95],/ylog,ystyle=1
for i=0, e_high_total -1 do begin
for j=0, n_elements(e_high_rad_labels[0,*])-1 do begin
oplot,e_high_radiance[i,j,*],e_high_rad_alt[i,*],$
linestyle=(i mod 7),color=i*(255/e_high_total)
endfor
endfor
if (keyword_set(nolabel) ne 1) then $
xyouts, .03,.93,'High: Radiance',/normal
endif
if e_l_r eq 1 then begin ;echelle limb radiance
plot,e_limb_radiance[0,0,*],e_limb_rad_alt[0,*],/nodata,charsize=1.5,$
position=[.025,.2,.165,.57],ystyle=1
for i=0, e_limb_total -1 do begin
for j=0, n_elements(e_limb_rad_labels[0,*])-1 do begin
oplot,e_limb_radiance[i,j,*],e_limb_rad_alt[i,*],$
linestyle=(i mod 7),color=i*(255/e_limb_total)
endfor
endfor
if (keyword_set(nolabel) ne 1) then $
xyouts, 0.03,.55,'Limb: Radiance',/normal
endif
if e_d_r eq 1 then begin ;echelle disk radiance
plot,e_disk_radiance[0,*],e_disk_timestamp,/nodata,charsize=1.5, $
position=[.025,.05,.165,.17],ystyle=1
for i=0, e_disk_total-1 do begin
oplot,e_disk_radiance[i,*],e_disk_timestamp,linestyle=(i mod 7),$
color=i*(255/e_disk_total)
endfor
if (keyword_set(nolabels) ne 1) then $
xyouts, 0.03, 0.15,'Disk: Radiance',/normal
endif
if e_h_h eq 1 then begin ;echelle high half int dist
plot,e_high_half[0,0,*],e_high_rad_alt[0,*],/nodata,charsize=1.5,$
position=[.190,.6,.33,.95],/ylog,ystyle=1
for i=0, e_high_total -1 do begin
for j=0, n_elements(e_high_half_labels[0,*])-1 do begin
oplot,e_high_half[i,j,*],e_high_rad_alt[i,*],$
linestyle=(i mod 7),color=i*(255/e_high_total)
endfor
endfor
if (keyword_set(nolabels) ne 1) then $
xyouts, 0.195, 0.93, 'High: 1/2 Int Dist', /normal
endif
if e_l_h eq 1 then begin ;echelle limb half int dist
plot,e_limb_half[0,0,*],e_limb_rad_alt[0,*],/nodata,charsize=1.5,$
position=[.190,.2,.33,.57],ystyle=1
for i=0, e_limb_total -1 do begin
for j=0, n_elements(e_limb_rad_labels[0,*])-1 do begin
oplot,e_limb_half[i,j,*],e_limb_rad_alt[i,*],$
linestyle=(i mod 7),color=i*(255/e_limb_total)
endfor
endfor
if (keyword_set(nolabels) ne 1) then $
xyouts, 0.195, 0.55,'Limb: 1/2 Int Dist',/normal
endif
if l_h_r eq 1 then begin ;lores high radiance
plot,lo_high_radiance[0,0,*],lo_high_rad_alt[0,*],/nodata,$
charsize=1.5,position=[.355,.6,.495,.95],/ylog,ystyle=1
for i=0, lo_high_total -1 do begin
for j=0, n_elements(lo_high_rad_labels[0,*])-1 do begin
oplot,lo_high_half[i,j,*],lo_high_rad_alt[i,*],$
linestyle=(i mod 7),color=i*(255/lo_high_total)
endfor
endfor
if (keyword_set(nolabels) ne 1) then $
xyouts, 0.36, 0.93,'High: Radiance', /normal
endif
if l_l_r eq 1 then begin ;lores limb radiance
plot,lo_limb_radiance[0,0,*],lo_limb_rad_alt[0,*],/nodata,$
charsize=1.5,position=[.355,.2,.495,.57],ystyle=1
for i=0, lo_limb_total -1 do begin
for j=0, n_elements(lo_limb_rad_labels[0,*])-1 do begin
oplot,lo_limb_radiance[i,j,*],lo_limb_rad_alt[i,*],$
linestyle=(i mod 7),color=i*(255/lo_limb_total)
endfor
endfor
if (keyword_set(nolabels) ne 1) then $
xyouts, 0.36, 0.55, 'Limb: Radiance', /normal
endif
if l_d_r eq 1 then begin ;lores disk radiance
plot,lo_disk_radiance[0,*],lo_disk_timestamp,/nodata,charsize=1.5, $
position=[.355,.05,.495,.17],ystyle=1
for i=0, lo_disk_total-1 do begin
oplot,lo_disk_radiance[i,*],lo_disk_timestamp,linestyle=(i mod 7),$
color=i*(255/lo_disk_total)
endfor
if (keyword_set(nolabels) ne 1) then $
xyouts, 0.36, 0.15, 'Disk: Radiance', /normal
endif
if l_h_d eq 1 then begin ;lores high density
plot,lo_high_density[0,0,*],lo_high_rad_alt[0,*],/nodata,charsize=1.5,$
position=[.52,.6,.66,.95],/ylog,ystyle=1
for i=0, lo_high_total -1 do begin
for j=0, n_elements(lo_high_den_labels[0,*])-1 do begin
oplot,lo_high_density[i,j,*],lo_high_rad_alt[i,*],$
linestyle=(i mod 7),color=i*(255/lo_high_total)
endfor
endfor
if (keyword_set(nolabels) ne 1) then $
xyouts, 0.525, 0.93, 'High: Density', /normal
endif
if l_l_d eq 1 then begin ;lores limb density
plot,lo_limb_density[0,0,*],lo_limb_rad_alt[0,*],/nodata,charsize=1.5, $
position=[.52,.2,.66,.57],ystyle=1
for i=0, lo_limb_total -1 do begin
for j=0, n_elements(lo_limb_den_labels[0,*])-1 do begin
oplot,lo_limb_density[i,j,*],lo_limb_rad_alt[i,*],$
linestyle=(i mod 7),color=i*(255/lo_limb_total)
endfor
endfor
if (keyword_set(nolabels) ne 1) then $
xyouts, 0.525, 0.55, 'Limb: Density', /normal
endif
if l_d_d eq 1 then begin ;lores disk density
plot,lo_disk_dust[0,*],lo_disk_timestamp,/nodata,charsize=1.5, $
position=[.52,.05,.66,.17],ystyle=1
for i=0, lo_disk_total-1 do begin
oplot,lo_disk_dust[i,*],lo_disk_timestamp,linestyle=(i mod 7),$
color=i*(255/lo_disk_total)
endfor
if (keyword_set(nolabels) ne 1) then $
xyouts, 0.525, 0.15, 'Disk: Dust', /normal
endif
if l_l_s eq 1 then begin ;lores limb scale
plot,lo_limb_scale[0,0,*],lo_limb_rad_alt[0,*],/nodata,charsize=1.5,$
position=[.685,.2,.825,.57],ystyle=1
for i=0, lo_limb_total -1 do begin
for j=0, n_elements(lo_limb_scale_labels[0,*])-1 do begin
oplot,lo_limb_scale[i,j,*],lo_limb_rad_alt[i,*],$
linestyle=(i mod 7),color=i*(255/lo_limb_total)
endfor
endfor
if (keyword_set(nolabels) ne 1) then $
xyouts, 0.69, 0.55, 'Limb: Scale Height', /normal
endif
if l_d_a eq 1 then begin ;lores disk aurora
plot,lo_disk_auroral[0,*],lo_disk_timestamp,/nodata,charsize=1.5, $
position=[.685,.05,.825,.17],ystyle=1
for i=0, lo_disk_total-1 do begin
oplot,lo_disk_auroral[i,*],lo_disk_timestamp,linestyle=(i mod 7),$
color=i*(255/lo_disk_total)
endfor
if (keyword_set(nolabels) ne 1) then $
xyouts, 0.69, 0.15, 'Disk: Auroral', /normal
endif
if l_h_h eq 1 then begin ;lores high half int
plot,lo_high_half[0,0,*],lo_high_rad_alt[0,*],/nodata,charsize=1.5,$
position=[.85,.6,.99,.95],/ylog,ystyle=1
for i=0, lo_high_total -1 do begin
for j=0, n_elements(lo_high_den_labels[0,*])-1 do begin
oplot,lo_high_density[i,j,*],lo_high_rad_alt[i,*],$
linestyle=(i mod 7),color=i*(255/lo_high_total)
endfor
endfor
if (keyword_set(nolabels) ne 1) then $
xyouts, 0.855, 0.93, 'High: 1/2 Int Dist', /normal
endif
if l_d_o eq 1 then begin ;lores disk ozone
plot,lo_disk_ozone[0,*],lo_disk_timestamp,/nodata,charsize=1.5, $
position=[.85,.05,.99,.17],ystyle=1
for i=0, lo_disk_total-1 do begin
oplot,lo_disk_ozone[i,*],lo_disk_timestamp,linestyle=(i mod 7),$
color=i*(255/lo_disk_total)
endfor
if (keyword_set(nolabels) ne 1) then $
xyouts, 0.855, 0.15, 'Disk: Ozone', /normal
endif
;ADD IN TITLES AND PLOT LABELS
if (disp_check[0] eq 1) or (disp_check[1] eq 1) or $
(disp_check[2] eq 1) then begin
if (keyword_set(nolabels) ne 1) then $
xyouts, 0.1775, 0.97, 'Echelle Data', alignment=0.5, $
charthick=2.5, charsize= 2.0, /normal
endif
if (disp_check[3] eq 1) or (disp_check[4] eq 1) or $
(disp_check[5] eq 1) then begin
if (keyword_set(nolabels) ne 1) then $
xyouts, 0.6725,0.97, 'Lo-Res Data', alignment=0.5, $
charthick=2.5, charsize= 2.0, /normal
endif
;ADD THE LEGEND ALONG THE RIGHTHAND SIDE
if keyword_set(nolegend) eq 0 then begin
a=get_screen_size()
if keyword_set(window) then begin
window,!window+1,xsize=a[0]*0.5,ysize=a[1]*0.9
endif else begin
window,1,xsize=a[0]*0.5,ysize=a[1]*0.9
endelse
device, decompose=0
plot,[0,0],[1,1], color=255, background=255, /nodata
;CREATE THE LO-RES LEGEND
xyouts, 0.5, 0.97, 'Lo-Res Legend', alignment=0.5, $
charthick=2.5, charsize=1.5, /normal
xyouts, 0.15, 0.94, 'High: Radiance', alignment=0.5, $
charthick=2.0, charsize=1.5, /normal
xyouts, 0.5, 0.94, 'High: Density', alignment=0.5, $
charthick=2.0, charsize=1.5, /normal
xyouts, 0.8, 0.94, 'High: 1/2 Int Dist', alignment=0.5, $
charthick=2.0, charsize=1.5, /normal
xyouts, 0.15, 0.65, 'Limb: Radiance', alignment=0.5, $
charthick=2.0, charsize=1.5, /normal
xyouts, 0.5, 0.65, 'Limb: Density', alignment=0.5, $
charthick=2.0, charsize=1.5, /normal
xyouts, 0.8, 0.65, 'Limb: Scale Height', alignment=0.5, $
charthick=2.0, charsize=1.5, /normal
xyouts, 0.10, 0.25, 'Disk: Radiance', alignment=0.5, $
charthick=2.0, charsize=1.5, /normal
xyouts, 0.35, 0.25, 'Disk: Dust Depth', alignment=0.5, $
charthick=2.0, charsize=1.5, /normal
xyouts, 0.60, 0.25, 'Disk: Auroral Index', alignment=0.5, $
charthick=2.0, charsize=1.5, /normal
xyouts, 0.85, 0.25, 'Disk: Ozone Depth', alignment=0.5, $
charthick=2.0, charsize=1.5, /normal
if l_h_r eq 1 then begin
; xyouts,0.4, 0.93, 'Lo-Res: Radiance', alignment=0, $
; charthick=1.5, charsize=1.5, /normal
leg_i=0.88
xyouts,0.10,leg_i+0.03,'Species', alignment=0.5, $
charthick=1.5, charsize=2.0,/normal
for i=0, n_elements(lo_high_rad_labels[0,*])-1 do begin
xyouts,0.09,leg_i,lo_high_rad_labels[0,i],alignment=0, $
charthick=1.5, charsize=1.5, /normal
plots,[0.07,0.12],[leg_i-0.01,leg_i-0.01], $
linestyle=(i mod 7), thick=2, /normal
leg_i=leg_i-0.03
endfor
leg_i=0.88
xyouts,0.25,leg_i+.03,'Observation', alignment=0.5, $
charthick=1.5, charsize=2.0,/normal
for j=0,lo_high_total-1 do begin
xyouts,0.19,leg_i, time_string(lo_high_timestamp[j]), $
alignment=0, charthick=1, charsize=1, /normal,$
color=j*(255/lo_high_total)
leg_i=leg_i-0.03
endfor
endif
if l_h_d eq 1 then begin
; xyouts,0.4, 0.93, 'Lo-Res: Radiance', alignment=0, $
; charthick=1.5, charsize=1.5, /normal
leg_i=0.88
xyouts,0.4,leg_i+0.03,'Species', alignment=0.5, $
charthick=1.5, charsize=2.0,/normal
for i=0, n_elements(lo_high_den_labels[0,*])-1 do begin
xyouts,0.39,leg_i,lo_high_den_labels[0,i],alignment=0, $
charthick=1.5, charsize=1.5, /normal
plots,[0.37,0.42],[leg_i-0.01,leg_i-0.01], $
linestyle=(i mod 7), thick=2, /normal
leg_i=leg_i-0.03
endfor
leg_i=0.88
xyouts,0.55,leg_i+.03,'Observation', alignment=0.5, $
charthick=1.5, charsize=2.0,/normal
for j=0,lo_high_total-1 do begin
xyouts,0.49,leg_i, time_string(lo_high_timestamp[j]), $
alignment=0, charthick=1, charsize=1, /normal,$
color=j*(255/lo_high_total)
leg_i=leg_i-0.03
endfor
endif
if l_h_h eq 1 then begin
; xyouts,0.4, 0.93, 'Lo-Res: Radiance', alignment=0, $
; charthick=1.5, charsize=1.5, /normal
leg_i=0.88
xyouts,0.7,leg_i+0.03,'Species', alignment=0.5, $
charthick=1.5, charsize=2.0,/normal
for i=0, n_elements(lo_high_half_labels[0,*])-1 do begin
xyouts,0.69,leg_i,lo_high_half_labels[0,i],alignment=0, $
charthick=1.5, charsize=1.5, /normal
plots,[0.67,0.72],[leg_i-0.01,leg_i-0.01], $
linestyle=(i mod 7), thick=2, /normal
leg_i=leg_i-0.03
endfor
leg_i=0.88