subroutine elled (xc,yc,a,b,h,ed,dndh) c s/r to calculate the electron density, ed, and slope, dndh' for c an elliptical profile -- see s/r ellipse c c written by leo mcnamara 4-aug-87 c----- last modified 4-aug-87 c y = h yb = (y - yc) / b con = sqrt (1. - yb*yb) c take negative sqrt to get correct part of ellipse con = - con ed = xc + a * con dndh = -a / con * yb / b return end