mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-23 23:10:02 +02:00
fixed receiver bug for moench mapping problem
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@677 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
parent
9e08196677
commit
83bcbeddc9
@ -119,9 +119,8 @@ slsReceiverFunctionList::slsReceiverFunctionList(detectorType det):
|
|||||||
int offset,ipacket;
|
int offset,ipacket;
|
||||||
|
|
||||||
|
|
||||||
int x;
|
int x,y,i,j;
|
||||||
int y;
|
int ipx,ipy,ix,iy;
|
||||||
int i, j;
|
|
||||||
|
|
||||||
/** not for roi */
|
/** not for roi */
|
||||||
//filter
|
//filter
|
||||||
@ -138,20 +137,20 @@ slsReceiverFunctionList::slsReceiverFunctionList(detectorType det):
|
|||||||
|
|
||||||
|
|
||||||
//set up mask for moench
|
//set up mask for moench
|
||||||
|
for(i=0;i<x; i++)
|
||||||
for(int i=0;i<x; i++)
|
for(j=0;j<y; j++){
|
||||||
for(j=0;i<y; i++)
|
|
||||||
if (j<mask_y_offset)
|
if (j<mask_y_offset)
|
||||||
mask[i][j] = mask_adc;
|
mask[i][j] = mask_adc;
|
||||||
else
|
else
|
||||||
mask[i][j] = 0;
|
mask[i][j] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
//set up mapping for moench
|
//set up mapping for moench
|
||||||
for (int ipx = 0; ipx < num_packets_in_col; ipx++ )
|
for (ipy = 0; ipx < num_packets_in_col; ipx++ )
|
||||||
for (int ipy = 0; ipy < num_packets_in_row; ipy++ )
|
for (ipx = 0; ipy < num_packets_in_row; ipy++ ){
|
||||||
for (int ix = 0; ix < num_pixels_per_packet_in_col; ix++ ){
|
|
||||||
offset = initial_offset;
|
offset = initial_offset;
|
||||||
for (int iy = 0; iy < num_pixels_per_packet_in_row; iy++ ){
|
for (ix = 0; ix < num_pixels_per_packet_in_col; ix++ ){
|
||||||
|
for (iy = 0; iy < num_pixels_per_packet_in_row; iy++ ){
|
||||||
ipacket = (ipx + 1) + (ipy * num_packets_in_row);
|
ipacket = (ipx + 1) + (ipy * num_packets_in_row);
|
||||||
if (ipacket == MOENCH_PACKETS_PER_FRAME)
|
if (ipacket == MOENCH_PACKETS_PER_FRAME)
|
||||||
ipacket = 0;
|
ipacket = 0;
|
||||||
@ -161,13 +160,14 @@ slsReceiverFunctionList::slsReceiverFunctionList(detectorType det):
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
filter = new singlePhotonFilter(x,y, MOENCH_FRAME_INDEX_MASK, MOENCH_PACKET_INDEX_MASK, MOENCH_FRAME_INDEX_OFFSET, 0, MOENCH_PACKETS_PER_FRAME, 0,map, mask,MOENCH_BUFFER_SIZE);
|
filter = new singlePhotonFilter(x,y, MOENCH_FRAME_INDEX_MASK, MOENCH_PACKET_INDEX_MASK, MOENCH_FRAME_INDEX_OFFSET, 0, MOENCH_PACKETS_PER_FRAME, 0,map, mask,MOENCH_BUFFER_SIZE);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
x = 1;
|
x = 1;
|
||||||
y = (GOTTHARD_DATA_BYTES/GOTTHARD_PACKETS_PER_FRAME);
|
y = (GOTTHARD_DATA_BYTES/GOTTHARD_PACKETS_PER_FRAME);/*bufferSize/sizeof(int16_t)*/
|
||||||
offset = initial_offset;
|
offset = initial_offset;
|
||||||
|
|
||||||
mask.resize(x);
|
mask.resize(x);
|
||||||
@ -178,14 +178,14 @@ slsReceiverFunctionList::slsReceiverFunctionList(detectorType det):
|
|||||||
map[i].resize(y);
|
map[i].resize(y);
|
||||||
|
|
||||||
//set up mask for moench
|
//set up mask for moench
|
||||||
for (int i=0; i < x; i++)
|
for (i=0; i < x; i++)
|
||||||
for (int j=0; j < y; j++){
|
for (j=0; j < y; j++){
|
||||||
mask[i][j] = 0;
|
mask[i][j] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//set up mapping for gotthard
|
//set up mapping for gotthard
|
||||||
for (int i=0; i < x; i++)
|
for (i=0; i < x; i++)
|
||||||
for (int j=0; j < y; j++){
|
for (j=0; j < y; j++){
|
||||||
//since there are 2 packets
|
//since there are 2 packets
|
||||||
if (y == y/2)
|
if (y == y/2)
|
||||||
offset += initial_offset;
|
offset += initial_offset;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user