working code with intensity scaling, and weighted averaging linear in degrees from disk center