https://iopscience.iop.org/article/10.1086/680323/pdf
Section 4 in the above link, I was trying to understand the way to calculate but I am not clear about the derivation and in the section 15 there are some examples of column density calculation that one too.