;ff = file_list('$DIR_DATA_FLARE', 'spr*')
;
;
print, 'Option 0 is spr911115.2141 flare data
print, '       1 is spr911115.2141 flare Al.1 PFIs
print, '       2 is sfr940116.2237 5.3 sec AlMg HR FFIs
print, '       3 is sfr940116.2237 2.6 sec Al.1 HR FFIs
print, '       4 is spr911209.0903 limb QR PFI limb flare
print, '       5 is spr930625.0131 quiet Al.1 PFI with darks
read, 'Enter your option', option
;
case option of
    0: ff = file_list('$DIR_DATA_FLARE', 'spr911115.2141')
    1: ff = file_list('$DIR_DATA_FLARE', 'spr911115.2141')
    2: ff = file_list('$DIR_DATA_FLARE', 'sfr940116.2237')
    3: ff = file_list('$DIR_DATA_FLARE', 'sfr940116.2237')
    4: ff = file_list('$DIR_DATA_FLARE', 'spr911209.0903')
    5: ff = file_list('$DIR_DATA_FLARE', 'spr930625.0131')
    else: stop
end
infil = ff(0)

if (infil eq '') then stop, 'Desired image not available'

rd_roadmap, infil, rmap
;
case option of
    0: ss = where(gt_dp_mode(rmap) eq 9)
    1: ss = where((gt_dp_mode(rmap) eq 9) and (gt_filtb(rmap) eq 2) and (gt_res(rmap) eq 0))
    2: ss = where(gt_dpe(rmap) eq 25)
    3: ss = where((gt_filtb(rmap) eq 2) and (gt_dpe(rmap) eq 23))
    4: ss = where((gt_dp_mode(rmap) eq 9) and (gt_res(rmap) eq 2))
    5: ss = where((gt_dp_mode(rmap) eq 13) and (gt_filtb(rmap) eq 2))
endcase

rd_xda, infil, ss, index, data
;
end