The estimation of the HSV functions in lines 841-864 of txfunc.py do not account for sampling weights in the microdata. The estimation of the model parameters should take the form of $\beta = (X'WX)^{-1}X'WY$, where $W$ are the sample weights.
cc @rickecon