Hi Michael!
I think I understand the problem, but let's make sure we are talking about the same behavior. This is what I did:
1. run roiAnalysis.py from your develop branch
2. `imv.addROI([0, 0])` from command line
3. Drag a handle; values in ROI plot change even if the average value within the ROI should have been unchanged
The reason for this behavior is that getArrayRegion returns an array of the _rectangular_ region around the ROI, with anything outside the ROI set to 0. If you take the mean over this array, then all those 0s get mixed into the mean. A really simple option here is to add the ability to specify a default value other than 0. You could then call getArrayRegion with default=nan and use np.nanmean to get the correct value.
Luke