status.i4.v = bpm_get_intensity_c(frame.i4.v, num_frames.i4.v
					  [,horz_int.r4a.r] [,vert_int.r4a.r]
					  [,timestamp.u4.r] [,file_title.i1p.r]
					  [,frames_ret.i4.r] [,data_view.u4.v]
					  [.type.i4.v] [,scale_it.i4.v]
					  [,attributes.u4.r] [,metadata.g.v])

	This routine retrieves the BPM beam intensities for the machine last
	requested by a call to bpm_machine_c.

	frame		frame number (Note: If this is negative, the data
			is retrieved from a save file using the absolute
			value of this parameter as its file number.)
	num_frames	number of frames  (If a value of zero is passed
			for this argument when retrieving file data,
			all saved frames will be returned.)
	[horz_int]	returned array of horizontal BPM intensity values
			(default is NULL)
	[vert_int]	returned array of vertical BPM intensity values
			(default is NULL)
	[horz_status]	returned array of horizontal position detector
			status values
			(BPM_OK -> successful read,
			 BPM_INVALID ->invalid data)
			(default is NULL)
	[vert_status]	returned array of vertical position detector
			status values (default is NULL)
			(may be same status values as for horizontal)
	[timestamp]	returned timestamp in clinks when the data was retrieved
			(default is NULL)
	[file_title]	returned pointer to null-terminated file name
			(default is NULL)
	[time_in_cycle]	returned time in seconds in the cycle that the data
			was taken (default is NULL)
	[frames_ret]	number of frames actually returned (default is NULL)
	[data_view]	data view requested which may result in data being
			returned for multiple machines
			(BPM_VIEW_DEFAULT -> single machine view (default),
			 BPM_VIEW_P1_ONLY -> P1 Line only (P1 Line),
			 BPM_VIEW_P1_P2 -> P1 and P2 lines (P1 Line),
			 BPM_VIEW_P1_P2_M1 -> P1, P2, and M1 lines (P1 Line),
			 BPM_VIEW_P1_P2_M1_M3 -> P1, P2, M1, amd M3 lines
						 (P1 Line),
			 BPM_VIEW_P1_P2_P3 -> P1, P2, and P3 lines (P1 Line),
			 BPM_VIEW_M1_ONLY -> M1 Line only (M1 Line),
			 BPM_VIEW_M1_M3 -> M1 and M3 lines (M1 Line))
	[type]		type of BPM frame
			(BPM_SNAPSHOT -> snapshot frame
					 (Tevatron, MiniBooNE, and
					  Electron Cooling only),
			 BPM_SLOW_SNAPSHOT -> slow snapshot frame
					      (Tevatron only),
			 BPM_DISPLAY_FRAME -> display frame (Tevatron only),
			 BPM_PROFILE -> profile frame (Tevatron only),
			 BPM_USER_FRAME -> user triggered closed orbit frame
					   (Tevatron only),
			 BPM_INJECTION_FRAME -> injection closed orbit frame
						(Tevatron only),
			 BPM_AVERAGED_FRAME -> averaged data frame
					       (MI-8 Line only),
			 BPM_CALIBRATION_DATA -> calibration data (Main Injector
						 and development only)
			 BPM_FLASH -> flash frame (default))
	[scale_it]	flag indicating whether or not to scale the returned
			intensities (only used for BPM_RECYCLER, BPM_R20_LINE,
			and BPM_R30_LINE)
			(TRUE -> scale intensities (default),
			 FALSE -> return unscaled or normalized values)
	[readout_spec]	readout specification
			(BPM_TEVATRON -> structure of type
			 BPM_TEV_DEVL -> structure of type
			 BPM_MAIN_INJECTOR -> structure of type
			 BPM_MI_DEVL -> structure of type
			 BPM_RECYCLER -> structure of type
			 BPM_RR_DEVL -> structure of type
			 BPM_R20_LINE -> structure of type
			 BPM_R30_LINE -> structure of type
			 BPM_8_GEV_LINE -> structure of type
			(default is NULL)
	[attributes]	returned data attributes
			(BPM_ATTR_CALIB_DATA -> data is calibration data)
			(default is NULL)
	[metadata]	returned metadata structure
			(BPM_TEVATRON -> structure of type
			 BPM_TEV_DEVL -> structure of type
			 BPM_MAIN_INJECTOR -> structure of type
			 BPM_MI_DEVL -> structure of type
			 BPM_8_GEV_LINE -> structure of type

	This function returns ACNET status values as follows:

	OK			success
	CBS_NOTYET		intensity information is not available
				for the requested machine
	CBS_INVTYP		frame(s) retrieved were not flash frames
	otherwise		other ACNET error

	This function requires the following include files:

	ul_cbsaux/bpmuti.h, acnet_errors_h

	Related functions:

	bpm_machine_c, bpm_get_intensity_names, bpm_get_names, bpm_query,
	bpm_name_to_index_c, bpm_data_source_c, bpm_beam_cycle_info,
	bpm_get_data_c, blm_get_data_c, bpm_plot_data, bpm_save_data,
	bpm_set_save_file, bpm_get_detector_status,

	C/C++ usage:

	char		*horz_status;
	char		*vert_status;
	char		**file_title = (char **) NULL;
	int		status;
	int		frame = 0;
	int		num_frames = NUM_FRAMES;
	int		frames_ret;
	int		num_horz_ints;
	int		num_vert_ints;
	int		num_to_allocate;
	int		type = BPM_FLASH;
	int		scale_it = TRUE;
	unsigned int	timestamp;
	unsigned int	data_view = BPM_VIEW_DEFAULT;
	unsigned int	attributes;
	float		*horz_int;
	float		*vert_int;
	float		time_in_cycle[NUM_FRAMES];
	void		*readout_spec = (void *) NULL;
	void		*metadata = (void *) NULL;

	bpm_get_intensity_names((char *) NULL,&num_horz_ints,
				(char *) NULL,&num_vert_ints);

	num_to_allocate = MAX(num_horz_ints,num_vert_ints);

	horz_status = (char *) malloc(num_to_allocate);
	vert_status = (char *) malloc(num_to_allocate);
	horz_int = (float *) malloc(num_to_allocate*(sizeof(float)));
	vert_int = (float *) malloc(num_to_allocate*(sizeof(float)));

	status = bpm_get_intensity_c(frame,num_frames,horz_int,vert_int,