# Calculate the rise time and the fall time of a curve

I have collected data for room temperature over a 24 hours. each record represent a temperature with timestamp. The interval is 5 minutes and the timestamp record that. An air-conditioning machine is set to operate several times a day ( several cycles). the ON action cause the temperature drops then stay at certain fixed temperature for a certain period then the ac is turned off. The temperature starts to rise then stay at the high level for a while until the AC turned on and start a new cycle.
I need to calculate FOR EACH CYCLE the time it takes to go from H To L Also The time it takes to go from L to H ( H = high temp , L = Low temp).
The output of the script is TWO LISTS:
HtoL = [ 30,31] assume only two cycles 1st cycle was 30 minutes and 2nd cycle 31 min
LtoH = [33,35] this will be data for the same two cycles .
Of course the actual lists will have more cycles. I can provide a list of test data if needed.

Have you started writing the code and need help?
You can share your code here using the pre-formatted text option.

``````print(‘your code here’)
``````
1 Like

No !. But I tried both Bard and Bing and to my surprise both failed !!. May be too early.
I am not asking for a full blown script. All I am hoping for is a function to do the rise and the fall. Once rows identified it will be simple math to come up with the solution.

That is not a python quesion then. It is math question.

Have you researched how this is usually done?
Off the top of my head you need to work out the deltas between temperatures and scan until they are about a limit. But this is my expertise.

Aside: please put a “?” at the end of your questions so it is clear what is a question and what is a statement.

1 Like

If you recall; in this post I used AI ( Bard, Bing) and I did not succeed. This time I used the other AI ( Augmented Intelligence) By that I formulated my prompt with a certain design in my head. And Google BARD succeeded brilliantly. If you are interested I can post the solution.