%++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
%.COPYRIGHT  (c)  1990 European Southern Observatory
%.IDENT      createrand.hlq
%.AUTHOR     MR,FM,KB, IPG/ESO
%.KEYWORDS   MIDAS, help files, CREATE/RANDOM_IMAGE
%.PURPOSE    On-line help file for the command: CREATE/RANDOM_IMAGE
%.VERSION    1.0  03-JAN-1986 : Creation, MR,FM,KB
%----------------------------------------------------------------
\se
SECTION./RAND
\es\co
CREATE/RANDOM					       14-JUL-2003  KB
\oc\su
CREATE/RANDOM name [dims] [starts,steps] [func_type] [coefs] [seed]
CREATE/RANDOM name = ref_frame [func_type] [coefs] [seed]
	create a random image
\us\pu
Purpose:      
           Create a new image (= bulk data frame + standard descriptors)
           with pixel values drawn from a random distribution.
\up\sy
Syntax:       
           CREATE/RANDOM name [dims] [starts,steps] [func_type] [coefs] [seed]
           CREATE/RANDOM name = ref_frame [func_type] [coefs] [seed]
\ys\pa
           name = name of new frame
\ap\pa
           ref_frame = reference frame,
                  take descriptors NAXIS, START, STEP, ... from that frame
\ap\pa
           dims = NAXIS, NPIX(1),...,NPIX(NAXIS) (NAXIS max. 3);
                  defaulted to 2,64,64
\ap\pa
           starts,steps = START(1),...,START(NAXIS),STEP(1),...,STEP(NAXIS)
                  defaulted to:  0. for START(i), 1. for STEP(i)
\ap\pa
           func_type = type,sub_type   
                  of distribution function used for image creation
                  type: U(NIFORM) for uniform distribution
                        G(AUSS) for Gaussian d.
                        E(XPONENTIAL) for exponential d.
                        B(INOMIAL) for binomial d.
                        P(OISSON) for Poisson d.
                        C(AUCHY) for Cauchy d.
	          sub_type:
                       F(ibonacci) for lagged Fibonacci random no. generator
                       S(tandard) for minimal standard uniformF random no. g.
                  defaulted to UNIFORM,Fibonacci
\ap\pa
           coefs = coefficients for the distributions above 
                  number and meaning depends on the parameter func_type;
                  defaulted to 0.,1.
\ap\pa
           seed = Integer number used as root of the pseudo-random
                  series. Defaulted to the current time in seconds/1237,
                  as provided by M$SECS().
\ap\sa
See also:
           CREATE/IMAGE
\as\no
Note:        
	   The random number generators have been reimplemented and do not
	   use the NAG library anymore. 
           
           For `funct_type' GAUSS the coefficients represent m,s (mean and
           sigma), for UNIFORM the coefficients represent a,b the endpoints
           of the interval [a,b].
           For BINOMIAL the coefficients represent the no. of trials and
	   the probabiltiy of an event. 
           For EXPONENTIAL, POISSON, CAUCHY the first coefficient 
	   represents m the mean (2nd coeff. is ignored).
 
	   The sub_type refers to the type of r.n.g. used for the generation
	   of the uniformly distributed values. Since also the other
	   distributions are based implicitely on uniform random numbers,
	   the sub_type can be applied to all distributions.
\on\exs
Examples:
\ex
           CREATE/RANDOM new 2,100,100 -200.,-180.,22.,22. uniform,standard
             Will create the frame `new.bdf' with 100*100 pixels,
             start values -200.,-180., stepsize 22.,22.
             the pixel values of `new.bdf' will be determined according
             to a uniform distribution (using minimal standard algorithm)
	     over the interval [0,1].
\xe\ex
           CREATE/RANDOM new = sombrero GAUSS 12.5,1.25
             Will create the image `new.bdf' with same size and standard
             descriptors as the frame `sombrero.bdf'.
             The pixel values of `new.bdf' will be determined according
             to a Gaussian distribution with mean = 12.5 and 
             standard deviation = 1.25.
	     The uniformly distributed random values used for the calculation
	     of the Gaussian distribution are generated via the Fibonacci
	     algorithm (the default).
\xe\ex
           CREATE/RANDOM bino ? ? binomial,st 12,0.66 12347
             Will create the image `bino.bdf' with size 64 x 64,
	     start = 0.0, 0.0 and step = 1.0, 1.0 according to a binomial
	     distribution using 12 trials and probability = 0.66.
	     The underlying uniform r.n.g. uses the minimal standard algorithm
	     and seed value = 12347.
\xe \sxe
