Pulled out plot code to edit. This is dependent on functions
Cleaned up csa function code. Need to duplicate for ratio and J