Closed johngallo closed 3 years ago
I was looking at this in more detail today, and realized that this new method of calculating the relative permeability of each linkage can be done during the Linkage Pathways run (all the pieces are made there). That way, this product can be available to all users even if they do not run Linkage Priority Tool.
It will be more difficult to do this however. A place to start is to looking in the linkgage pathways code for all places related to the cwd_to_path_length_Ratio field. and, I have a mock up of the code from there in model builder that is available for examination.
make a field called Rel_Perm (Relative Permeability) and that will be the inverse score range normalization of the above.
Inverse score range normalization (ISRN): scoring all values in a data column from 0-1 and then taking the highest original value and making it the new minimum once processed and viceversa.
-->>(max_val - x)/(max_val - min_val) <<-- x = original field (Cwd:pathlength ratio) max,min_val = original column values (w/ respects to data value "significance")
LP "defined object" for ISRN that can be derived for this tool... Defined as normalize_raster (optional inversion included). Lines 32-52 in lp_main (derive).
lm_util, Line 1946: mention of cwd2Path where it is deleted; Commence Edits: line 846
A cumbersome way of doing the above, from modelbuilder, saved as a python script. Best to read from the Add Field Command down.
Permeability calculation successfully implemented in lp_main.py. This calculation should be place in lm_util later on for easier access.
Fixed with #85.
right now, raw perm is LCP length (the smaller number) divided by Cost weighted distance of the LCP. (the larger number).
just like 1/2, 1/3, 1/4, 1/5 does not have the same relative difference between values as 2/1, 3/1, 4/1, and 5/1 the above applies.
So, you get a much more normal distribution if you do the inverse of the above. That is a field that already exists: cwd_to_Path_Length_Ratio The quick fix is to delete "Raw Perm" and to just use cwd_to_path_length_Ratio as the raw input, and then to make new option in LP_Settings to do Inverse Score Range Normalization, then set this as the default for this , yielding Rel_Perm.
For now, this can be done in a post processing model, then patched in as an expert opinion variable. And give the Rel_perm a weight of 0.