Re: problem with output on PS device / TVREAD [message #70231 is a reply to message #70230] |
Fri, 26 March 2010 03:10   |
clément mayet
Messages: 8 Registered: March 2010
|
Junior Member |
|
|
On 25 mar, 17:58, David Fanning <n...@dfanning.com> wrote:
> clément mayet writes:
>> Now I've got good PNG, thank you David. Any Idea about the Postscript
>> very crude resolution ?
>
> No. Is that netCDF file available somewhere?
Not yet but you will find an example of "geo" structure at
http://dl.free.fr/beTe5saIx.
You can use it directly in the code I've posted (instead of doing the
"geo=tugo2geomat_cl(file,/TIDE)")
Find below the "arrscl.pro" I use.
Thanks for helping !!
Cheers,
Clement
FUNCTION arrscl, array, min_value=min_value, max_value=max_value,
top=top, missing=missing
IF NOT KEYWORD_SET(min_value) THEN BEGIN
min_value=MIN(array, /NAN, max=maxtmp)
ENDIF
IF NOT KEYWORD_SET(max_value) THEN BEGIN
max_value=maxtmp
ENDIF
lower_numbers = WHERE(array LT min_value, cnt)
IF (cnt GT 0) THEN array[lower_numbers]=min_value
greater_numbers = WHERE(array GT max_value, cnt)
IF (cnt GT 0) THEN array[greater_numbers]=max_value
valid_numbers = WHERE( (array GE min_value) OR (array LE max_value),
cnt)
IF ( cnt GT 0 ) THEN BEGIN
array[valid_numbers]=((array[valid_numbers]-min_value)/(max_ value-
min_value))*top
ENDIF
not_numbers = WHERE(array NE array, cnt)
IF (cnt GT 0) THEN array[not_numbers]=missing
return, array
END
|
|
|