Opened 11 years ago

Closed 10 years ago

#2057 closed enhancement (fixed)

Expand i.oif.py to work with any number of multi-spectral bands

Reported by: Nikos Alexandris Owned by: grass-dev@…
Priority: normal Milestone: 7.0.0
Component: Imagery Version: unspecified
Keywords: i.oif, i.oif.py, oif, permutations Cc:
CPU: Unspecified Platform: Unspecified

Description

I see no reason for i.oif.py 1) to work only with Landsat5 TM bands, 2) to not accept a user-desired number of spectral bands as an input. See also: http://lists.osgeo.org/pipermail/grass-dev/2013-May/063975.html.

Attached a quick change that makes i.oif.py read 8 spectral bands and perform OIF calculations for 56 combinations (justified by the need to try the script in an 8-band WorldView2 acquisition which features 8 spectral bands).

It would be nice if the module would accept any number (4 or greater) of spectral bands as an input and derive the OIF for all possible combinations of the requested bands. I don't know if it really makes sense for high-dimensional data, such as ones acquired by hyper-spectral sensors -- no experience.

Changing the number of permutations (see def perms() in the script) is I guess not that hard. At least, I think so. I have no idea about how to count how many spectral bands are fed in to the module, so as to adjust the number of permutations that the module should yield.

Are there any other similar scripts? Are there any "hard" restrictions for a maximum number of bands to combined and derive OIF stats?

Attachments (1)

i.oif_for_8_bands.diff (2.5 KB ) - added by Nikos Alexandris 11 years ago.
Example diff to customise i.oif.py script so as to work with 8 bands

Download all attachments as: .zip

Change History (2)

by Nikos Alexandris, 11 years ago

Attachment: i.oif_for_8_bands.diff added

Example diff to customise i.oif.py script so as to work with 8 bands

in reply to:  description comment:1 by lucadelu, 10 years ago

Resolution: fixed
Status: newclosed

Hi,

I implemented the diff and improved it, now you are able to use at least 4 bands and there is no maximum limitation.

I close the ticket, please reopen if needed.

Note: See TracTickets for help on using tickets.