C+
C NAME:
C	IPSProcessing
C PURPOSE:
C	Set up data processing constraints for IPS tomography program
C CATEGORY:
C	Tomography
C CALLING SEQUENCE:
	subroutine IPSProcessing(bForecast,NitTotal,bVcon,bVNago,bVOoty,bGcon,bGNago,bGCamb,bGOoty,bMV2)
C INPUTS:
C	(none)
C OUTPUTS:
C	bForecast	logical		Forecast mode or regular mode
C	NitTotal	integer		# iterations
C	bVcon		logical		.TRUE. if IPS V data are deconvolved; .FALSE. if not
C	bVNago		logical		.TRUE.: use Nagoya V data		
C	bVOoty		logical		.TRUE.: used Ooty V data
C					If bVcon=.TRUE. either bVNago or bVOoty is set .TRUE.
C					If bVcon=.FALSE., then bVNago and bVOoty are set .FALSE.
C	bGcon		logical		.TRUE. if G-level data are deconvolved; .FALSE. if not
C	bGNago		logical		.TRUE.: use Nagoya G data
C	bGCamb		logical		.TRUE.: use Cambridge G data
C	bGOoty		logical		.TRUE.: use Ooty G data
C					If bGcon=.TRUE. either bGNago, bGCamb or bGOoty is set .TRUE.
C					If bGcon=.FALSE., then also bGNagoy, bGCamb and bGOoty are set .FALSE.
C
C	bMV2		logical		.TRUE.: use mv^2 is constant
C					If bGcon=.FALSE. and bMV2=.TRUE. then the density at the source surface
C					is calculated using mv^2=constant
C					If bVcon=.FALSE. and bMV2=.TRUE. then the velocity at the source surface
C					is calculated using mv^2=constant
C					If both bGcon=.TRUE. and bVcon=.TRUE. then bMV2=.FALSE.
C CALLS:
C	AskYN, AskI4, AskR4, AskWhat
C INCLUDE:
C PROCEDURE:
C	Lots of user prompts
C MODIFICATION HISTORY:
C	NOV-1999, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
C-
	    logical	bForecast
	    integer	NitTotal
	    logical	bVcon
	    logical	bVNago
	    logical	bVOoty
	    logical	bGcon
	    logical	bGNago
	    logical	bGCamb
	    logical	bGOoty
	    logical	bMV2

	bMV2 = .FALSE.

	call AskYN('Forecast mode$no',bForecast)		! Regular or forecast mode

	call AskI4('Number of iterations',NitTotal)		! # iterations
								! Deconvolution distance
	call AskWhat('Deconvolve: velocity, G-level, both$1$3',I)

	! If (bMV2=TRUE then bGcon=.TRUE. and bVcon=FALSE) or (bMV2=TRUE then bVcon=.TRUE. and bGcon=FALSE)

	bVcon = I .eq. 1 .or. I .eq. 3
	bGcon = I .eq. 2 .or. I .eq. 3

	if (bVcon) then			! V deconvolution: select IPS station
	    call AskWhat('Use V data from: Nagoya, Ooty$1$1',I)
	    bVNago = I .eq. 1
	    bVOoty = I .eq. 2
	    bMV2  = .FALSE.
	else				! No V deconvolution
	    bVNago = .FALSE.
	    bVOoty = .FALSE.
	    call AskYN('Make V map assuming constant mv^2$no',bMV2)
	end if

	if (bGcon) then			! G deconvolution: select IPS station
	    call AskWhat('Use G data from: Nagoya, Cambridge, Ooty$1$1',I)
	    bGNago = I .eq. 1
	    bGCamb = I .eq. 2
	    bGOoty = I .eq. 3
	    bMV2  = .FALSE.
	else				! No g deconvolution
	    bGCamb = .FALSE.
	    bGOoty = .FALSE.
	    bGNago = .FALSE.
	    call AskYN('Make G map assuming constant mv^2$no',bMV2)
	end if

	return
	end
