- Poldi data file writing with automatic update
- many fixes to TAS - Changed HM code for ILL PSD to account for Christoph's offset to positive.
This commit is contained in:
@@ -1590,7 +1590,7 @@
|
||||
int my_daq_save;
|
||||
uint maxbins, my_nbins, bins_in_buff;
|
||||
uint nxtbin_to_send, nbins_to_send, bytes_in_buff;
|
||||
uint bins_to_go;
|
||||
uint bins_to_go, lastbin;
|
||||
struct req_buff_struct my_rqst;
|
||||
struct rply_buff_struct my_rply;
|
||||
uchar *buff_pntr, *last_byte, *nxt;
|
||||
@@ -1710,9 +1710,13 @@
|
||||
nxt = (char *) my_pntr.base;
|
||||
while (nbins_to_send > 0) {
|
||||
/* Read some histogram data into buffer */
|
||||
lastbin = nxtbin_to_send + bins_in_buff;
|
||||
if(lastbin > my_nbins-1){
|
||||
lastbin = my_nbins-1;
|
||||
}
|
||||
bins_to_go = FS_read_hm (index, pkt_size,
|
||||
my_pntr.base, bins_in_buff,
|
||||
nxtbin_to_send, (my_fstbin + my_nbins - 1));
|
||||
nxtbin_to_send, lastbin);
|
||||
if (bins_to_go <= 0) {
|
||||
perror (StrJoin (buff, pkt_size,
|
||||
FS_name[index], "/FS_do_read: FS_read_hm error"));
|
||||
|
||||
@@ -808,6 +808,10 @@
|
||||
/*
|
||||
We have a valid PSD packet. Find and check positions.
|
||||
*/
|
||||
|
||||
/*
|
||||
old style calculation, left in for now
|
||||
|
||||
xPos = xData.ui2[1];
|
||||
if(xPos > 32767)
|
||||
xPos -= 65536;
|
||||
@@ -815,21 +819,21 @@
|
||||
yPos = yData.ui2[1];
|
||||
if(yPos > 32767)
|
||||
yPos -= 65536;
|
||||
|
||||
/*
|
||||
if(xPos > 0)
|
||||
xPos =(int)((float)xPos/(float)psdXFactor +.5 + psdXOffset);
|
||||
else
|
||||
xPos =(int)((float)xPos/(float)psdXFactor -.49999 + psdXOffset);
|
||||
|
||||
if(yPos > 0)
|
||||
yPos =(int)((float)yPos/(float)psdYFactor +.5 + psdYOffset);
|
||||
else
|
||||
yPos =(int)((float)yPos/(float)psdYFactor -.49999 + psdYOffset);
|
||||
*/
|
||||
|
||||
xPos = (int) ( (float)(xPos+xOff)/(float)psdXFactor);
|
||||
yPos = (int)( (float)(yPos+yOff)/(float)psdYFactor);
|
||||
*/
|
||||
|
||||
/*
|
||||
This is the new version where all values are offset by 4096
|
||||
in order to give positive values at all times. This relates
|
||||
to a zero point in the middle of the detector. As we want a
|
||||
zero point in the lower left corner, we subtract 2048.
|
||||
*/
|
||||
xPos = xData.ui2[1];
|
||||
xPos = (xPos - 2048)/psdXFactor;
|
||||
yPos = yData.ui2[1];
|
||||
yPos = (yPos - 2048)/psdYFactor;
|
||||
|
||||
|
||||
if(xPos < 0 || xPos > psdXSize)
|
||||
|
||||
@@ -151,7 +151,7 @@
|
||||
|
||||
Dbg_mask = 0;
|
||||
Dbg_lev0 = 0;
|
||||
Dbg_lev1 = 1;
|
||||
Dbg_lev1 = 0;
|
||||
Dbg_lev2 = 0;
|
||||
Dbg_lev3 = 0;
|
||||
Cfgn_done = 0; /* Force a configuration before we can do anything. */
|
||||
|
||||
@@ -1205,7 +1205,7 @@
|
||||
|
||||
/*
|
||||
switch debugging on by default
|
||||
Dbg_lev1 = 1;
|
||||
Dbg_lev1 = 0;
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user