Refractive Index in Air

Initialization

Needs["Controls`LinearControl`"]

$TextStyle={FontFamily->"Helvetica",FontSize->13};

plotopt=Sequence@@{GridLines->Automatic,Frame->True,FrameStyle->Thickness[0.0025],BaseStyle->{FontSize->12}};

plotoptn[n_Integer?(#>0∧#<6&)]:=Sequence@@{GridLines->Automatic,Frame->True,FrameStyle->Thickness[0.0025],PlotStyle->Take[{Purple,Brown,Darker[Green],Blue,Red},-n],BaseStyle->{FontSize->12}};
plotoptn[n_Integer?(#≤0∨#≥6&)]:=plotopt

mylegend[labels_List,pos_:Right]:={Placed[LineLegend[labels,LabelStyle->{FontSize->11},LegendMargins->2,LegendFunction->(Framed[#,Background->White]&)],pos]}

Refractive Index

Data

Condition: 15°C and 1013.25 mbar
https://refractiveindex.info/?shelf=other&book=air&page=Ciddor

nair532T15=1.00027821
nair1064T15=1.00027398

Condition: 25°C and 1013.25 mbar
https://emtoolbox.nist.gov/Wavelength/Ciddor.asp

nair532=1.000268288
nair1064=1.000264189

Equations

ϕ=(nair532-nair1064) ((2 π)/λ) l/.{λ->1064*^-9,l->0.01}
% (180/π)

n[p_,t_]:=δn(p/p0)((t0+25)/(t0+t))/.{t0->273.15,p0->1013.25}

(180/π)((2 π)/λ) l n[1013.25,25]/.{λ->1064*^-9,l->0.01,δn->nair532-nair1064}

Plots

Refractive Index

Plot[Evaluate[(180/π)((2 π)/λ) l{n[p,15],n[p,25],n[p,35],n[p,45]}/.{λ->1064*^-9,l->0.01,δn->nair532-nair1064}],{p,940, 1060},
FrameStyle->Thickness[0.0025],FrameStyle->Directive[Black,12],BaseStyle->{FontSize->12,FontColor->Black},
LabelStyle->{FontSize->14,FontColor->Black},
PlotLabel->"532nm/1064nm dispersion in air",
FrameLabel->{"Air pressure (mbar)","Phase shift (°/cm)"},Evaluate[plotoptn[4]],ImageSize->380,PlotLegends->mylegend[{"15°C","25°C","35°C","45°C"}]]

Barometric Pressure

DateListPlot[WeatherData[{"Richland", "Washington", "UnitedStates"}, "Pressure",{{2023,7,8},{2024,7,7},"Day"}],
PlotLabel->"Barometric pressure over past year in Richland, WA",
FrameLabel->{"Time (2023/2024)","Pressure (mbar)"},
BaseStyle->{FontSize->12,FontColor->Black},
LabelStyle->{FontSize->14,FontColor->Black},
FrameStyle->Directive[Black,15],Joined->True,plotoptn[1],ImageSize->444]

pdata=WeatherData[{"Richland", "Washington", "UnitedStates"}, "Pressure",{{2023,7,8},{2024,7,7},All}];

Histogram[pdata,Frame->True,GridLines->Automatic,Frame->True,FrameStyle->Thickness[0.0025],FrameStyle->Directive[Black,12],BaseStyle->{FontSize->12,FontColor->Black},
LabelStyle->{FontSize->14,FontColor->Black},
FrameStyle->Directive[Black,15],PlotLabel->"Barometric pressure over past year in Richland, WA",FrameLabel->{"Pressure (mbar)", "N"},PlotTheme->{"Scientific","VibrantColor"},
ImageSize->444]

Histogram of Phase Shifts

Histogram[Evaluate[(180/π)((2 π)/λ) l(n[#,30]&/@rawdata)/.{λ->1064*^-9,l->0.01,δn->nair532-nair1064}],{0.025},Frame->True,GridLines->Automatic,
FrameStyle->Thickness[0.0025],FrameStyle->Directive[Black,12],BaseStyle->{FontSize->12,FontColor->Black},
LabelStyle->{FontSize->14,FontColor->Black},
PlotLabel->"Phase shifts as function of pressure at 30°C",FrameLabel->{"Phase shift (°/cm)", "N"},PlotTheme->{"Scientific","VibrantColor"},ImageSize->444]

Histogram[Evaluate[4(180/π)((2 π)/λ) l(n[#,30]&/@rawdata)/.{λ->1064*^-9,l->0.01,δn->nair532-nair1064}],{0.1},Frame->True,GridLines->Automatic,FrameStyle->Thickness[0.0025], BaseStyle->{FontSize->12},FrameStyle->Thickness[0.0025],FrameStyle->Directive[Black,12],BaseStyle->{FontSize->12,FontColor->Black},
LabelStyle->{FontSize->14,FontColor->Black},
PlotLabel->"Phase shifts as function of pressure at 30°C",FrameLabel->{"Phase shift over 4 cm (°)", "N"},PlotTheme->{"Scientific","VibrantColor"},ImageSize->444]