singleUseScripts/biasEnvelope.py: made a function

  can now run over multiple sets of reference functions