I am trying to figure out the formula on this link, and create a quadratic calculator that works each way basically. At this point I am only trying to calculate the beam angel using throw distance and spot size using the Full Width Half Maximum (FWHM) Angle method. I have a basic python program but my results are never similar to what this website calcualtes. I know its a long shot but any suggestions would be greatly appriciated:
import math
def calculate_beam_angle(throw_distance, spot_size):
# Calculate the half-maximum angle
half_max_angle = math.atan(spot_size / throw_distance)
# Convert the half-maximum angle to degrees
half_max_angle_degrees = math.degrees(half_max_angle)
# Calculate the Full Width Half Maximum (FWHM) angle
fwhm_angle = 2 * half_max_angle_degrees
return fwhm_angle
# Example usage
throw_dist = float(input("Enter the throw distance (in inches): "))
spot_size = float(input("Enter the spot size (in inches): "))
beam_angle = calculate_beam_angle(throw_dist, spot_size)
print("The beam angle is", beam_angle, "degrees.")
e. g. I have 100 for throw distance and 50 for spot size and I should be getting 28.07 for beam angel. but using this program I am getting 53.