There was a comment at the MUG meeting that areas could not be saved similar to IMGCOPY. Here is a crude way to execute an image copy.
# The contents of the AreaFile call was copied directly from the Field Selector. This data was loaded through the chooser.
# Right click on the data and select properties>Details. This information was under location, BAND=ALL was changed to BAND=10.
# The copy was not necessary, the information is listed under the ADDEURLConnection API at
# http://www.ssec.wisc.edu/visad-docs/jav ... dex-1.html
from edu.wisc.ssec.mcidas import AreaFile as af;
remote_area= af("adde://easts.ssec.wisc.edu/imagedata?&PORT=112&COMPRESS=gzip&USER=JMF&PROJ=6533&VERSION=1&DEBUG=false&TRACE=0&GROUP=EASTS&DESCRIPTOR=CONUS&BAND=2&LATLON=31.2 -100.5&PLACE=CENTER&SIZE=250 250&UNIT=TEMP&MAG=1&SPAC=4&NAV=X&AUX=YES&DOC=YES&DAY=X&TIME=12:32:00 12:32:00 I");
local_copy = remote_area.save("/Users/joleenf/mcidas/data/test.area3",1); # make local copy of area using verbose of "1" for true
This works, but I believe you must then load this area through a local ADDE server. Unfortunately, my Local ADDE data server is either very sluggish or failing entirely. If this saved area is loaded as a file, the calibration will not be correct.
There does seem to be a problem with saving the area directly from the GUI which is outlined in the following post and has an inquiry.
viewtopic.php?f=24&t=581
I have currently tested this on Version1.01beta1 and Version1.1beta1.
Joleen
saving data similar to imgcopy
Re: saving data similar to imgcopy
Joleen -
In your ADDE request, try UNIT=X instead of UNIT=TEMP. That will send the default units from whichever server you're accessing. If that does not work, UNIT=BRIT should work, but I think you lose some of the calibration information. If you have more questions, I can look into this more on Monday.
- Becky
In your ADDE request, try UNIT=X instead of UNIT=TEMP. That will send the default units from whichever server you're accessing. If that does not work, UNIT=BRIT should work, but I think you lose some of the calibration information. If you have more questions, I can look into this more on Monday.
- Becky
Re: saving data similar to imgcopy
Becky,
The following script works right now with McIDAS Version 1.01 Beta 1 from 2010-10-22 (The version provided at the MUG meeting Fall 2010)...
from edu.wisc.ssec.mcidas import AreaFile as af; #import the AreaFile class to allow area format data to be read (from this point forward, it will be referenced by "af")
remote_area= af("adde://easts.ssec.wisc.edu/imagedata?&PORT=112&COMPRESS=gzip&USER=JMF&PROJ=6533&VERSION=1&DEBUG=false&TRACE=0&GROUP=EASTS&DESCRIPTOR=CONUS&BAND=2&LATLON=32.3 -86.7&PLACE=CENTER&SIZE=883 708&UNIT=&MAG=1 1&SPAC=4&NAV=X&AUX=YES&DOC=X&DAY=X&TIME=12:45:00 12:45:00 I");
local_copy = remote_area.save("/Users/joleenf/mcidas/data/test.area3",1); # make local copy of area using verbose of "1" for true
DOC=X works, but DOC=YES does not work. "UNIT=" works to save all units in the local file or "UNIT=TEMP" will also work. I realized that DOC=YES was meaningless, but did not realize it would cause a problem in the copy.
When saved image is displayed over the server image, the same region size and center was needed for the temperature values to match across the entire image.
Joleen
The following script works right now with McIDAS Version 1.01 Beta 1 from 2010-10-22 (The version provided at the MUG meeting Fall 2010)...
from edu.wisc.ssec.mcidas import AreaFile as af; #import the AreaFile class to allow area format data to be read (from this point forward, it will be referenced by "af")
remote_area= af("adde://easts.ssec.wisc.edu/imagedata?&PORT=112&COMPRESS=gzip&USER=JMF&PROJ=6533&VERSION=1&DEBUG=false&TRACE=0&GROUP=EASTS&DESCRIPTOR=CONUS&BAND=2&LATLON=32.3 -86.7&PLACE=CENTER&SIZE=883 708&UNIT=&MAG=1 1&SPAC=4&NAV=X&AUX=YES&DOC=X&DAY=X&TIME=12:45:00 12:45:00 I");
local_copy = remote_area.save("/Users/joleenf/mcidas/data/test.area3",1); # make local copy of area using verbose of "1" for true
DOC=X works, but DOC=YES does not work. "UNIT=" works to save all units in the local file or "UNIT=TEMP" will also work. I realized that DOC=YES was meaningless, but did not realize it would cause a problem in the copy.
When saved image is displayed over the server image, the same region size and center was needed for the temperature values to match across the entire image.
Joleen