; NAME: ; RANDLINES ; ; PURPOSE: ; This function makes a 1D array of random spec lines ; ; CALLING SEQUENCE: ; Result = RANDLINES(ny, numl) ; ; INPUTS: ; Ny = The number of cols ; Numl = The number of lines ; ; OUTPUT: ; A 1D with spectrum lines with values between 0 and 1 ; ; PROCEDURE: ; Initialize spec to 0. Randomly create the list for the line ; positions, widths, and values. Then for each line add to spec ; a gaussian with that lines width, mean, and height. ; ; MODIFICATION HISTORY: ; created April 19 2003 by John Dermody function RANDLINES, ny, numl spec = fltarr(ny) ; [position, width, height] list = [ [floor(randomu(seed, numl) * ny)], $ [randomu(seed, numl) * 2.5 + 0.5], $ [1 / (randomu(seed, numl) * 1000) < 1.0 ] ] return, transpose(list) end