Data Manipulation

David McIntyre
19 January 2021

Initialization

SetOptions[Plot,BaseStyle->{FontFamily->"Arial",FontSize->12},PlotStyle->{{Black,AbsoluteThickness[1.5]}},AxesStyle->{{Black,AbsoluteThickness[0.5]},{Black,AbsoluteThickness[0.5]}},TicksStyle->{{Black,AbsoluteThickness[0.5]},{Black,AbsoluteThickness[0.5]}}];

SetOptions[ListPlot,BaseStyle->{FontFamily->"Arial",FontSize->12},Joined->False,PlotStyle->{Black,AbsoluteThickness[1.5]},Axes->{True,True},LabelStyle->Black,ImageSize->500];

Data input from CSV file

Check which directory you are in now

Directory[]

Set directory put name in quotes

SetDirectory[""]

Read file. Check labels

data=Import["data.csv"];

data[[1;;3]]

Drop 1st row of labels if needed

justdata=Drop[data,1];

Length[justdata]

justdata[[1;;5,1]]

justdata[[50000,1]]

justdata[[1;;5,2]]

Rotation stage is moving at 10 degrees per second.  Total time is 20 seconds for the 180 degree with some extra before and after.  So find the middle and go 9 seconds ( = 22500 points)

tot=22500

Plots

data plot

ListPlot[justdata[[All,2]],PlotRange->All,AxesLabel->{"t","V"}]

Agilent scope gives 50,000 data points so select useful ones and replot.

ListPlot[justdata[[20050;;23850,2]],PlotRange->{0,0.4},AxesLabel->{"t","V"}]