Skip to content
Snippets Groups Projects
Commit 7563f222 authored by Laurent Mercadier's avatar Laurent Mercadier
Browse files

Adds HWP angle to power conversion

parent 8ee61713
No related branches found
No related tags found
No related merge requests found
...@@ -12,4 +12,16 @@ def positionToDelay(data, key, origin=0, invert = False, reflections=1): ...@@ -12,4 +12,16 @@ def positionToDelay(data, key, origin=0, invert = False, reflections=1):
''' '''
c_ = 299792458 *1e-9 # speed of light in mm/ps c_ = 299792458 *1e-9 # speed of light in mm/ps
x = -1 if invert else 1 x = -1 if invert else 1
return 2*reflections*(data[key]-origin)*x/c_ return 2*reflections*(data[key]-origin)*x/c_
\ No newline at end of file
def degToRelPower(x, theta0=0):
''' converts a half-wave plate position in degrees into relative power
between 0 and 1.
Inputs:
x: array-like positions of half-wave plate, in degrees
theta0: position for which relative power is zero
Output:
array-like relative power
'''
return np.sin(2*(x-theta0)*np.pi/180)**2
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment