Révision 243
| TrouNoir/TrouNoir.py (revision 243) | ||
|---|---|---|
| 825 | 825 |
} |
| 826 | 826 |
""" |
| 827 | 827 |
|
| 828 |
|
|
| 829 |
|
|
| 830 |
|
|
| 831 |
|
|
| 832 |
|
|
| 833 |
|
|
| 834 |
|
|
| 835 |
|
|
| 836 |
|
|
| 837 |
|
|
| 838 |
|
|
| 839 |
|
|
| 840 |
|
|
| 841 |
|
|
| 842 |
|
|
| 843 |
|
|
| 844 |
|
|
| 845 |
|
|
| 846 |
|
|
| 847 |
|
|
| 848 |
|
|
| 849 |
|
|
| 850 |
|
|
| 851 |
|
|
| 852 |
|
|
| 853 |
|
|
| 854 |
|
|
| 855 |
|
|
| 856 |
|
|
| 857 |
|
|
| 858 |
|
|
| 859 |
|
|
| 860 |
|
|
| 861 |
|
|
| 862 |
|
|
| 863 |
|
|
| 864 |
|
|
| 865 |
|
|
| 866 |
|
|
| 867 |
|
|
| 868 |
|
|
| 869 |
|
|
| 870 |
|
|
| 871 |
|
|
| 872 |
|
|
| 873 |
|
|
| 874 |
|
|
| 875 |
|
|
| 876 |
|
|
| 877 |
|
|
| 878 |
|
|
| 879 |
|
|
| 880 |
|
|
| 881 |
|
|
| 882 |
|
|
| 883 |
|
|
| 884 |
|
|
| 885 |
|
|
| 886 |
|
|
| 887 |
|
|
| 888 |
|
|
| 889 |
|
|
| 890 |
|
|
| 891 |
|
|
| 892 |
|
|
| 893 |
|
|
| 894 |
|
|
| 895 |
|
|
| 896 |
|
|
| 897 |
|
|
| 898 |
|
|
| 828 | 899 |
def KernelCodeCuda(): |
| 829 | 900 |
BlobCUDA= """ |
| 830 | 901 |
|
| ... | ... | |
| 839 | 910 |
#else |
| 840 | 911 |
#define TRACKPOINTS |
| 841 | 912 |
#endif |
| 842 |
|
|
| 843 | 913 |
__device__ float nothing(float x) |
| 844 | 914 |
{
|
| 845 | 915 |
return(x); |
| ... | ... | |
| 1012 | 1082 |
uint sizex=(uint)gridDim.x*blockDim.x; |
| 1013 | 1083 |
uint sizey=(uint)gridDim.y*blockDim.y; |
| 1014 | 1084 |
|
| 1085 |
|
|
| 1015 | 1086 |
// Perform trajectory for each pixel, exit on hit |
| 1016 | 1087 |
|
| 1017 | 1088 |
float m,rs,ri,re,tho; |
| ... | ... | |
| 1025 | 1096 |
q=-2; |
| 1026 | 1097 |
raie=Line; |
| 1027 | 1098 |
|
| 1028 |
float d,bmx,db,b,h;
|
|
| 1099 |
float bmx,db,b,h; |
|
| 1029 | 1100 |
float rp0,rpp,rps; |
| 1030 |
float phi,thi,phd,php,nr,r;
|
|
| 1101 |
float phi,phd;
|
|
| 1031 | 1102 |
int nh; |
| 1032 | 1103 |
float zp,fp; |
| 1033 | 1104 |
|
| ... | ... | |
| 1106 | 1177 |
|
| 1107 | 1178 |
// Perform trajectory for each pixel |
| 1108 | 1179 |
|
| 1109 |
float m,rs,ri,re,tho;
|
|
| 1180 |
float m,ri,re,tho; |
|
| 1110 | 1181 |
int q,raie; |
| 1111 | 1182 |
|
| 1112 | 1183 |
m=Mass; |
| 1113 |
rs=2.e0f*m; |
|
| 1114 | 1184 |
ri=InternalRadius; |
| 1115 | 1185 |
re=ExternalRadius; |
| 1116 | 1186 |
tho=Angle; |
| 1117 | 1187 |
q=-2; |
| 1118 | 1188 |
raie=Line; |
| 1119 | 1189 |
|
| 1120 |
float d,bmx,db,b,h; |
|
| 1121 |
float phi,thi,phd,php,nr,r; |
|
| 1122 |
int nh; |
|
| 1190 |
float bmx,db,b,h; |
|
| 1191 |
float phi,phd,php,nr,r; |
|
| 1123 | 1192 |
float zp=0,fp=0; |
| 1124 | 1193 |
// Autosize for image, 25% greater than external radius |
| 1125 | 1194 |
bmx=1.25e0f*re; |
| ... | ... | |
| 1194 | 1263 |
|
| 1195 | 1264 |
// Perform trajectory for each pixel |
| 1196 | 1265 |
|
| 1197 |
float m,rs,ri,re,tho;
|
|
| 1266 |
float m,ri,re,tho; |
|
| 1198 | 1267 |
int q,raie; |
| 1199 | 1268 |
|
| 1200 | 1269 |
m=Mass; |
| 1201 |
rs=2.e0f*m; |
|
| 1202 | 1270 |
ri=InternalRadius; |
| 1203 | 1271 |
re=ExternalRadius; |
| 1204 | 1272 |
tho=Angle; |
| 1205 | 1273 |
raie=Line; |
| 1206 | 1274 |
|
| 1207 | 1275 |
float bmx,db,b,h; |
| 1208 |
float phi,thi,phd; |
|
| 1209 |
int nh; |
|
| 1276 |
float phi,phd; |
|
| 1210 | 1277 |
float zp=0,fp=0; |
| 1211 | 1278 |
|
| 1212 | 1279 |
// Autosize for image |
| ... | ... | |
| 1268 | 1335 |
|
| 1269 | 1336 |
// Perform trajectory for each pixel |
| 1270 | 1337 |
|
| 1271 |
float m,rs,ri,re,tho; |
|
| 1272 |
int raie,q; |
|
| 1338 |
float m,rs,re; |
|
| 1273 | 1339 |
|
| 1274 | 1340 |
m=Mass; |
| 1275 | 1341 |
rs=2.e0f*m; |
| 1276 |
ri=InternalRadius; |
|
| 1277 | 1342 |
re=ExternalRadius; |
| 1278 |
tho=Angle; |
|
| 1279 |
q=-2; |
|
| 1280 |
raie=Line; |
|
| 1281 | 1343 |
|
| 1282 |
float d,bmx,db,b,h; |
|
| 1283 |
float phi,thi,phd,php,nr,r; |
|
| 1344 |
float bmx,b,h; |
|
| 1284 | 1345 |
int nh; |
| 1285 |
float zp,fp; |
|
| 1286 | 1346 |
|
| 1287 | 1347 |
// Autosize for image |
| 1288 | 1348 |
bmx=1.25e0f*re; |
| ... | ... | |
| 1836 | 1896 |
numpy.float32(ExternalRadius), |
| 1837 | 1897 |
numpy.float32(Angle), |
| 1838 | 1898 |
numpy.int32(Line), |
| 1839 |
grid=(zImage.shape[0]/Threads,zImage.shape[1]/Threads), |
|
| 1899 |
grid=(int(zImage.shape[0]/Threads), |
|
| 1900 |
int(zImage.shape[1]/Threads)), |
|
| 1840 | 1901 |
block=(Threads,Threads,1)) |
| 1841 | 1902 |
elif Method=='EachCircle': |
| 1842 | 1903 |
EachCircleCU(zImageCU,fImageCU, |
Formats disponibles : Unified diff