A novel approach for analyzing open Z-scan experiments