I'm working on experimental data where I create a temperature profile from 45 °C to 5 °C and then again to 45 °C. Plotting the data results in a loop, since cooling from 45 °C to 5 °C and heating from 5° C to 45 °C are recorded. But since I need to the plot to appear "chronological" every temperature needs to be unique.
The image shows a visual explanation of what I need.
What I did therefore is getting the difference from each consecutive temperature interval using numpys "diff" function. So far so good. Now to make a useful plot out of this I need to somehow create a new list where every item is the sum from the ones before.
A small example of what I'm looking for:
my_list = [1,2,5,1,4,2,3]
#some operation
result_list = [1,3,8,9,13,15,18]
Would be great if someone knows how to do that or has a smarter idea how to get the job done!