Pulled out rough scaling code; will use ROS/DET curve for scaling later.