#1624 closed enhancement (fixed)
i.tasscap speedup
Reported by: | sprice | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 7.0.0 |
Component: | Python | Version: | svn-trunk |
Keywords: | needinfo, i.tasscap | Cc: | |
CPU: | All | Platform: | All |
Description
I made two changes to the i.tasscap script for a nice speedup. First I combined all outputs into one mapcalc() call, resulting in a ~9% speedup. Then I added an option to skip outputting the 'haze' raster for a total ~41% speedup. I also converted all tabs to spaces for consistency. Attached is the diff.
Attachments (6)
Change History (13)
by , 13 years ago
Attachment: | tasscap.diff added |
---|
by , 13 years ago
Attachment: | tasscap.2.diff added |
---|
by , 13 years ago
Attachment: | i.tasscap.py added |
---|
bugfix for L4 and changed it to floats, because double precision doesn't make sense with the given constants
by , 12 years ago
Attachment: | i.tasscap.2.py added |
---|
Updated the syntax to work correctly under Mac 10.8.2's python install
by , 12 years ago
Attachment: | i.tasscap.seth.diff added |
---|
diff of latest i.tasscap.2.py vs svn trunk r55670.
follow-up: 3 comment:1 by , 12 years ago
ps- where do we stand on 8 spaces vs. 1 tab in python scripts?
comment:2 by , 12 years ago
Component: | Default → Python |
---|---|
CPU: | Unspecified → All |
Keywords: | i.tasscap added |
Platform: | Unspecified → All |
comment:3 by , 12 years ago
by , 11 years ago
Attachment: | i.tasscap.diff added |
---|
update to the last svn versione and fix indentation according to PEP8
comment:4 by , 11 years ago
Replying to sprice:
I made two changes to the i.tasscap script for a nice speedup. First I combined all outputs into one mapcalc() call, resulting in a ~9% speedup. Then I added an option to skip outputting the 'haze' raster for a total ~41% speedup. I also converted all tabs to spaces for consistency. Attached is the diff.
I tested the patch, with the updates of indentation that you can find in the last attachment, but in my case the script is slower then the old one, I'm using time to test the speed.
With the North Carolina landsat I obtain this value with the old version
real 0.84 user 0.70 sys 0.09
and this with the new one
real 0.85 user 0.73 sys 0.08
With bigger files the result is this, old
real 166.72 user 145.94 sys 4.79
new
real 169.69 user 146.95 sys 4.70
Please can you test again and send us your results?
comment:5 by , 10 years ago
Keywords: | needinfo added |
---|
comment:6 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
After two years no additional info was provided.
Closing ticket, please reopen if needed
comment:7 by , 9 years ago
For the record:
from what I see, most improvements where included except for the option to skip outputting the 'haze' raster map (I compared the proposed i.tasscap.2.py to current trunk r67875).
The indicated major speed gain would probably come from skiping the output of the Landsat related 'haze' raster map. If that's important, please reopen.
updated to format floats