
FUNCTION test

stacklist = dialog_pickfile(filter='*.tif', /multiple)

t= ax_name(stacklist(0))

out_file = 'E:\data\XRM\Soleil\2019\19-06\06-17\30-ptycho-phase\mod\'

	print, 'renamed tif file saved: '
for i = 0, n_elements(stacklist)-1 do begin
;	print, stacklist(i)
	t = ax_name(stacklist(i))
	t_out = out_file + t(1) + '.' + t(2)
	nstop = strpos(stacklist(i), '-', /reverse_search)
	n1 = strmid(t_out,0,nstop+4)
;	print, 'nstop ', nstop, '  ', n1
;	n2 = strmid(t_out,nstop+1)
;	print, n2
	t_out = n1 + '_PHA.tif'
;	q = query_tiff(stacklist(i), info)
;	help, info, /struct
	t_tif = read_tiff(stacklist(i))
    write_tiff,t_out, t_tif, /float
	print, t_out
endfor



end
