Quantitative optical assessment of photonic and electronic properties in halide perovskite