If you have access to the PEPII gateways (OPI00GTW00,01 or 02), then you can follow the following procedure to run the program:

1 - SSH to a gateway machine:

ssh opi00gtw02 -l userName

2 - Change directory to: /u1/lfb/lfb/matlab/

opi00gtw02:/u1/cddev% cd ~lfb/lfb/matlab/

3 - Start MATLAB (With no Java Virtual Machine).

opi00gtw02:/u1/lfb/lfb/matlab% matlab -nojvm

4 - Take data with lfbrecf.m

>> lfbrecf

5 - Plot your data with synchp.m (Follow instructions in this page)

>> synchp

6 - To save the data:

>> save /filePath/fileName N bnum bun_curr mb1 synch_p1

or

>> save /filePath/fileName

Take LFB synchronous phase data:  INDEX à High (Low) Energy Ring Panel  à HER (LER) LFB Panel à Take Synch. Phase Data

 

The “Take Synch. Phase Data” button runs a MATLAB script that generates the following plot:                                                                                                            

                                                                                                             Ion gap

 


 

 

The plot is useful to check for ADC saturation problems.  The ADC range is ± 128 counts.

 

Analyze data:   Run matlab script synchp.m

Note: At this time matlab on opi00gtw02 can only be run interactively from the eoicdesk account.

 

synchp.m calculates and plots the synchronous phase.  You’ll need to answer some questions when running this program. Here is a sample run for LER data in the 2:3320:4 filling pattern. (User response is in bold):

 

---- /tmp/lfb ----

Loading and sorting by bunch no. ...

Is this transverse data (y/n)?: n                                                (Longitudinal data)

Is this HER data (y/n)?: n                                                        (LER data)

 

Recognized PEP-II LER ring

 

Warning: turn_offsets has more columns than bunches

Is this an even/odd samping pattern ? (y/n): n                 (no if filling by2 or by4)

Downsample columns of 'bunches' ? (y/n): y                              (yes if filling by4)

Enter the reduction factor: 2                                                      (2 if filling by4)

Starting bucket# (1st bucket = #1): 2                                      (2 if fill starts at bucket 2)

 

                                                                                                Note on bucket numbers:       

                                                                                                PEP II    0   1   2   3   4   5   6

                                                                                                LFB        1       2         3        4  

                                                       

Interpolating and resampling data ...

 

 

Enter no. of freq.s for CM: 3

Change no. of freq.s? (y/n): n                                                    (yes to change no. of Points to fit a peak.)

 

                                                                                                (ignore warning)

 


Warning: FMIN is obsolete and has been replaced by FMINBND.

FMIN now calls FMINBND which uses the following syntax:

   [X,FVAL,EXITFLAG,OUTPUT] = FMINBND(FUN,x1,x2,OPTIONS,P1,P2,...)

Use OPTIMSET to define optimization options, or type

'edit fmin' to view the code used here.  FMIN will be

removed in the future; please use FMINBND with the new syntax.

> In /usr/local/matlab6/toolbox/matlab/funfun/fmin.m at line 62

  In /u1/lfb/lfb/matlab/synchp.m at line 39

 

Median filter synch_p? (y/n): n                                                  (synch_p is the synchronous phase data. This is useful if there is noise in the measurement)

Plot Transfer function? (y/n): n

 

 

- The longitudinal feedback system has zero gain at ± 15º @ RF.

 

- For good operations the absolute value of the minimum or the maximum of the synchronous phase should be less than 12º @ RF.  (synch_p1 is the matlab variable.)