Viewing contents of file '../idllib/astron/contrib/varosi/code/allpro/analysis_dupmos.pro'
function analysis_dupmos, imath

; Frank Varosi NASA/Goddard 1992

   common math_mosaics, math_List, math_images, math_imscaled

	Nmath = N_struct( math_List )
	if (Nmath LE 0) then return,(0)
	if (Nmath EQ 1) then imath=0

	if N_elements( imath ) NE 1 then begin
		imath = select_image( math_List, /CURSET,/WINSET, $
					INSTRUCT="Select mosaic to Duplicate" )
		printw," ",/ERASE
		if (imath LT 0) then return,(0)
	   endif

	border_images, math_List, INUM=imath
	math_List = [ math_List, math_List(imath) ]

	math_List(Nmath).name = math_List(Nmath).name + "(duplicate)"
	math_List(Nmath).Level = max( [math_List.Level] ) + 1
	math_List(Nmath).Locx = math_List(Nmath).Locx + 32
	math_List(Nmath).Locy = math_List(Nmath).Locy + 32
	screen_coordin, math_List, INUMS=Nmath

return, Nmath
end