Opensource version of pinholeCalculator