This repo contains work done by Liam Pond and Albert Kalayil on the oleic acid project in the Nanotribology Lab in 2024. Supervised by Drs. Philip Egberts, Vinay Saini, and Kasimuthumaniyan Subramanian.
Note: The following commands are for Mac and Linux. Setup for Windows is slightly different.
- Create a new project using your selected IDE (I use PyCharm).
- Clone this repo. Save it in the project directory you just created.
- Change directories to the one you just created by typing
cd <repodir>
into the command line (replace with the path to your directory). - Activate the venv by typing
source bin/activate
in Terminal. - Download required packages by typing
pip install -e requirements.txt
.
Download relevant data here. If the link isn't working, email [email protected] or [email protected].
Store data in the root directory of your project folder. The default name is Data
. If you wish to change it, remember to modify the name in parse_tribometer.py
.
Find information about the test procedure here.
Raw data will first need to be parsed with parse_tribometer.py
. Set folder_path
to the name of the subdirectory that contains your data and verify that valid tests are correct by modifying entirely_valid_samples
and the return statement of the test_validity
function. All files and subdirectories in folder_path
will be parsed except directories listed in excluded_dirs
. Next, main.py
will output .csv files and plot the results. Make sure that your directory contains folders called ParsedFiles
, FrictionCoefficientCSV
, and FrictionCoefficientGraphs
.
ParsedFiles/
Master.csv
: Contains information about all parsed testsValidMaster.csv
: Master, but only for tests specified as valid in thetest_validity
function inparse_tribometer.py
.
FrictionCoefficientCSV/
FrictionCoefficientData.csv
: .csv that contains the average friction per cycle for each test. Average friction is calculated by averaging friction values in the middle 40% of both the outgoing and returning phase of each cycle.AverageFrictionCoefficientData.csv
: Same as above, but with per-cycle values further averaged to result in one number per test.
FrictionCoefficientGraphs/
Outdated — graphs are now generated in Origin using the .csv files above.
![Screenshot 2024-07-08 at 12 42 23 PM](https://private-user-images.githubusercontent.com/104945840/354375646-4e05f2cd-009e-4b5c-9710-27af10dd2b07.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjYwNTkzMDcsIm5iZiI6MTcyNjA1OTAwNywicGF0aCI6Ii8xMDQ5NDU4NDAvMzU0Mzc1NjQ2LTRlMDVmMmNkLTAwOWUtNGI1Yy05NzEwLTI3YWYxMGRkMmIwNy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwOTExJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDkxMVQxMjUwMDdaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1iMjQ1MmJjYWE3OGI2MGEzYzZhNmFhZTJlZThhMWQ3ZDAyNGZjZTAxZDdhNzM4NzllN2RmNjRjNWEyODQ4NmI0JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.aLc-xiWRK1g4jCLR1LuTeamDqarXjmD7K8c4rUzRSNk)
This means that a test parameter (in this case SampleNo) was unable to be read from the test filename. To fix this, modify either the regex code in parse_tribometer.py
or your test's filename. If you're unfamiliar with regex expressions, ChatGPT is a good tool to build your own. For example, you can ask it to make regex that will return all numbers following the string 'SampleNo'. Remember that many test parameters are not recorded in the file itself and must be extracted from the filename.