Page 1 of 2

GOES-16 Satellite Image - Move to Back? / Re-order Layers

Posted: Fri Jul 27, 2018 6:06 pm
by mcwillms
Hello,

I am having an issue with GOES-16 Satellite Image data loading on top of the Map and Location Layers. Previously (with GOES-15 data / McIDAS Area data) the satellite imagery would load underneath the map and locations, where the country boundaries are visible as well as the locations selected.

If I use the GUI, I can go to the "Layer Controls" tab and select View -> Bring To Front, for both the map and location layer and they will be moved on top of the satellite image. However, I am unable to do this programmatically.

I have tried using X.setVerticalPosition(Y) where X = Layer Object and Y = value between -1 and 1.

example:

Code: Select all

# 0 = Map Layer
# 1 = Locations Layer
# 2 = Image Data Layer / Sat Image Layer
layers = [0,1,2]
z_pos = [1, 0, -1]
for i, layer in enumerate(layers):
    activeDisplay().getLayers()[layers[i]].setVerticalPosition(z_pos[i])


I am wondering:

1. Is there a call similar to "bring to front" using Jython?
2. Is the setVerticalPosition() not working correctly/am I using it incorrectly?
3. Is there anyway to have the GOES-16 data load into the back position like the GOES-15/McIDAS Area data did previously?

I have attached an image to hopefully provide more clarity.

Lastly, I am running McIDAS-V 1.7u1 on Linux (centos-7).

Re: GOES-16 Satellite Image - Move to Back? / Re-order Layers

Posted: Fri Jul 27, 2018 6:46 pm
by bobc
Hello,

I'm having difficulty replicating the problem you're seeing of the data overlapping the map. Would you mind giving me a step-by-step of how you're creating your display?

As for using the "Bring To Front" functionality through scripting, you can use the following:

Code: Select all

layer.displayableToFront()

... where you'd substitute in your layer name in place of "layer" above.

For your second point, it appears that you are using setVerticalPosition() correctly. I ran those lines of code and if I right-click+drag to rotate the display, I see the map all the way at the top, the location labels in the middle, and the GOES-16 data on the bottom. Since you're specifying each layer by its index, having this work would mean that you started with a standard display panel with a map, added your location labels, and then displayed your satellite data. When you run these commands and rotate the display, does it look like things are correct?

Thanks,
Bob Carp
McIDAS Help Desk

Re: GOES-16 Satellite Image - Move to Back? / Re-order Layers

Posted: Fri Jul 27, 2018 8:34 pm
by mcwillms
I sure can.

First a quick way to replicate using the GUI:

new McIDAS window -> add labels (any will do, lets say US States) -> Data Sources (Server: lead.unidata.ucar.edu -> RTGOESR -> CONUSC02 - GOES-16 0.64 um VIS....)

that will load the image infront of the map.


now you can run bring to front on the Map and nothing will happen.

Attached is an image of running the .displayToFront() command in the Jython window and confirmation of the layer that is being acted on.


This is how I do it via jython:

I first load a bundle. The bundle has the map as the bottom layer, with a second layer that has the location data in a second layer.

This is a quick version of what occurs:

Code: Select all

vis_data_set = makeLocalADDEEntry(dataset='GOESW16',
                                          mask=d,
                                          format='GOES-16 ABI',  # ''McIDAS Area',
                                          save=False)

dir_list = listADDEImages(server='localhost',
                               position='ALL',
                               unit=unit_type,
                               localEntry=data_set,
                               debug=False, )

for x in range(0, len(dir_list)):
    bundle_path = os.path.expandvars("path/to/bundle")
    panel = openBundle(bundle_path, None, 500, 500)

    # I believe loadADDEImage is the preferred method now
    meta_data, image_data = getADDEImage(size=(2500, 2500),
                                                         coordinateSystem=LATLON,
                                                         location=(43, -79),
                                                         place=Places.CENTER,
                                                         dir_list[x])

    data_layer = panel.createLayer('Image Display', image_data)
    panel.captureImage('/path/to/save.png', formatting=f)



That generates the image I sent you.

If I add something like this:

Code: Select all

# Map = 0 
# Location = 1
# Image Data = 2
for i in range(0, 2):
    print('moving layer index: [{}] to front'.format(i))
    activeDisplay().getLayer(i).displayableToFront()


The location labels now move to the front, but the map layer is still behind the image data.


NOTE: I have tried to replicate in Windows and I cannot. Things load fine in Windows, I believe this to be a Linux-specific issue.

