Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #-------------------------------------------------------------------------------
- # Name: Physics subtract
- # Purpose: Subtract an array by a value
- #
- # Author: Tronds
- #
- # Created: 20.09.2012
- # Copyright: (c) Tronds 2012
- # Licence: <your licence>
- #-------------------------------------------------------------------------------
- #!/usr/bin/env python
- import numpy
- t0 = float() #define your t0 value in between the brackets.
- #Enter the desired values of t that you want subtracted by t0.
- #Remember to separate the values with a comma.
- #I.e rawdata = [1.4063,1.5060,1.6057,1.7054]
- rawdata = []
- array = numpy.array(rawdata)
- array = array - t0
- print array
- print "Job done"
Advertisement