How do you pick out values from an array which were used to calculate another set of values which meet a certain condition?

Viewed 25

I have used a list of velocities to calculate a list of distances. From that list of distances, I created another list which composes the stopping distances under 5cm. I want to now make another array with the corresponding velocities used to calculate the stopping distances, but I am unsure of how to do this.

# Calculating the scattering force and the distance travelled by scattered particles
for F in v:
    delta = delta_omega + (k*v) #result of detuning the laser
    F = hbar * k * (L/2) * ((Rabi**2/2)/(delta**2+(Rabi**2/2)+(L**2/4)))
    accn = F/m_Rb
    v_final = 0
    s = abs((v_final**2-v**2)/(2*accn))

# Selecting the stopping lengths within the MOT
s_stopping = []
for x in s:
    if x<length:
        s_stopping.append(x)
0 Answers
Related