- added python version of sos algorithm, gleaned from ctrloutline / barrel