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:
l_maliakal_d 2013-10-02 16:40:15 +00:00
parent 9e08196677
commit 83bcbeddc9
2 changed files with 17 additions and 17 deletions

View File

@ -119,9 +119,8 @@ slsReceiverFunctionList::slsReceiverFunctionList(detectorType det):
int offset,ipacket;
int x;
int y;
int i, j;
int x,y,i,j;
int ipx,ipy,ix,iy;
/** not for roi */
//filter
@ -138,20 +137,20 @@ slsReceiverFunctionList::slsReceiverFunctionList(detectorType det):
//set up mask for moench
for(int i=0;i<x; i++)
for(j=0;i<y; i++)
for(i=0;i<x; i++)
for(j=0;j<y; j++){
if (j<mask_y_offset)
mask[i][j] = mask_adc;
else
mask[i][j] = 0;
}
//set up mapping for moench
for (int ipx = 0; ipx < num_packets_in_col; ipx++ )
for (int ipy = 0; ipy < num_packets_in_row; ipy++ )
for (int ix = 0; ix < num_pixels_per_packet_in_col; ix++ ){
for (ipy = 0; ipx < num_packets_in_col; ipx++ )
for (ipx = 0; ipy < num_packets_in_row; ipy++ ){
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);
if (ipacket == MOENCH_PACKETS_PER_FRAME)
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);
break;
default:
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;
mask.resize(x);
@ -178,14 +178,14 @@ slsReceiverFunctionList::slsReceiverFunctionList(detectorType det):
map[i].resize(y);
//set up mask for moench
for (int i=0; i < x; i++)
for (int j=0; j < y; j++){
for (i=0; i < x; i++)
for (j=0; j < y; j++){
mask[i][j] = 0;
}
//set up mapping for gotthard
for (int i=0; i < x; i++)
for (int j=0; j < y; j++){
for (i=0; i < x; i++)
for (j=0; j < y; j++){
//since there are 2 packets
if (y == y/2)
offset += initial_offset;