how to extract pixe array from a MappedVIIRSFlatField

Post any questions, ideas, or topics related to Jython and Python scripting.
Post Reply
User avatar
hproe
Posts: 504
Joined: Sat Nov 27, 2010 3:46 pm

how to extract pixe array from a MappedVIIRSFlatField

Post by hproe »

Hi -

I would like to extract the pixel array from the result of a loadVIIRSImage() request. In particular, I would I am interested in the pixel min/max values of a loaded DNB band.

BTW 'Imagery Suomi NPP' still is labeled as 'Under Development'. The satellite has just passed its 5 anniversary. Any activity going on to promote these functionalities some time in the future? Also, I cannot find documentation for 'loadVIIRSImage'.

thanks for any hints, HP
User avatar
bobc
Posts: 990
Joined: Mon Nov 15, 2010 5:57 pm

Re: how to extract pixe array from a MappedVIIRSFlatField

Post by bobc »

Hi HP -

You should be able to make use of McIDAS-V's describe() function or the getMinMax() JPythonMethod to get the min/max values of the data. For example, if you reference your data as 'viirsData' (viirsData=loadVIIRSImage(**viirsDictionary)) then you can run:

Code: Select all

describe(viirsData)

* This will print out a variety of statistical information about your data, including min and max. Depending on the number of granules and stride you are working with, this can take ~10-20 seconds to calculate and print out.

Code: Select all

minmax = getMinMax(viirsData)

* This returns an array containing the minimum and maximum values. You can return just the minimum value with 'print minmax[0]' and the maximum value with 'print minmax[1]'

Currently, since the Suomi NPP chooser is still considered to be under development, the only documentation on the chooser itself can be found in the Under Development forums. While there's no specific documentation on loadVIIRSImage(), you can look in the System>Background Processing Functions branch of the Jython Libraries. Specifically, see line 3646. There are comments throughout the function explaining the keywords that can be passed through loadVIIRSImage.

As far as the chooser being moved out of 'Under Development', I think we are pretty close. We fixed a pretty major issue in the 1.6 release where you previously couldn't subset across a missing scanline of SDR or EDR granules. There are still at least a couple of remaining issues. I know we wanted to improve how subsetting could be done in the Region tab of the Field Selector, and there are also issues with granules crossing the dateline. I'll bounce this off the programmer to see if there has been any progress on these fronts.

Please let me know if you have any questions.

Thanks -
Bob Carp
User avatar
hproe
Posts: 504
Joined: Sat Nov 27, 2010 3:46 pm

Re: how to extract pixe array from a MappedVIIRSFlatField

Post by hproe »

many thanks for the exhaustive answer/tutorial
HP
Post Reply