[Thread Prev][Thread Next][Index]

Re: SHADE and FRAME



Hi Yunyao,

One small addition to Ansley's suggestion: the use of the qualifier
"MESSAGE/ERROR"

       IF `ngd gt threshold` THEN
         SHADE V1;   FRAME/FILE=filename.gif
       ELSE
         MESSAGE/ERROR "this plot failed"
       ENDIF

This will cause the text to be sent to standard error instead of
standard output.

    - steve

=======================================

Yunyao Qu wrote:

> Hi, Ansley,
> It is a good alternative, works!
>
> Thanks a lot and have nice weekend,
> Frank
>
> Ansley Manke wrote:
>
>> Actually here is a better solution.  There really isn't anything you
>> could
>> get back from SHADE as to whether it was successful, but you can do
>> a
>> numerical test on the data before executing the SHADE command.  For
>> example if your variable V1 is 2-dimensional you could use the
>> 2-dimensional
>> @NGD transformation  (NGD is Number of Good data)
>>
>> LET threshold = 1000.
>> LET ngood = V1[x=@NGD,y=@NGD]
>> IF `ngd gt threshold` THEN
>>   SHADE V1;   FRAME/FILE=filename.gif
>> ELSE
>>   message "this plot failed"
>> ENDIF
>>
>> (You can skip the ELSE --  ENDIF part of this, I just included it to
>> show
>> the syntax.)
>>
>> Ansley
>>
>>
>> Yunyao Qu wrote:
>>
>> > Ansley,
>> > But we need to know first that the  SHADE is not successful  , then
>> > we can CANCEL  WINDOW.
>> > We probably  need use IF-THE_ELSE clause to check if the SHADE is
>> > successfull or not(I do not know how to use it), because all Ferret
>> > commands will be executed as GO file scripts
>> >
>> > Thanks,
>> > Frank
>> >
>> > Ansley Manke wrote:
>> >
>> >>  Yunyao,
>> >>  How about issuing a "CANCEL WINDOW" command between plots?
>> >>  Then if a particular plot isn't made the FRAME command wouldn't
>> >>  get the
>> >>  previous plot.
>> >>
>> >>  Ansley
>> >>
>> >>
>> >>  Yunyao Qu wrote:
>> >>
>> >> > Ansley,
>> >> > What kind of failures are you talking about with SHADE?  Things
>> >> >
>> >> > like the data not being available?
>> >> > Yes, data is bad (same as data is not available).
>> >> >
>> >> > What kinds of things are you doing?
>> >> > Running scripts with large numbers or plots?  or incorporating
>> >> > Ferret
>> >> > calls into some other software or process?
>> >> >
>> >> > Yes, Running scripts to generate a set of images. The Ferret is
>> >> > called from C++ by system( "ferret < go.jnl" ) function.
>> >> >
>> >> > Thanks
>> >> > Yunyao
>> >> >
>> >> > Ansley Manke wrote:
>> >> >
>> >> >>  Frank,
>> >> >>  What kind of failures are you talking about with SHADE?
>> >> >>  Things
>> >> >>  like the data not being available?   What kinds of things are
>> >> >>  you doing?
>> >> >>  Running scripts with large numbers or plots?  or incorporating
>> >> >>  Ferret
>> >> >>  calls into some other software or process?
>> >> >>
>> >> >>  Ansley
>> >> >>
>> >> >>  Yunyao Qu wrote:
>> >> >>
>> >> >>  > Hi, Ansley,
>> >> >>  >
>> >> >>  > I am using "SHADE variable" and "FRAME/File=.." to get  and
>> >> >>  save the
>> >> >>  > image.
>> >> >>  > I hope if SHADE could not be executed successfully, the
>> >> >>  FRAME would not
>> >> >>  > be executed. Otherwise the FRAME may pick up the result of
>> >> >>  previous
>> >> >>  > SHADE.
>> >> >>  > can we do it?
>> >> >>  > It would be easy if SHADE could return a success or fail
>> >> >>  value.
>> >> >>  >
>> >> >>  > thanks
>> >> >>  > Frank
>> >> >>
>> >> >>  --
>> >> >>  Ansley Manke  Pacific Marine Environmental Laboratory  Seattle
>> >> >>  WA  (206)526-6246
>> >> >
>> >>  --
>> >>  Ansley Manke  Pacific Marine Environmental Laboratory  Seattle
>> >>  WA  (206)526-6246
>> >
>> --
>> Ansley Manke  Pacific Marine Environmental Laboratory  Seattle WA
>> (206)526-6246
>
--

                |  NOAA/PMEL               |  ph. (206) 526-6080
Steve Hankin    |  7600 Sand Point Way NE  |  FAX (206) 526-6744
                |  Seattle, WA 98115-0070  |  hankin@pmel.noaa.gov




[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement