astrofrog / fortranlib

Collection of personal scientific routines in Fortran :book:
BSD 2-Clause "Simplified" License
298 stars 73 forks source link

Update lib_statistics.f90 #2

Closed eev2 closed 1 year ago

eev2 commented 9 years ago
  1. function mean: When mask'ed, divide by count(mask) instead of size(x)
  2. function variance: When mask'ed, divide by count(mask) instead of size(x). Also a bug: variance = sum((x-mean(x))**2), was sum(x-mean(x)**2).
astrofrog commented 9 years ago

@eev2 - thanks for the fixes! Will try and review and test this this week :)