Newer
Older
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Aug 31 16:18:18 2023
@author: nico
"""
from scipy.special import jv
import numpy as np
import matplotlib.pyplot as plt
def CPTMicromotionSpectra(det, A, beta, x0, x1):
ftrap=22.1
gamma=3
P = -A*(jv(0, beta)**2)/(((det-x0)**2)+(0.5*gamma)**2)+10 -A*(jv(0, beta)**2)/(((det-x1)**2)+(0.5*gamma)**2)+10-0.007*det
i = 1
#print(P)
while i <= 10:
P = P - A*((jv(i, beta))**2)/((((det-x0)+i*ftrap)**2)+(0.5*gamma)**2) - A*((jv(-i, beta))**2)/((((det-x0)-i*ftrap)**2)+(0.5*gamma)**2)
P = P - A*((jv(i, beta))**2)/((((det-x1)+i*ftrap)**2)+(0.5*gamma)**2) - A*((jv(-i, beta))**2)/((((det-x1)-i*ftrap)**2)+(0.5*gamma)**2)
i = i + 1
#print(P)
return P
detvec = np.arange(-50,50,0.1)
A=1
plt.plot(detvec,CPTMicromotionSpectra(detvec,A,beta,x0,x1),label=f'beta: {beta}')
ii=ii+1