[Castor-users] Writing .Cdf file

Konstantinos P. Chatzipapas, MSc kwnchatz at upatras.gr
Mon May 15 12:55:18 CEST 2017


 

Dear users/developers, 

I am trying to create a program that will write experimental results to
the appropriate .Cdf ascii format. I am using this loop: 

 char buffer [20];
 sprintf(buffer, "CDF_CstrProj.Cdf");
 pFile = fopen (buffer, "w");
 for (id1=0; id1<bins_elts; id1++)
 {
 for (id2=0; id2<nCrystalsTot; id2++)
 {
 fprintf(pFile,"%6d ",timeMS[id1][id2]);
 fprintf(pFile,"%6d ",data[id1][id2]);
 fprintf(pFile,"%6d ",id1);
 fprintf(pFile,"%6d ",id2);
 }
 } 

Where id1 is the projectionID (0-35) and id2 is the pixelID (0-2997).
Data are the counts. I am using integers in data but I have also try it
with floats. Then by using a .Cdh I try to reconstruct. There is a
problem there. Probably castor-recon does not recognize the file
correct, because I am getting this fault repeatedly (the "Projection
index" only change: 

***** oIterativeAlgorithm::StepInnerLoopInsideSubsetLoop() -> A problem
occured while computing the projection line !
***** iScannerSPECTConv::GetPositionsAndOrientations() -> Projection
index (538976288) out of range [0:35] !
***** vProjector::Project() -> A problem occured while getting positions
and orientations from scanner !
***** oProjectorManager::ComputeProjectionLine() -> A problem occured
while forward projecting an event ! 

I am attaching the file in order that you take a look and help me. 

Thank you in advance, 

Konstantinos 

-- 

-------------------------
 Konstantinos P. Chatzipapas 
 Physicist, MSc 
 Faculty of Medical Physics 
 UNIVERSITY OF PATRAS 

 web page: _Physics Magazine [1]_ 

 

Links:
------
[1] http://www.physicsmag.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.castor-project.org/pipermail/castor-users/attachments/20170515/27c29e28/attachment-0001.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CDF_CstrProj.Cdh
URL: <http://lists.castor-project.org/pipermail/castor-users/attachments/20170515/27c29e28/attachment-0002.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CDF_CstrProj.Cdf
URL: <http://lists.castor-project.org/pipermail/castor-users/attachments/20170515/27c29e28/attachment-0003.ksh>


More information about the Castor-users mailing list