[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
20010816: McIDAS: map overlays bar and refresh problems
- Subject: 20010816: McIDAS: map overlays bar and refresh problems
- Date: Fri, 17 Aug 2001 22:03:11 -0600
>From: Christian Page <address@hidden>
>Organization: Universite du Quebec a Montreal
>Keywords: 200108161336.f7GDaa129316 McIDAS scripts
Christian,
>I am writing a shell script to draw some sat images as follows (example for
>one of the images):
>
>mcenv -f 512x512 <<'EOF'
>logon.k USER 0278
>imgdisp.k RTGINI/GE4KIR STA=CYYZ MAG=-2 EU=XREC
>eg.k 1
>map.k H
>bar.k COL=1 SU=TEMPC
>frmsave.k 1 aa.gif
>exit
>EOF
You didn't include the settings for the needed McIDAS environment variables:
MCDATA, MCPATH, PATH, etc, but I think that you know enough to have these
set correctly at the beginning of the script.
>XREC is my own color table.
OK.
>First question:
>Is it possible to have black and white colors in addition to the 256 colors in
>my table (it goes from dark blue to dark red)? This would be used for frmlabel
>and bar label color (they are not very readable now in magenta).
Yes. There is no difference between shades of gray and colorful colors
as far as McIDAS enhancement tables are concerned.
>2nd question:
>When using the code above, the map is overlaying my bar. Is it possible not
>to? (Example http://meteocentre.com/aa/aa.gif )
You can tell MAP to only draw on a specific portion of the frame. This
is done by specifying the LIN= and ELE= keywords. LIN= will restrict graphics
to the range of LINes (lines are rows); ELE= will restrict graphics to
the range of ELEments (elements are columns).
For instance, you might want to change your map.k invocation to:
map.k H ELE=1 462
You will need to play around with the ELE= setting to get the best plot.
By the way, I assume that the example you show was to demonstrate how
the graphics can overlay the bar, since it does show this.
>3rd question:
>I tried to use REFRESH in imgdisp.k without success, I was always getting an
>error saying that :
>
>MAP: Failed to attach to shared memory -- Lock Graphics frame 2
>Program terminated, segmentation violation
>MAP failed, rc=1
I think that what is going on here is that the shared memory that represents
the frame is being destroyed before the MAP process spawned by the REFRESH=
specification has had a chance to run. You could try adding a sleep in
the plot sequence to force the frame to stay viable until the things
running out of REFRESH= are finished:
mcenv -f 1@512x512 <<'EOF'
logon.k USER 0278
imgdisp.k RTGINI/GE4KIR STA=CYYZ MAG=-2 EU=XREC REFRESH='EG;MAP H;BAR COL=1
SU=TEMPC'
wait.k
frmsave.k 1 aa.gif
exit
EOF
>or that I didn't have a navigation frame. I was using:
>
>imgdisp.k RTGINI/GE4KIR STA=CYYZ MAG=-2 EU=XREC SF=YES REFRESH='EG;MAP H;BAR C
> OL=1 SU=TEMPC'
This should have been OK as long as the REFRESH= actions were run before
the 'exit' was hit.
>Any hint?
Try adding the wait.k line and see what happens.
>Thanks,
Please let me know the results of the wait.k addition.
Tom