[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[IDV #QJR-730252]: ISL: Close an IDV display window after capturing an image, or better, dispense with a display window altogether



> IDV supporters,
> ‘
> I’m betting that the nature of your work means that you’re not spending all 
> of your “sheltering in place” time at home baking bread, streaming movies, 
> and playing with the kids (if any). :-)

Hi Dave,

We have been working from home for a little over a month now, it actually helps 
me to be more focused on some development tasks, and we will have the IDV 6.0 
version very soon. The
new development includes the zero longitudes subsetting, this is the longest 
delay feature and will be available soon.

> 
> Context:
> 
> I’m running IDV v5.7 on an iMac that is running Mac OS X v10.14 (Mojave).
> 
> Objective Using IDV:
> 
> I’ve attached two files:
> 
> (1) an IDV bundle (GOES_W_IR.RemoteDataAccess.xidv); and
> 
> (2) an IDV ISL script (GOES_W_IR.RemoteDataAccess.isl) that runs the IDV 
> bundle.
> 
> The IDV bundle does this: Via a Ramadda server running on virga.sfsu.edu, it 
> reads a subset of a GOES-West full disk infrared satellite image in NetCDF 
> format (for 00Z April 13, 2020), which resides on virga, and creates a 
> display of the image. Not very complicated. (Sampling the data file at 
> resolutions higher than the default is problematic, but that’s a different 
> issue.)
> 
> The ISL script does this: It loads the bundle described above, opens an IDV 
> window, creates the display in the window, and saves the display as a GIF 
> file. That’s it.
> 
> The Problem:
> 
> By messing around with the ISL script a bit, I managed to get it to create a 
> good GIF image from the IDV display. (I’ve attached a copy.)
> 
> To do this, I had to set the <isl> tag’s “offscreen” parameter to “false”. 
> The default is “true”, I think, but when “offscreen” is set to “true", the 
> image saved by the ISL script is, shall we say, not very close to what I’m 
> trying to capture. (I’ve attached a copy to contrast with the “good” version. 
> Note that this bad version includes some satellite image in it, which 
> previous attempts lacked—the output in most cases comprises only the skewed 
> map background with the angled 3-D wireframe box hovering above it.)
> 
> However, one consequence of setting “offscreen” to “true” is that the ISL 
> script opens an IDV window and generates a display in it, before capturing 
> the display in the GIF image. I can perhaps live with this (we’ll see), but 
> once the GIF image is created, the IDV display window remains open and the 
> script continues running, although it’s task is completed. The script 
> terminates only when I close the window manually.
> 
> So, my question. How can I either:
> 
> (1) Tell the ISL script, after it saves the GIF image of the display, to (a) 
> close the IDV window that it opened, and (b) terminate itself ?

I downloaded your bundle and script. It took too long to load the bundle, I 
guess your RAMADDA server is on a slow network. So I created a
bundle locally using the UNIDATA server, but attached to your script. It worked 
as expected. When the offscreen is set to true, the following
command in the xterm:

$./runIDV /Users/yuanho/downloads/GOES_W_IR.RemoteDataAccess.isl

will generate the image in your folder and you will not see any IDV window 
popup. You will get the message in your xterm like:

Tue Apr 14 10:32:01 MDT 2020: Writing 
image:/Users/yuanho/downloads/20041300_gwir.gif


If you want to produce those images in the cron job script, you don't have the 
x display environment, you need to use the xvnc or xvbf to create
the display environment. 


let me know if you need help with setting xvfb.

Yuian
> 
> or
> 
> (2) Tell the ISL script to create a successful display and capture it in an 
> acceptable GIF image without opening an IDV window at all (i.e., when the 
> <isl> tag parameter “offscreen” is set to “true”)?
> 
> Side Notes:
> 
> — Eventually I want to define a pqact.conf entry that launches an incidence 
> of "runIDV ISLscript” upon receipt of a satellite image, so it creates a GIF 
> image (for a Web server) automatically. I suspect that solution (2) above 
> will be necessary for that, since I bet that the script won’t be able to open 
> an IDV window on the server when launched that way.
> 
> — The attached ISL script, “GOES_W_IR.RemoteDataAccess.isl”, specifies full 
> paths to the IDV script that it invokes in the ISL <image> tag 
> (“GOES_W_IR.RemoteDataAccess.xidv") and to the GIF output file specified 
> using the ISL <image> tag (“20041300_gwir.gif”). If you want to test the 
> script yourself, you’ll need to edit those two paths appropriately.
> 
> 
> Regards to all of you,
> 
> — Dave
> 
> 
> The desired output, a GIF image of a GOES-West infrared satellite display. 
> The attached ISL script and xidv bundle create this when the “offscreen” 
> parameter of the <isl> tag in the ISL script is set to “false”.
> 
> 
> Not the desired output, a screwed up GIF image of a messed up GOES-West 
> infrared satellite display. The attached ISL script and xidv bundle create 
> this when the “offscreen” parameter of the <isl> tag in the ISL script is set 
> to “true”.
> 
> 
> 
> 
> 
> 
> 


Ticket Details
===================
Ticket ID: QJR-730252
Department: Support IDV
Priority: Normal
Status: Open
===================
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata 
inquiry tracking system and then made publicly available through the web.  If 
you do not want to have your interactions made available in this way, you must 
let us know in each email you send to us.