traslated CaOscillate bngl to py