module killwave_params
use killwave_utils
use OW_parms_areal
use flt_type
use sep

character (len=64),save		:: dip_, A_, ATA_, FILT_, infile_, outfile_
integer, external     		:: srite_window, sreed_window, getch
!integer		      		:: verb, verb1, verb2, verb3, verb4
integer				:: stat
integer		  ,save    	:: F, T
real, allocatable ,save     		:: A (:,:),ATA(:,:),FILT(:,:),infile(:), outfile(:)
type( filter)     ,save   		:: hfilt
real		  ,save		:: eps
real              ,save       	:: d1, d2, d3, o1, o2, o3
integer           ,save        	:: n1, n2, n3
real              ,save       	:: dang, oang
integer           ,save       	:: nang, nfilt
logical           ,save	        	:: all

integer,allocatable,save		:: ptch(:), n_nfilt(:)
real   ,allocatable,save		:: dips(:)
real		   ,save 		:: dip
integer		   ,save		:: idip
real 		   ,save	        	:: pi_1, pi_2, dip0
type(nfilter)     ,save  	 	:: n_filt 
type( filter)     ,save   		:: hfilt2,lapfilt
integer				:: iang,ifilt
real				:: lapfilt0
real				:: n_filt0
real				:: m,p
logical				:: destroy
logical				:: rand_in



contains

subroutine dip_params()
	T=.true.	
	F=.false.
	pi_1=-pi/2
	pi_2=+pi/2 ! range of angles

!	call from_param('all  ',all ,        .false.)
	call from_param('eps  ',eps ,        0.001)
	call from_param('nang ',nang ,       360 )
	call from_param('dang ',dang , pi/(nang-1))
	call from_param('oang ',oang ,       pi_1)
	call from_param('nfilt',nfilt,         14)
!	call from_param('verb' ,verb,           1)
!	call from_param('verb1',verb1,          0)
!	call from_param('verb2',verb2,          0)
!	call from_param('rand_in',rand_in, .false.)

          n1=img%z%n
          n2=img%xm%n
          n3=1
!          n3=img%ym%n

         allocate(dips(n1*n2*n3))
end subroutine
end module 
