Deduction of pure spin current from the linear and circular spin photogalvanic effect in semiconductor quantum wells