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 scriptsThanks,
FrankAnsley 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
YunyaoAnsley 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