;+ ; NAME: ; ThomsonMidpointFnc ; PURPOSE: ; Internal use by ThomsonMidpoint. ; CALLING SEQUENCE: FUNCTION ThomsonMidpointFnc, S, arg ; Internal use only ; INPUTS: ; S scalar; type: float ; distance along line of sight in solar radii ; arg array(4}; type: float ; [R,E,udark,halfint] ; R = heliocentric distance observer in solar radii ; E = elongation in radians ; udark = limb darkening constant ; halfint = half the intensity from 0 to infinity ; OUTPUTS: ; R scalar; type: float ; integrated intensity upto distance S - halfint ; INCLUDE: @compile_opt.pro ; On error, return to caller ; CALLS: ; ThomsonLOSRomb ; PROCEDURE: ; Returns the difference between line-of-sight integrated intensity ; up to specified distance S and half the integrated intensity over the ; entire line of sight. I.e. the distance S which makes this function zero is ; what ThomsonMidpoint is looking for. ; No density function is passed to ThomsonLOSRomb, so a 1/r^2 density is assumed. ; MODIFICATION HISTORY: ; JAN-1997, Paul Hick (UCSD) ;- RETURN, ThomsonLOSRomb(arg[0],arg[1],udark=arg[2],upper=S)-arg[3] END