BookmarkSubscribeRSS Feed
Choose Language Hide Translation Bar
sdinardo325

Not applicable

Joined:

Feb 21, 2019

Scripted Gaussian modeling with button click

Hello everyone!

 

I'm trying to write a script for Gaussian modeling and would like to have some default parameters set such as Nugget Parameter and to have the Profiler be visible. I'm scripting it to a button click in a window but can't seem to figure out how to set these additional parameters. Is there a way to pass more than one argument to a button click? Or maybe set the Gaussian Process to a variable, then adjust the variable parameters after the button click?

 

Here is what I have so far, and I'd like to additional script such as "obj << Profiler(1); obj << Estimate Nugger(1)" that is queued off the same button click if possible:

 

w = New Window( "Load Your Data Table",
       Text Box( "Choose an Excel file in which your data is linearized into
       columns and transformed into Log10[x]." ), Button Box( "3. Gaussian modeling",
       obj = Gaussian Process() );

Thanks! 

1 ACCEPTED SOLUTION

Accepted Solutions
markbailey

Staff

Joined:

Jun 23, 2011

Solution

Re: Scripted Gaussian modeling with button click

The second argument of the Button Box() function is an expression. It can be as simple or complex, as short or as long, as needed.

Learn it once, use it forever!
6 REPLIES 6
markbailey

Staff

Joined:

Jun 23, 2011

Re: Scripted Gaussian modeling with button click

I suggest that you interactively launch the Gaussian Process platform the way that you want, then click the red triangle at the top and select Save Script > to Clipboard. Then select Gaussian Process() in your script above and paste over it.

 

You can then substitute other columns for the analysis roles if necessary, but this step should get you closer.

Learn it once, use it forever!
markbailey

Staff

Joined:

Jun 23, 2011

Re: Scripted Gaussian modeling with button click

I don't understand what you mean by "Is there a way to pass more than one argument to a button click?"

Learn it once, use it forever!
Highlighted
sdinardo325

Not applicable

Joined:

Feb 21, 2019

Re: Scripted Gaussian modeling with button click

Thanks a lot for the fast response! I will start with the method you described as above. I'm wondering if when using the Button Box script (New Window( "Example", Button Box( "Press Me", Print( "Pressed." ) ) );) is there a way to have an additional script argument after Print in this example that is triggered upon clicking the same button. Such as maybe (...Print("Pressed."), w << Close Window). 

markbailey

Staff

Joined:

Jun 23, 2011

Solution

Re: Scripted Gaussian modeling with button click

The second argument of the Button Box() function is an expression. It can be as simple or complex, as short or as long, as needed.

Learn it once, use it forever!
sdinardo325

Not applicable

Joined:

Feb 21, 2019

Re: Scripted Gaussian modeling with button click

Thanks again. I see now how to include multiple arguments. Also, very helpful to save the script once the modeling is configured the way I want; this was a great starting point. 

markbailey

Staff

Joined:

Jun 23, 2011

Re: Scripted Gaussian modeling with button click

We think so, too. We advocate it as a best practice in our scripting courses for lots of reasons.

Learn it once, use it forever!