home *** CD-ROM | disk | FTP | other *** search
- /*********************************************
- * Variables Definition:
- * You may define any variables that you
- * would like below, using the syntax
- * Key = Value,
- * where key is the variable name, and Value is the value.
- *
- ********************************************/
- pi = 3.1415926
- /* The following variables are used by Origin, and are
- * necessary for the proper operation of the program. */
-
- fitnpts = 60
- fitx1 = 1
- fitx2 = 10
-
- TimerCycle=5; #User installed timer period
- AcceptFit=0.05; #Norm of Chi^2 to terminate fitting
- FitWtMode = 0; #Weight method on fit data
- initNfitPts=60; #Number of data pts used in least square fitting
- #The initial step size = NumPtsInData/initNfitPts
- AveStep=3; #Number of points used in Running Averaging
-
- /*
- * Baseline related variables
- */
-
- MV_BASELINE_PTS=12
- /* Number of data points used in cursor move baseline */
-
- /* LR -B DataSet command uses the
- * following variables
- */
-
- Chk_Linear_R=10
- /* Sets the amount of tolerance in the automatic
- * determination of linear segments from the data
- */
-
- MAX_L_RANGE=40
- /* percentage of the entire data range to
- * be examined by the find linear segment routine
- */
-
- /*****************************************************************
- *
- *
- The following section contains a number of user-definable macros.
- *
- *
- *****************************************************************/
-
- /* After an empty new document is created */
- def DocBegin { }
-
- def NotReady {
- ty -b This operation is not available at the current version...
- }
-
- def ImportAscii {
- GetFileName *.DAT *.*;
- /* change to any other extensions if desired
- * GetFileName puts result into the string variable %A
- */
- Open -w %A;
- /* Open the file in %A into the current worksheet window */
- }
-
-
- def new {create %1 -n %2;set %1 -e %2}
- /* example: new test 100
- * create a default data set with 100 elements
- */
-
- def Separator {/* draw a line in the script window, %1 = number of columns */
- for(i=1;i<=%1;i+1) {
- type -L "-----------"
- /* the -L switch turns off CR/LF */
- }
- ty;/* to add the CR/LF */
- }
-
- /* When you double-click the window, Origin
- * will first try to find the object on the
- * location, if found, will invoke the corresponding
- * dialog box. If nothing can be found, the following
- * macros are executed if defined, otherwise the Hand
- * appear.
-
- def DBCLayer {
- ty -b Nothing can be found, open layer dialog?;
- layer;
- }
- * inside the layer frame
- *
- */
-
-
- /* inside layer bounds but outside layer frame
- def DBCBound Page
- *
- */
-
- def DBCPage Page
- /* anywhere else */
-
- def Enlarger.Ctrl {
- %B=%H;/* save window name */
- layer -c;/* count data sets and result in %Z */
- layer -s;active = i;
- /* get the active layer number into i and save it */
- doc -e Open (win -i);/* put all open windows into icons */
-
- GetNamedWin Enlarged;
- layer -i %Z;
- win -a %B;
- layer -s active;
- label -p 50 50;
- draw -n ZoomRect -File Read ZoomRect.OGO;/* read ZoomRect.OGO in as ZoomRect */
- win -system Tile;
- draw -n ZoomRect -Run;/* run its script */
- }
-
-
- /* run the script of the named graphic object */
- def doButton {
- draw -n %1 -r;
- }
-
- /* from %C to generate %B for the
- * specified type of curve
- */
- def GetCuvName {
- %B="%(count,@W).%(count,@C).%1";
- /* %B is the name of the interpolated curve */
- if(%[%B]>24) /* name too long */
- {
- doc -cs %1;
- %B=%1.$(count+1);
- }
- }
-
-
-