time = 0 # This will store the randomly generated data points, to be plotted as a # histogram. sampled_time_to_fire = [] # How long the time series will be. time_to_run = 50000.0 # Helper iterator. i = 0 # Loop to generate time series while time <= time_to_run: # Generate event new_event = FG.generate_fire_recurrence() # Adjust the time so it fits in with our time series. time_elapsed = new_event + fire_events[i] # Append our new events to the fire time series. fire_events.append(time_elapsed) # Append our sampled time to fire to create a historgram. sampled_time_to_fire.append(new_event) i+= 1 time = time_elapsed # Plotting the histogram to show the distribution.
time = 0 # This will store the randomly generated data points, to be plotted as a # histogram. sampled_time_to_fire = [] # How long the time series will be. time_to_run = 50000.0 # Helper iterator. i = 0 # Loop to generate time series while time <= time_to_run: # Generate event new_event = FG.generate_fire_recurrence() # Adjust the time so it fits in with our time series. time_elapsed = new_event + fire_events[i] # Append our new events to the fire time series. fire_events.append(time_elapsed) # Append our sampled time to fire to create a historgram. sampled_time_to_fire.append(new_event) i += 1 time = time_elapsed # Plotting the histogram to show the distribution. plt.figure(1) plt.hist(sampled_time_to_fire)