QUIC-Fire-TT / ttrs_quicfire

ttrs_quicfire is a Python library to easily configure burn models for plots of land defined using shape files for the quicfire model.
MIT License
0 stars 1 forks source link

Add files via upload #12

Closed Kcbeely closed 2 years ago

Kcbeely commented 2 years ago

Description

Describe the changes that have been made in detail. Added ignition_timing_array to the main ttrs_quicfire source files.

Motivation and Context

Describe why the changes have been made and what they can be used for. This file was requested by a partner and gives an array the size of the burn plot. Every cell is equal to -1 to start. The program reads ignite.dat to set an aerial or atv ignition. Every cell that gets ignited is updated to contain the time of ignition. Uses Bresenham's line algorithm to draw line ignitions and ignite appropriate cells. For example, a 5 x 5 plot with a line fire will look as follows. -1 -1 -1 -1 -1 -1 1 -1 -1 -1 -1 2 -1 -1 -1 -1 3 -1 -1 -1 -1 -1 -1 -1 -1 Where 1 is the start of the fire and 3 is the end. Each number is in seconds.

Test Cases

Describe your test cases and intended ouputs and if applicable include any necessary files or screenshots. This has been tested extensively for atv line fires. The line algorithm determines which direction the slope of the intended line moves and switches x and y values appropriately. Cell are then ignited if the slope of the original line does not stray too far from the slope calculated with that cell. This allows the line to be represented by cells with the same x value and different y values to give a much cleaner picture. Aerial fires also work and are much simpler and so did not require as extensive testing.

IF THERE IS AN OPEN ISSUE FOR THIS PULL REQUEST LINK IT HERE

Cheklist

zacharycope0 commented 2 years ago

How does this fit into the larger ttrs_quicfire library? This is for visualizing ignitions?

Kcbeely commented 2 years ago

Yes, this array would show how the fire travelled and at what times each cell ignited without using any other visualization software. This is also where I was told to put it, as a partner requested this and this would allow access to everyone. Is there somewhere better for this to go?

zacharycope0 commented 2 years ago

Maybe we could make a visualizations folder for those that want to pull it directly from github. As its set up now, functions from your script would be available with the import ttrs_quicfire call.

Kcbeely commented 2 years ago

Ok sounds good. What should I do?

zacharycope0 commented 2 years ago

There are two options. 1) If you think the scripts will be relevant to people using this QF library you can make a seperate folder in the Repo titled "Visualization_Scripts" or something like that. In the folder you should include a README.md that explains the purpose of the scripts that you are housing there. Also comment the code so that people will know how to use your scripts (where/when to run them). 2) Otherwise, if this script is really on relevant to a specific project then it should be part of a different Repo.