Can't make a simple smooth edge RGB in GUI or script

Post any questions, ideas, or topics related to Jython and Python scripting.
User avatar
bobc
Posts: 990
Joined: Mon Nov 15, 2010 5:57 pm

Re: Can't make a simple smooth edge RGB in GUI or script

Post by bobc »

Hi Ghansham -

I agree that sending your code to the help desk would be good. This will allow us to test the changes, add it to our inquiry system, and then pass it off to a programmer to be implemented into McIDAS-V assuming there are no concerns on our end.

Thanks -
Bob
User avatar
ghansham
Posts: 175
Joined: Thu Nov 11, 2010 5:40 pm

Re: Can't make a simple smooth edge RGB in GUI or script

Post by ghansham »

Hi
Can you post a sample nc file which you are trying with bands to be used for RGB.
May be you can put it on ftp.
I can send the code as well a testplugin using the code to test the modified control.
Regards
Ghansham
User avatar
bobc
Posts: 990
Joined: Mon Nov 15, 2010 5:57 pm

Re: Can't make a simple smooth edge RGB in GUI or script

Post by bobc »

Hi Ghansham -

I put three ABI NetCDF files on our ftp:

ftp://ftp.ssec.wisc.edu/pub/incoming/OR ... 1926179.nc
ftp://ftp.ssec.wisc.edu/pub/incoming/OR ... 1926180.nc
ftp://ftp.ssec.wisc.edu/pub/incoming/OR ... 1926178.nc

I see that Kaba's original file is no longer on ftp. If you need this one (in addition to the ABI files currently on ftp) let me know and I'll check with Kaba.

I was creating the RGB in my testing as follows:
Red = Band 5
Green = Band 3
Blue = Band 1
I chose these three bands because they are all the same resolution (1.0 km).

Thanks again -
Bob
User avatar
ghansham
Posts: 175
Joined: Thu Nov 11, 2010 5:40 pm

Re: Can't make a simple smooth edge RGB in GUI or script

Post by ghansham »

Hi

Thanks for all the files. I will get back to you on this at the earliest.
May be by tomorrow.

Regards
Ghansham
User avatar
joleenf
Posts: 1123
Joined: Mon Jan 19, 2009 7:16 pm

Re: Can't make a simple smooth edge RGB in GUI or script

Post by joleenf »

Hi,

I posted one of Kaba's files. This is an AHI file. I think one of the problems may be that the AHI fixed grid format is not recognized in McIDAS-V, so Kaba has placed the lat/lons in the file along with four bands. This makes the file very large.

ftp://ftp.ssec.wisc.edu/pub/ssec/joleen ... INH_65_.nc

Joleen
User avatar
kaba
Posts: 51
Joined: Tue Mar 24, 2009 2:52 pm

Re: Can't make a simple smooth edge RGB in GUI or script

Post by kaba »

thanks guys,
I am looking forward to trying the new fix.
User avatar
ghansham
Posts: 175
Joined: Thu Nov 11, 2010 5:40 pm

Re: Can't make a simple smooth edge RGB in GUI or script

Post by ghansham »

Hi all,
Joleen you are able to point it rght.
If the geometry of image is being generated using
plain GriddedSet of LongitudeLatitudeTuple, then this kind of issue comes.
Another possibility is that if the geometry's reference coordinate system is
edu.wisc.ssec.mscidasv.data.hydra.LongitudeLatitudeCoordinateSystem which extends visad.CoordinateSystem
and not visad.georef.MapProjection this kind of issue can occur. I am seeing in github, the aforementioned class is extending visad.CoordinateSystem.
You can start digging out on these lines. I will also try to see by looking into the AHI product.
I hv checked my rgb control and curent mcidasv rgb control and github are similar.
Somebody can do some jython stuff to print flatfield coordinate system class if it is there or if it is not using
a coordinatesystem then gridded set tuple might be EarthSpatialTuple2D which is built if you load data
using IDV default grid data source. Can anybody confiirm if its loaded using IDV grid data source?


Regards
Ghansham
User avatar
ghansham
Posts: 175
Joined: Thu Nov 11, 2010 5:40 pm

Re: Can't make a simple smooth edge RGB in GUI or script

Post by ghansham »

Hi all

After seeing what joleen posted as the snapshots of loading extra data to reset projection suggests that
the projection of the RGB composite is not the way it is there in single band.

So I am sure the jython exercise of dumping the coordinate system of rgb flatfield and that of single band will help to understand the issue.




I will get back to you on this soon.

regards
Ghansham
User avatar
ghansham
Posts: 175
Joined: Thu Nov 11, 2010 5:40 pm

Re: Can't make a simple smooth edge RGB in GUI or script

Post by ghansham »

Hi all

Can anybody is the single band image display for Himawari Image smooth?
And using which datasource is it being loaded? GeoGridData source or something else?



regards
Ghansham
User avatar
ghansham
Posts: 175
Joined: Thu Nov 11, 2010 5:40 pm

Re: Can't make a simple smooth edge RGB in GUI or script

Post by ghansham »

Hi All

I am sending you the plugin and attached snapshot.

You can give a try to the HIMAWARI file uploaded by Joleen.

It takes care of those cases where the lat/lon arrays are packed in the product and
the variables have coordinates attribute referencing those lat/lon arrays as coordinates.

Also attached the snapshot generated using this plugin.

You should be able to use this in MciDAS-V.
In my plugin I am also using the class written by TomR Sir (LongitudeLatitudeCoordinateSystem that is part of McV).
I have pulled that class out of McV and made part of my plugin. Thanks to that wonderful piece of code.

I did it using IDV. I had plugged in the RGBCompositeControl of McV as plugin in IDV.

Just let me know if you have issues.

Another interesting part is you need not use RGB Control (auto-scale) to generate that RGB.
And interesting thing is it reads lat/lon arrays once for all three bands which is not the case when we are using formula RGB(Autoscale)
so it should take less time and less memory.


I have created a data source that provides you additional choice where you can select which bands you want to combine
from the data selection panel.
This plugin is pretty rudimentry in the sense. It does not allow time stacking multiple images. And it does not allow subsetting.
This is all doable. Because I have done it for my INSAT data. But this is first cut from me which actually is kind of proof of concept.
Later on we can add such functionality.

I was not sure I will be able to upload it here. So I have mailed the same to Joleen and Bob.

Looking forward to hear from all of you.




regards
Ghansham.
Attachments
rgb_composite_hmw.jpg
L1BLLAdapter.jar
(23.33 KiB) Downloaded 308 times
Post Reply