RGB for MTSAT using jyhton shell

Post any questions, ideas, or topics related to Jython and Python scripting.
User avatar
rosmadinor
Posts: 13
Joined: Tue Jun 12, 2012 2:36 am

RGB for MTSAT using jyhton shell

Post by rosmadinor »

Hello,

Right now i'm trying to write a script in jyhthon shell using the old script that have been discussed in this forum. But the output is does not right with my final jpeg that i've produced manually.

Here is the manual step that i've been doing.

chooseRGB.png


fieldselector.png


a_b.png


and this my final picture.

RGB.jpg


but when i'm using the jyhton shell, the picture is totally different. Maybe i don't have enough knowledge about the scripting method.

The RGB image is supposed include {vis(brit) , ir4(temp) , (ir4(temp)-ir1(temp)) }.

My project is to detect the hotspot using MTSAT satellite.

This is my script.

try_hotspot.txt
(1.26 KiB) Downloaded 445 times


And this is the product using that script.


Hope anyone can help me regarding this matter. This is my first trial using jyhton shell. Regards -rosmadinor-
Attachments
finalproduct.png
User avatar
mhiley
Posts: 90
Joined: Mon Jan 23, 2012 10:22 pm

Re: RGB for MTSAT using jyhton shell

Post by mhiley »

Hi rosmadinor,

This is just a guess, but one thing I notice is that you are using a different display control in your script ("3 Color (RGB) Image" instead of "RGB Composite"). In other words, you might try changing your createLayer to look like this:

Code: Select all

imLayer=panel[0].createLayer('RGB Composite',productData)

Mike
User avatar
mug_admin
Site Admin
Posts: 87
Joined: Thu Dec 18, 2008 9:31 pm

Re: RGB for MTSAT using jyhton shell

Post by mug_admin »

Hi rosmadinor,

Just a note that we moved this topic from the General Questions forum to the Scripting forum because your question is about using the Jython shell. (You can find a listing of all the forums on the McIDAS-V Support Forums home page - http://mcidas.ssec.wisc.edu/forums/.)
User avatar
rosmadinor
Posts: 13
Joined: Tue Jun 12, 2012 2:36 am

Re: RGB for MTSAT using jyhton shell

Post by rosmadinor »

Hi Mike...

Tq for your answer. But the outsput is still not the same with mine manually projected image.

The projected image using jyhton shell is like this.

test_RGB.jpg


Manually projected image.

RGB.jpg


And my script.

try_hotspot.txt
(1.26 KiB) Downloaded 412 times


Tq for your help Mike.
User avatar
joleenf
Posts: 1123
Joined: Mon Jan 19, 2009 7:16 pm

Re: RGB for MTSAT using jyhton shell

Post by joleenf »

Hi,

I am wondering if you could send a screen shot of the layer control for the RGB composite when you display the RGB through the interactive session.
I am wondering if there might be a difference in the final ranges for the red, green and blue color guns.

Thanks,
Joleen
User avatar
rosmadinor
Posts: 13
Joined: Tue Jun 12, 2012 2:36 am

Re: RGB for MTSAT using jyhton shell

Post by rosmadinor »

Hi Joleen,

Thanks for helping me..

Here is the screen shot...

layer.png


Hope you can help me.

Thanks..

Regards..

Rosmadinor
User avatar
jayh
Posts: 424
Joined: Thu Jan 15, 2009 10:34 pm

Re: RGB for MTSAT using jyhton shell

Post by jayh »

Hello-

I've been working with Joleen and Mike and we are stumped at the differences. When I do the RGB interactive with some MTSAT data, I'm getting something that looks like test_RGB.jpg. None of us have recreated your desired output of RGB.jpg, not even interactively.

Could you send us some more information?
1. Please recreate the interactive image, and could you post another screenshot of the layer controls (like layer.png)?

2. After that, could you please save your session as a zipped bundle. From the Main Display menu choose File -> Save Bundle, then make sure the Files of Type: is "McIDAS-V Zipped Data Bundles *.mcvz." Please post the bundle to the forum and we can take a look at it here.

Hopefully this information will lead us to the answer.

Thanks, Jay
McIDAS User Services
User avatar
rosmadinor
Posts: 13
Joined: Tue Jun 12, 2012 2:36 am

Re: RGB for MTSAT using jyhton shell

Post by rosmadinor »

Hello Jayh..

Thanks for helping me.

I will recreate the interactive image and additionally i add up the new mtsat data via ftp. For all the time i'm using this data.

Step 1..

1.png


Step 2..

2.png


Step 3..

3.png


Step 4..

4.png


Step 5..

5.png


Step 6..

6.png


So this all my step.

Thank Jayh.
User avatar
rosmadinor
Posts: 13
Joined: Tue Jun 12, 2012 2:36 am

Re: RGB for MTSAT using jyhton shell

Post by rosmadinor »

The bundle data size is almost 6Mb. So i have put the data in your ftp server with the mtsat data (IMG_*_201209230532*)

The file name is 0532bundles.mcvz

Thanks again Jayh.
User avatar
mhiley
Posts: 90
Joined: Mon Jan 23, 2012 10:22 pm

Re: RGB for MTSAT using jyhton shell

Post by mhiley »

OK I was finally able to reproduce the desired (blue-ish yellow-ish) RGB (using both the data supplied by Rosmadinor and our MTSAT archive).

I don't at all understand why, but the trick seems to be explicitly specifying the geographic selection in the in the red/green/blue field selector window (see "Step 3" in Rosmadinor's latest post). If I instead use the "shift-left-click" method to specify my geographic selection in the "Region" tab at this step, I get the undesired green/magenta version.

Another note about "Step 3" in Rosmadinor's latest post: The only way I can get the geographic area I want is if I work "right to left" in this step. In other words: I select the Blue and Green fields before the Red field.

I suspect all this is somehow related to the differing resolutions of the visible vs. infrared channels, and I think if we can figure out what is going on here it will help us get the scripting part figured out also. But for now I'm not sure where to go from here.

Mike

(EDIT: corrected my 3rd paragraph to read "right to left")
Post Reply