Révision 237
TrouNoir/TrouNoir.py (revision 237) | ||
---|---|---|
1590 | 1590 |
Method=InputCL['Method'] |
1591 | 1591 |
TrackPoints=InputCL['TrackPoints'] |
1592 | 1592 |
Physics=InputCL['Physics'] |
1593 |
NoImage=InputCL['NoImage'] |
|
1593 | 1594 |
|
1594 | 1595 |
PhysicsList=DictionariesAPI() |
1595 | 1596 |
|
... | ... | |
1736 | 1737 |
fImageCL.release() |
1737 | 1738 |
|
1738 | 1739 |
if Method=='TrajectoPixel' or Method=='TrajectoCircle': |
1740 |
if not NoImage: |
|
1741 |
print(Trajectories.shape) |
|
1742 |
AngleStep=4*numpy.pi/TrackPoints |
|
1743 |
Angles=numpy.arange(0.,4*numpy.pi,AngleStep) |
|
1744 |
Angles.shape=(1,TrackPoints) |
|
1745 |
print(Angles.shape) |
|
1746 |
Hostname=gethostname() |
|
1747 |
Date=time.strftime("%Y%m%d_%H%M%S") |
|
1748 |
ImageInfo="%s_Device%i_%s_%s" % (Method,Device,Hostname,Date) |
|
1749 |
|
|
1750 |
# numpy.savetxt("TrouNoirTrajectories_%s.csv" % ImageInfo, |
|
1751 |
# numpy.transpose(numpy.concatenate((Angles,Trajectories),axis=0)), |
|
1752 |
# delimiter=' ', fmt='%.2e') |
|
1753 |
numpy.savetxt("TrouNoirTrajectories.csv", |
|
1754 |
numpy.transpose(numpy.concatenate((Angles,Trajectories),axis=0)), |
|
1755 |
delimiter=' ', fmt='%.2e') |
|
1756 |
|
|
1739 | 1757 |
TrajectoriesCL.release() |
1740 | 1758 |
IdLastCL.release() |
1741 |
|
|
1759 |
|
|
1742 | 1760 |
return(elapsed) |
1743 | 1761 |
|
1744 | 1762 |
def BlackHoleCUDA(zImage,fImage,InputCL): |
... | ... | |
2075 | 2093 |
InputCL['TrackPoints']=TrackPoints |
2076 | 2094 |
InputCL['Physics']=Physics |
2077 | 2095 |
InputCL['Threads']=Threads |
2096 |
InputCL['NoImage']=NoImage |
|
2078 | 2097 |
|
2079 | 2098 |
if GpuStyle=='OpenCL': |
2080 | 2099 |
duration=BlackHoleCL(zImage,fImage,InputCL) |
Formats disponibles : Unified diff