Analyzing Data
On this page, we describe how to quickly consolidate the data taken with the Aux Tel temperature array into a single, usable data file.
This analysis, software, does not do much with the data; it simply takes the many data files taken over the night and merges them into a single usable data file.
The code underlying this analysis is accessible at the Stubbs Group GitHub page:
https://github.com/stubbslab/TempProbe
Operation:
- Log onto the control computer:
- You must have the appropriate VPN running on your computer (PSF1-LAS-UPD4-5787-config on Sasha's machine)
- From terminal:
- (Enter usual stubbslab password)
- Move to directory with data analysis code:
cd Documents/TempProbe/code/
- Run the analysis code in python 3:
- python3 ConsolidateTemperatureVariance.py
Follow the code prompts:
Prompt: Enter the next date_str that will be added (just hit [RETURN] when you are done):
Enter the first date of the data you want to consolidate were taken on, formatted as YYYY_MM_DD
This process repeats until you RETURN with no string entered
For a night of data, these dates are generally the night you started observations and the following morning.
You can check what data were taken on which dates by checkin the: ~/Documents/TempProbe/data directory:
ls ~/Documents/TempProbe/data
- Prompt: Which is the first index from this directory that I should use (default {FIRST INDEX OF DATA IN THIS DIRECTORY}) :
- Enter the first index of the data on the shown night that you want to include in this consolidation
- The data files are written in integer sequence, with the last number before the .csv suffix being the index.
- You may not want to use all data from a date. For example, data from the morning of one observing night can be saved in the same directory as data from evening of the following night
- You can check where the cutoff appears to be by checking the time at which the files were written:
- ls -ltr ~/Documents/TempProbe/YYYY_MM_DD/*.csv
- Prompt: Which is the last index from this directory that I should use (default {LAST INDE OF DATA IN THIS DIRECTORY}) :
- Enter the last index of the data on the shown night that you want to include in this consolidation
- See notes in point b. above.
- Prompt: Enter indeces that I should ignore from this date, one at a time (just hit RETURN when done):
- If you are aware of particular observations that you want to ignore, you can specify them here.
- Code will ask you for indeces one at a time, until no string is returned
- b., c., and d. repeat for each of the directories to be consolidated.
- Prompt: What is the root of the file to save (not including file type; default: TempVariance_YYYY_MM_DD):
- What should the base of the files (plots and data files) that will be saved:
- Plots will look this this input, plus .pdf
- Data files will look like this input, plus .txt
- What should the base of the files (plots and data files) that will be saved:
- Data are then saved to the ~/Documents/TempProbe/results directory
Sample Results:
Here are the results when we ran the above analysis to data taken on the night of 06/09/2022-06/10/2022:
Bash script to concatenate data files:
MakeVarFile.sh
Known issues and solutions:
(Please add additional documented bugs, and fixes as they are found)
Issue:
Explanation:
Solution:
Copyright © 2024 The President and Fellows of Harvard College * Accessibility * Support * Request Access * Terms of Use