https://github.com/deniztop/LABL
Raw File
Tip revision: 67f0256ccd5a1469bf33da1a860f1c845c89b330 authored by deniztop on 23 October 2021, 09:34:30 UTC
Add files via upload
Tip revision: 67f0256
Readme_LABL.txt
The codes you've downloaded act on the output files generated by Actimetrics software. We assume that you collected your data using LumiCycle 32 in 4 minute increments, and accounted for exponential decay of the signal. It is important that you did not save the data with any smoothing, and it is important that the exponential decay correction was using a polynomial correction with a value equivalent to the number of days you recorded luminescence oscillations. Save all data sets as .csv files

LABL9.py fits a 24-hour sine wave on to your data, in 12 hour increments, and records the peaks and the troughs. These data are used to calculate the amplitude. Place the file in the folder with the data sets. Execute the code using "python LABL9.py [filename].csv" for each file. We have found that this level of manual control is necessary for user-control of quality of data. Values that are too low, or arrhythmic "oscillations" reveal inconsistent data.

wavelets4.py fits a Morlet wavelet across the data and records the best-fit period of oscillation for each time point. In this case, every 4 minutes. Run the code from anywhere but inside the folder with data. We prefer to leave a copy of the code with each data set to keep track of the version we used for the analysis. Before execution run command "find . -name '.DS_Store' -type f -delete" to delete invisible file(s) in the folder. Execute wavelets4.py by typing in terminal, "python wavelets4.py". The code will ask you a number of questions. The parameters required are: 

Bandwidth parameter: 3
Central frequency: 1
Data points in a given hour: 15 (because 4 minutes in an hour)
Zero hour mark: 10 (we use subjective lights on at 10 am, hence 10)
Shortest wave to match: 16
Longest wave to match: 72
Select increment: 1 (highest resolution)
Percent threshold: 0.25

These values have been generated through some trial and error, but importantly, were verified using artificial data with known characteristics to ensure the code was executing properly.

The code will then ask you where the data set it, requiring a tree to access it. Enter it and strike <enter>. The code will record all calculations into a folder named "scaleograms".
back to top