So I have a script that calculates a diameter of a crater of an asteroid with user input parameters. what i need help with is creating a buffer that brings in the diameter as the distance value and creates a buffer around different point locations. I can't seem to find a way to bring the value into the buffer tool. I have also tried to find a way to just add the distance to layer i want to do a buffer around as an attribute.
def main():
import arcpy
velocity = arcpy.GetParameter(0)
mass = arcpy.GetParameter(1)
component = GetParameterAsText(2)
dct_mat = {'ice' : 1.8, 'iron' : 7.3, 'rock' : 2.3}
comp = dct_mat[component]
grav = (0.16667)
const = (0.007)
colrt = (1.3)
soil = (2.65)
power = (1.0/3.4)
vel = (velocity * 1000.0)
kilotons = (4184000000000.0)
kinetic = (0.5 * mass * (vel ** 2))
energy = (kinetic * kilotons)
part1 = (const * colrt * grav)
part2 = (comp / soil)
part3 = (energy * part2)
part4 = (part3 ** power)
crater = (part1 * part4)
final = (crater / int(1000))
arcpy.SetParameter(3, final)
arcpy.AddMessage("final: {}".format(final))
if __name__ == '_main_':
main()
here is the script i'm using. also i cant get the message to work but that isn't as important right now.