Files | |
file | bpm_calibration.h |
calibration routines | |
file | calibrate.c |
file | setup_calibration.c |
Functions | |
EXTERN int | setup_calibration (bpmconf_t *cnf, bpmproc_t *proc, int npulses, int startpulse, int stoppulse, double angle, double startpos, double endpos, int num_steps, bunchconf_t *bunch) |
EXTERN int | calibrate (bpmconf_t *bpm, bunchconf_t *bunch, bpmproc_t *proc, int npulses, bpmcalib_t *cal) |
EXTERN int setup_calibration | ( | bpmconf_t * | cnf, | |
bpmproc_t * | proc, | |||
int | npulses, | |||
int | startpulse, | |||
int | stoppulse, | |||
double | angle, | |||
double | startpos, | |||
double | endpos, | |||
int | num_steps, | |||
bunchconf_t * | bunch | |||
) |
This routine basically defines the calibration steps and returns them into the array of beam structures. It needs an array of processed waveform structures, of dimension npulses from a single BPM. From this it determines the corresponding corrector/mover steps and puts them back into the array of beam structures given the bpm configurations.
Startpulse and stoppulse have to be in the first and last calib steps & will need some extensive error checking for e.g. missed calibration steps...
NOTE: This is not definitive yet - more checking, etc. required!
proc | array of processed waveforms for a single bpm, so array of pulses | |
cnf | array of bpm configuration structures | |
npulses | number of pulses in the calibration | |
startpulse | start of calibration range | |
stoppulse | stop of calibration range | |
angle | ||
startpos | start position of calibration | |
endpos | end position of calibration | |
num_steps | number of calibration steps | |
bunch | the returned bunchconf array which represents where the beam is supposed to be in each bpm during each calibration step |
Definition at line 8 of file setup_calibration.c.
References bpm_error(), and bunchconf::bpmposition.
EXTERN int calibrate | ( | bpmconf_t * | bpm, | |
bunchconf_t * | bunch, | |||
bpmproc_t * | proc, | |||
int | npulses, | |||
bpmcalib_t * | cal | |||
) |
Gets the calibration constants from an array of npulses of beam positions and processed waveform structures and returns an updated calibration structure. Note that this routine updates the IQ phase, the position scale and the tilt scale but DOES NOT touch the frequency, decay time or the t0Offset.
bpm | Bpm structures | |
bunch | An array of bunch structures, one for each pulse, so essentially this corresponds to where we expect the beam to be in each pulse, so representing corrector positions or mover positions. This information should be filled by the routine setup_calibration( ... ) | |
proc | An array of processed waveforms, one for each pulse, which correspond to calculated positions that were calculated using IQ phase = 0 and scales equal to 1. | |
npulses | The number of pulses in the arrays | |
*cal | The returned calibration structure for the BPM that was calibrated |
Definition at line 9 of file calibrate.c.
References bpm_error().