Closed meloun67 closed 9 months ago
@svoboad3 could you please program loop which finds max concentration's time for each time series and calculates average value of these times for each cluster (CompCond)?
Then please program the loop which calculates difference between that average value and max concentration's time value for each timeseries and then add this difference to all the times in the timeserie. Store the result as a experimentSetCor1 and return this object.
Summary: find max for each timeserie > calculate average for each cluster > calculate difference for each timeserie in each cluster > change all the times in all the timeseries by adding calculated difference
Done
Found one small problem. Creating a whole new ExperimentSet with experiments and components in the correct place I found to be pretty difficult, because we're making changes based on ExperimentClusters. My solution was to create a deep copy of the ExperimentSet before calling this function, and then make corrections inplace. The problem is, that the ExperimentClusters were referencing components in the original set, so by changing components in cluster, the changes are made in the original set, not the copy.
There is few ways to fix this:
I would go with 1. or 2. They both are pretty easy and I don't see reason why they should pose a problem.
I agree. I think I will have similar problem with Gauss_fit.py
We need to discuss this on call. Check email I send invitation.
Please program new Ret_Time_Cor.py - current version behaves weirdly and it is anyway insufficient! Description of task in in this file: docu/Zadani Ret_Time_Cor algoritmu.docx
Uses ExperimentClusterCompCond and for each group (time series of same compounds and conditions) shiftes datapoints in time so the peaks of all timeseries precisely matches (in an average of each peak's maxima). Saves the resulting dorrected timeseries into ExperimentSetCor1
in: ExperimentSet ExperimentClusterCompCond out: ExperimentSetCor1