path  = '$DIR_GEN_ORBIT_RAW'    ; Input path
path2 = path            ; Output path

yesnox, '* Run for Yohkoh (otherwise ASCA) ', qyohkoh, 'Yes'
if (qyohkoh) then spacecraft = 'sola' else spacecraft = 'astd'

file=findfile(concat_dir(path,spacecraft+'ss.w??')) ; Only offer final versions

w = n_elements(file)-1
print,'* Default file = ',file(w),format='(/2a/)'
yesnox,'* Use the default? ',ans, 'Y'

if not ans then begin
  w=wmenu_sel(file,/one)
  if w(0) eq -1 then begin
    print,'  No files selected'
    stop
  endif else w = w(0)
endif

print,'  Summary for file = ',file(w)
if qyohkoh then file_out = concat_dir(path2,'dsnchk_sheet.txt') else    $
                file_out = concat_dir(path2,'dsnchk_astd.txt')
input, 'Enter the output file name ', file_out, file_out

break_file,file(w),disk,dir,name,ext & Week = strmid(ext,2,2)
dsn_check,Week,file_out,asca=1-qyohkoh

end