Skip to content

Commit

Permalink
Update to NXS_analogue_output_calculator
Browse files Browse the repository at this point in the history
Include calculation for synchronising analogue output with thermomechanical spreadsheet data
Export analogue output and synchronised data to text file
Update phase fraction calculator with Diamond 2022 input
  • Loading branch information
christopher-daniel committed Dec 15, 2022
1 parent 908deda commit eeedd3b
Show file tree
Hide file tree
Showing 5 changed files with 1,075 additions and 442 deletions.
42 changes: 36 additions & 6 deletions ETMT_phase_fraction_calculator.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,36 @@
"input_filepath = \"../../SXRD_raw_data/diamond_2021_fast_detector/rawdata_ETMT/006_Ti64_TD_Heat_Temp_1200C_Rate_2-5Cs/Test1/Test1.steps.tracking.csv\""
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# use this cell for the data inputs for the Diamond data collected in 2022\n",
"\n",
"# give the dimensions of the sample in millimetres\n",
"length = 2 # note, this is the distance between resistivity wires, usually 2 mm\n",
"thickness = 2\n",
"width = 4\n",
"\n",
"# identify the columns to upload from the file\n",
"use_columns = (0,8,11,16,14,17,15,19)\n",
"\n",
"column = { \"time\": 0, # time in Seconds\n",
" \"position\" : 1, # position / displacement in Millimetres\n",
" \"load\" : 2, # load in Newtons\n",
" \"current\" : 3, # current in Amps\n",
" \"temperature\" : 4, # temperature in Celsius recoded at ETMT\n",
" \"voltage\" : 5, # voltage in Volts\n",
" \"temperature_eurotherm\" : 6, # temperature in Celsius recoded at Eurotherm\n",
" \"frame\" : 7 # frame signal\n",
" }\n",
"\n",
"# provide the relative filepath to the ETMT data file\n",
"input_filepath = \"../../SXRD_raw_data/diamond_2022/rawdata_ETMT/033_Ti64_TIFUN-T6_Heat_1200C_1Cs-1/Test1/Test1.steps.tracking.csv\""
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -488,11 +518,11 @@
"metadata": {},
"outputs": [],
"source": [
"def closest (num, arr):\n",
" value = arr[0]\n",
" for index in range (len(arr)):\n",
" if abs (num - arr[index]) < abs (num - value):\n",
" value = arr[index]\n",
"def closest (number, array):\n",
" value = array[0]\n",
" for index in range (len(array)):\n",
" if abs (number - array[index]) < abs (number - value):\n",
" value = array[index]\n",
" element = index\n",
" return value, element"
]
Expand Down Expand Up @@ -702,7 +732,7 @@
"metadata": {
"anaconda-cloud": {},
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand Down
668 changes: 234 additions & 434 deletions ETMT_plastic_strain_calculator.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion ETMT_plastic_strain_plotter.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@
"metadata": {
"anaconda-cloud": {},
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand Down
Loading

0 comments on commit eeedd3b

Please sign in to comment.