Re: GOES-16 Satellite Image - Move to Back? / Re-order Layers

Posted: Sat Jul 28, 2018 1:11 pm
by joleenf
Hi Bob,

I have had this problem with GOES-16 as well. I have noticed this problem on both the Linux X86 machines and on IOS 10.10.15. The problem does not consistently appear when displaying one layer, but often appears when displaying multiple layers. However, occasionally the map disappear for a single layer display of GOES-16. I can't figure out why this problem is occurring and the solution does not seem to be consistent between the mac and linux machine. In the last month, due to a slight change in the code I was using, I started using setVerticalPosition. I found that this worked on the IOS machine, but not on x86. I found that the easiest way to reduce the problem (thought not consistently solve the problem) was do do nothing with the map (don't set the vertical position and mapLayer.displayableToFront()() did not work).

- On the current X86 machine: three layers are being displayed (ir for the color bar, visible image, rgb overlay on top of the visible). The data projection is being used for these layers and a scaleFactor is applied. The data is not clipped at the box and the wireframe box is turned off.

Joleen

Re: GOES-16 Satellite Image - Move to Back? / Re-order Layers

Posted: Mon Jul 30, 2018 2:50 pm
by bobc
Thanks Joleen and mcwillms for the thorough description of the problem. We actually had another user report this to us last week who ran into the problem on a Windows machine, but Linux (Ubuntu) worked fine. I wrote this up as Inquiry 2700 and sent it to the programmers to get their thoughts. I'll keep trying to replicate this bug myself, though I've been unsuccessful at doing so on Windows 7 and one of our Linux machines.

Joleen, you're running a nightly, correct?

Thanks,
Bob

Re: GOES-16 Satellite Image - Move to Back? / Re-order Layers

Posted: Wed Aug 01, 2018 4:03 pm
by mcwillms
Hi Bob,

Thanks for submitting the Inquiry. Two questions:

1. Is there a timeline for this bug to be resolved?

2. I've been trying to get the nightly builds working. I'm running into a number of Java exceptions when attempting to create the linux installers. Is there a guide anywhere for compiling the McIDAS-V code from the git repo / could you point me towards the appropriate linux jres required for installj4 to run properly?


Thanks

Re: GOES-16 Satellite Image - Move to Back? / Re-order Layers

Posted: Thu Aug 02, 2018 12:44 pm
by joleenf
Hi Bob,

I am running the nightly.

Joleen

Re: GOES-16 Satellite Image - Move to Back? / Re-order Layers

Posted: Thu Aug 02, 2018 8:15 pm
by bobc
Hello,

Thanks for letting us know, Joleen.

mcwillms:

  1. I do not have an estimate as of right now on when this will be fixed. I've checked several of our machines and I'm still unable to reproduce the problem regardless of the number of layers I have in my display. If there are any developments with this, I'll let you know.
  2. I'll check with our programmer for how to build McIDAS-V from GitHub. We do, however, have a webpage that has installers already on it:
    https://www.ssec.wisc.edu/mcidas/software/v/unstable/
    The login and password are both: mcv
    Note that these installers are automatically created every day with all of the previous day's programming changes. This means that not everything in the nightly has been fully tested and there may be bugs. However, if you do have any problems with the nightly, please let us know. Are you able to use these nightlies, or are you still interested in creating installers directly off GitHub?

Thanks,
Bob

Re: GOES-16 Satellite Image - Move to Back? / Re-order Layers

Posted: Fri Aug 03, 2018 5:39 pm
by mcwillms
Hi Bob,

I downloaded the latest nightly build. The issue does not exist there! It looks like the problem is specific to McIDAS v1.7_u1
I would maybe recommend updating the default linux download for McIDAS-V on the webpage?

And again, thank you very much for the information provided, and all the work you've put in.


Thanks,

Mark

Re: GOES-16 Satellite Image - Move to Back? / Re-order Layers

Posted: Mon Aug 06, 2018 2:41 pm
by bobc
Thanks for following up, mcwillms. I'm glad that the 1.8beta1 nightly build is working better for you! We aren't at the point where we can replace the existing 1.7u1 installers with the 1.8beta1 ones, but it's good to know that if users report this we can suggest trying the nightly. Please let us know if you have any problems with the nightly.

Joleen, we are still investigating this problem since you reported that you see it in the nightly. If you are able to find a process that seems to reproduce the problem on your machine please let us know.

Thanks again,
Bob