Removal of Parallel Ghost Points in .vtu Files with vtkGhostType - vtk
I am trying to write and visualise an unstructured mesh (.pvtu/.vtu) and I can't seem to get the point and cell vtkGhostType worked out to obtain the result I want.
From our code, we use a 1 cell/element overlap. Thus multiple domains contain the same cells, but critically no domain is the 'master' of these shared cells. Further, we solve for data at vertices, which means that we also have duplicate nodes. However, here there is a 'slave-master' relationship with one 'master' and potentially multiple 'slaves'. What I would like is to remove the duplicate(slaves) nodes, but retain at least 1 of the duplicate cells.
My .pvtu file contains the following:
<VTKFile type="PUnstructuredGrid" version="1.0" byte_order="LittleEndian">
<PUnstructuredGrid>
<PPointData>
<PDataArray NumberOfComponents="1" type="Float64" Name="Volume" format="ascii">
</PDataArray>
<PDataArray type="UInt8" Name="vtkGhostType" format="ascii">
</PDataArray>
</PPointData>
<PCellData>
<PDataArray type="UInt8" Name="vtkGhostType" format="ascii">
</PDataArray>
</PCellData>
<PPoints>
<PDataArray NumberOfComponents="3" type="Float64" Name="Points" format="ascii">
</PDataArray>
</PPoints>
<PCells>
<PDataArray type="Int32" Name="connectivity" format="ascii">
</PDataArray>
<PDataArray type="Int32" Name="offsets" format="ascii">
</PDataArray>
<PDataArray type="Int32" Name="types" format="ascii">
</PDataArray>
</PCells>
<Piece Source="paraview_1_domain_0.vtu"/>
<Piece Source="paraview_1_domain_1.vtu"/>
</PUnstructuredGrid>
</VTKFile>
and the two .vtu files, paraview_1_domain_0.vtu (Note The slave node Volume value of 5 is incorrect and should not be rendered)
<VTKFile type="UnstructuredGrid" version="1.0" byte_order="LittleEndian">
<UnstructuredGrid>
<Piece NumberOfPoints="6" NumberOfCells="2">
<PointData>
<DataArray type="Float64" NumberOfComponents="1" Name="Volume" format="ascii">
1.0000000000000000E-00
1.0000000000000000E-00
2.0000000000000000E-00
2.0000000000000000E-00
5.0000000000000000E-00
3.0000000000000000E-00
</DataArray>
<DataArray type="UInt8" Name="vtkGhostType" format="ascii">
0
0
0
0
3
3
</DataArray>
</PointData>
<CellData>
<DataArray type="UInt8" Name="vtkGhostType" format="ascii">
0
0
</DataArray>
</CellData>
<Points>
<DataArray type="Float64" NumberOfComponents="3" Name="Points" format="ascii">
0.0000000000000000E-00 0.0000000000000000E-00 0.0000000000000000E+00
0.0000000000000000E-00 1.0000000000000000E-00 0.0000000000000000E+00
1.0000000000000000E-00 0.0000000000000000E-00 0.0000000000000000E+00
1.0000000000000000E-00 1.0000000000000000E-00 0.0000000000000000E+00
2.0000000000000000E-00 0.0000000000000000E-00 0.0000000000000000E+00
2.0000000000000000E-00 1.0000000000000000E-00 0.0000000000000000E+00
</DataArray>
</Points>
<Cells>
<DataArray type="Int32" Name="connectivity" format="ascii">
0 2 3 1 3 5 4 2
</DataArray>
<DataArray type="Int32" Name="offsets" format="ascii">
4 8
</DataArray>
<DataArray type="Int32" Name="types" format="ascii">
9 9
</DataArray>
</Cells>
</Piece>
</UnstructuredGrid>
</VTKFile>
and paraview_1_domain_1.vtu
<VTKFile type="UnstructuredGrid" version="1.0" byte_order="LittleEndian">
<UnstructuredGrid>
<Piece NumberOfPoints="6" NumberOfCells="2">
<PointData>
<DataArray type="Float64" NumberOfComponents="1" Name="Volume" format="ascii">
2.0000000000000000E-00
2.0000000000000000E-00
3.0000000000000000E-00
3.0000000000000000E-00
4.0000000000000000E-00
4.0000000000000000E-00
</DataArray>
<DataArray type="UInt8" Name="vtkGhostType" format="ascii">
3
3
0
0
0
0
</DataArray>
</PointData>
<CellData>
<DataArray type="UInt8" Name="vtkGhostType" format="ascii">
1
0
</DataArray>
</CellData>
<Points>
<DataArray type="Float64" NumberOfComponents="3" Name="Points" format="ascii">
1.0000000000000000E-00 0.0000000000000000E-00 0.0000000000000000E+00
1.0000000000000000E-00 1.0000000000000000E-00 0.0000000000000000E+00
2.0000000000000000E-00 0.0000000000000000E-00 0.0000000000000000E+00
2.0000000000000000E-00 1.0000000000000000E-00 0.0000000000000000E+00
3.0000000000000000E-00 0.0000000000000000E-00 0.0000000000000000E+00
3.0000000000000000E-00 1.0000000000000000E-00 0.0000000000000000E+00
</DataArray>
</Points>
<Cells>
<DataArray type="Int32" Name="connectivity" format="ascii">
0 2 3 1 3 5 4 2
</DataArray>
<DataArray type="Int32" Name="offsets" format="ascii">
4 8
</DataArray>
<DataArray type="Int32" Name="types" format="ascii">
9 9
</DataArray>
</Cells>
</Piece>
</UnstructuredGrid>
</VTKFile>
With reference to https://blog.kitware.com/ghost-and-blanking-visibility-changes/ and http://www.visitusers.org/index.php?title=Representing_ghost_data
I set the vtkGhostType for the slave nodes to 3 since I do not want them to be used in interpolation. With the above files I can obtain two solutions, neither of which is optimal:
Mark all shared cells CellData:vtkGhostType with 0 except in one .vtu and set to 0. This give me the following result:
The two slave vertices from domain 1 are removed when the RemoveGhostInfomration filter is applied. However, as you will notice the volume at one of the slave nodes is set to 5 where it should be 3. I.e. the slaves from domain 0 still remain.
Mark all shared cells CellData:vtkGhostType with 1 This give me the following result:
Applying the same filter, the correct vertex data is obtained, and all slaves are deleted. However now all cells are removed. Which from a visualisation point of view is undesireable.
The correct results should be 8 nodes (no slaves), 3 cells (no duplicates), and a volume scalar field which varing linearly from 1 to 4 from left to right as shown in the below figure:
I'm trying to understand the problem. Please correct me if I have something wrong.
The cell in the middle has 2 versions: one per unstructured grid, and each version of this cell has partially the good point values. What you want is to display the correct point values by cherry-picking from the 2 cells.
When rendering, you cannot mix and match points between cells. What you need to do is find a way to migrate all the correct point values to one unstructured grid, and ghost the rest. You can do that with MPI.
I should add that blanking for unstructured grid is not implemented in VTK. Blanking only works for structured grid types (vtkImageData, vtkUniformGrid, vtkRectilinearGrid and vtkStructuredGrid). So vtkDataSetAttributes::HIDDENCELL does nothing for unstructured grids. Only vtkDataSetAttributes::DUPLICATECELL has effects when rendering. A duplicate cell assumes that the data mapped to the cell / point is valid and can be used by filters.
Related
ML model that finds relationships across the rows
I have extracted a ball x,y coordinates from tennis match video P.S. x,y coordinates are in the following format coords2 = [(985.0, 325.0), (985.0, 325.0), (985.0, 325.0), (985.0, 325.0), (985.0, 325.0), (985.0, 325.0), (985.0, 325.0), (985.0, 325.0), (985.0, 325.0), (985.0, 325.0), (985.0, 325.0), (985.0, 325.0), (985.0, 325.0), (985.0, 325.0), (985.0, 325.0), (985.0, 325.0), (978.0, 345.0), (969.8571428571429, 375.0), (961.7142857142857, 405.0), (953.5714285714286, 435.0), (945.4285714285714, 465.0), (937.2857142857143, 495.0), (929.1428571428571, 525.0), (921.0, 555.0), (918.0, 574.0), (918.0, 574.0), (904.0, 613.0), (895.0, 644.0), (886.0, 649.0), (877.0, 654.0), (870.0, 658.0), (870.0, 658.0), (861.0, 664.0), (853.0, 672.0), (846.0, 679.0), (837.0, 688.0), (827.0, 695.0), (827.0, 695.0), (821.0, 707.0), (812.0, 716.0), (803.3333333333334, 729.0), (794.6666666666666, 742.0), (786.0, 755.0), (786.0, 755.0), (782.0, 769.0), (782.0, 746.0), (786.0, 730.0), (793.0, 700.0), (800.0, 677.0), (800.0, 677.0), (803.0, 656.0), (807.0, 640.0), (814.0, 620.0), (819.0, 593.0), (819.0, 579.0), (819.0, 579.0), (825.0, 562.0), (831.0, 546.0), (834.0, 532.0), (833.5, 668.5), (833.0, 805.0), (833.0, 805.0), (837.5714285714286, 751.0), (842.1428571428571, 697.0), (846.7142857142857, 643.0), (851.2857142857143, 589.0), (855.8571428571429, 535.0), (860.4285714285714, 481.0), (865.0, 427.0), (867.0, 418.0), (871.0, 409.0), (872.0, 400.0), (877.0, 392.0), (877.0, 392.0), (877.0, 385.0), (883.0, 377.0), (883.0, 369.0), (887.0, 366.0), (890.0, 358.0), (890.0, 357.0), (892.0, 352.0), (894.0, 346.0), (897.0, 340.0), (898.0, 336.0), (900.0, 332.0), (900.0, 332.0), (902.0, 329.0), (905.0, 325.0), (905.0, 322.0), (908.0, 320.0), (910.0, 316.0), (910.0, 316.0), (912.0, 315.0), (914.0, 314.0), (916.0, 310.0), (919.0, 308.0), (919.0, 306.0), (919.0, 306.0), (920.0, 305.0), (924.0, 306.0), (922.0, 306.0), (926.0, 305.0), (928.0, 305.0), (926.0, 307.0), (930.0, 306.0), (930.0, 305.0), (932.0, 305.0), (933.0, 307.0), (935.0, 310.0), (935.0, 308.0), (936.0, 310.0), (937.0, 313.0), (938.0, 314.0), (940.0, 316.0), (942.0, 319.0), (942.0, 319.0), (942.0, 322.0), (943.0, 323.0), (945.0, 324.0), (946.0, 316.0), (945.0, 306.0), (945.0, 306.0), (945.0, 298.0), (946.0, 291.0), (947.0, 284.0), (947.0, 278.0), (950.0, 272.0), (949.0, 273.0), (950.0, 266.0), (951.0, 261.0), (950.0, 255.0), (950.0, 251.0), (951.0, 245.0), (951.0, 245.0), (953.0, 241.0), (952.0, 237.0), (950.0, 236.0), (945.0, 237.0), (939.0, 240.0), (938.0, 239.0), (934.0, 242.0), (928.0, 244.0), (922.0, 250.0), (917.0, 252.0), (911.0, 256.0), (911.0, 256.0), (905.0, 263.0), (899.0, 267.0), (896.0, 274.0), (890.0, 278.0), (883.0, 286.0), (883.0, 286.0), (878.0, 293.0), (873.0, 300.0), (869.0, 309.0), (863.0, 318.0), (858.0, 329.0), (858.0, 329.0), (851.0, 338.0), (846.0, 349.0), (840.0, 359.0), (835.0, 371.0), (830.0, 384.0), (830.0, 384.0), (825.0, 397.0), (818.0, 410.0), (812.0, 424.0), (807.25, 437.875), (802.5, 451.75), (797.75, 465.625), (793.0, 479.5), (788.25, 493.375), (783.5, 507.25), (778.75, 521.125), (774.0, 535.0), (773.0, 537.0), (768.0, 550.0), (761.0, 572.0), (754.0, 592.0), (750.0, 615.0), (748.0, 624.0), (748.0, 624.0), (739.0, 652.0), (733.0, 674.0), (728.0, 698.0), (727.0, 718.0), (718.0, 733.0), (718.0, 733.0), (714.0, 732.0), (709.0, 729.0), (705.0, 728.0), (702.0, 729.0), (694.0, 728.0), (696.0, 728.0), (692.0, 728.0), (688.0, 730.0), (684.0, 730.0), (678.0, 731.0), (675.0, 734.0), (675.0, 734.0), (673.0, 737.0), (667.0, 741.0), (664.0, 743.0), (659.0, 749.0), (653.0, 755.0), (653.0, 755.0), (650.0, 759.0), (647.0, 765.0), (642.0, 774.0), (636.0, 780.0), (633.0, 786.0), (633.0, 787.0), (630.0, 796.0), (625.0, 804.0), (629.0, 769.0), (634.0, 737.0), (633.0, 718.0), (633.0, 718.0), (640.0, 697.0), (644.0, 657.0), (649.0, 640.0), (651.0, 616.0), (655.0, 592.0), (654.0, 591.0), (654.0, 578.0), (656.0, 560.0), (659.0, 544.0), (662.0, 525.0), (663.5, 514.25), (665.0, 503.5), (666.5, 492.75), (668.0, 482.0), (670.3333333333334, 470.6666666666667), (672.6666666666666, 459.3333333333333), (675.0, 448.0), (675.0, 448.0), (676.0, 437.5), (677.0, 427.0), (677.0, 419.0), (678.0, 410.0), (678.0, 404.0), (678.0, 404.0), (679.0, 394.0), (682.0, 394.0), (682.0, 385.0), (682.0, 380.0), (683.0, 374.0), (683.0, 374.0), (684.0, 370.0), (684.0, 367.0), (684.0, 364.0), (685.0, 361.0), (686.0, 359.0), (686.0, 359.0), (686.0, 357.0), (686.0, 356.0), (687.0, 353.0), (686.0, 353.0), (687.0, 352.0), (687.0, 352.0), (688.0, 350.0), (687.0, 339.0), (685.0, 329.0), (687.0, 318.0), (686.0, 309.0), (687.0, 309.0), (681.0, 300.0), (686.0, 293.0), (688.0, 283.0), (689.0, 273.0), (688.0, 268.0), (689.0, 270.0), (689.0, 261.0), (688.0, 256.0), (688.0, 250.0), (689.0, 243.0), (688.0, 238.0), (688.0, 238.0), (690.0, 237.0), (690.0, 231.0), (690.0, 228.0), (691.0, 226.0), (696.0, 227.0), (699.0, 226.0), (705.0, 227.0), (710.3, 227.7), (715.6, 228.4), (720.9, 229.1), (726.2, 229.8), (731.5, 230.5), (736.8, 231.2), (742.1, 231.9), (747.4, 232.6), (752.7, 233.3), (758.0, 234.0), (758.0, 234.0), (762.0, 239.0), (769.0, 241.0), (775.0, 243.0), (780.0, 246.0), (787.0, 250.0), (787.0, 250.0), (793.0, 253.0), (800.0, 256.0), (806.0, 261.0), (812.0, 263.0), (820.0, 266.0), (820.0, 266.0), (826.0, 271.0), (832.0, 274.0), (840.0, 279.0), (845.0, 283.0), (851.0, 289.0), (852.0, 289.0), (858.0, 296.0), (866.0, 299.0), (874.0, 306.0), (879.0, 312.0), (888.0, 318.0), (888.0, 318.0), (893.0, 323.0), (900.0, 330.0), (908.0, 338.0), (914.0, 344.0), (922.0, 350.0), (922.0, 350.0), (928.0, 360.0), (937.0, 367.0), (945.0, 378.0), (950.0, 384.0), (955.6666666666666, 390.0), (961.3333333333334, 396.0), (967.0, 402.0), (974.0, 411.0), (980.0, 421.0), (989.0, 428.0), (995.5, 437.0), (1002.0, 446.0), (1008.5, 455.0), (1015.0, 464.0), (1021.5, 473.0), (1028.0, 482.0), (1034.5, 491.0), (1041.0, 500.0), (1047.5, 509.0), (1054.0, 518.0), (1061.0, 533.0), (1066.0, 543.0), (1076.0, 557.0), (1077.0, 558.0), (1087.0, 569.0), (1093.0, 585.0), (1101.0, 601.0), (1110.0, 614.0), (1119.0, 629.0), (1119.0, 629.0), (1128.0, 642.0), (1136.0, 662.0), (1142.25, 667.0833333333334), (1148.5, 672.1666666666666), (1154.75, 677.25), (1161.0, 682.3333333333334), (1167.25, 687.4166666666666), (1173.5, 692.5), (1179.75, 697.5833333333334), (1186.0, 702.6666666666666), (1192.25, 707.75), (1198.5, 712.8333333333334), (1204.75, 717.9166666666666), (1211.0, 723.0), (1216.0, 718.0), (1220.0, 719.0), (1226.0, 719.0), (1227.0, 718.0), (1232.0, 718.0), (1238.0, 719.0), (1243.0, 721.0), (1252.0, 721.0), (1256.0, 721.0), (1256.0, 721.0), (1262.0, 725.0), (1268.0, 728.0), (1273.0, 731.0), (1280.0, 734.0), (1286.0, 737.0), (1286.0, 737.0), (1293.0, 742.0), (1298.0, 746.0), (1305.0, 749.0), (1302.0, 720.0), (1299.0, 691.0), (1299.0, 691.0), (1295.0, 668.0), (1295.0, 649.0), (1288.0, 623.0), (1285.0, 597.0), (1280.0, 571.0), (1280.0, 571.0), (1277.0, 552.0), (1274.4444444444443, 538.4444444444445), (1271.888888888889, 524.8888888888889), (1269.3333333333333, 511.3333333333333), (1266.7777777777778, 497.77777777777777), (1264.2222222222222, 484.22222222222223), (1261.6666666666667, 470.6666666666667), (1259.111111111111, 457.1111111111111), (1256.5555555555557, 443.55555555555554), (1254.0, 430.0), (1249.0, 417.0), (1249.0, 417.0), (1246.0, 409.0), (1242.0, 399.0), (1239.0, 392.0), (1237.0, 384.0), (1234.0, 379.0), (1234.0, 379.0), (1231.0, 373.0), (1230.0, 367.0), (1227.0, 364.0), (1225.0, 361.0), (1222.0, 358.0), (1222.0, 358.0), (1220.0, 356.0), (1219.0, 353.0), (1214.0, 353.0), (1212.0, 352.0), (1209.0, 350.0), (1209.0, 350.0), (1207.0, 351.0), (1206.0, 350.0), (1204.0, 352.0), (1202.0, 350.0), (1202.0, 335.0), (1202.0, 335.0), (1200.0, 324.0), (1198.0, 313.0), (1196.0, 302.5), (1194.0, 292.0), (1195.0, 281.0), (1195.0, 281.0), (1194.0, 273.0), (1191.0, 263.0), (1191.0, 256.0), (1191.0, 247.0), (1190.0, 239.0), (1190.0, 239.0), (1189.0, 234.0), (1189.0, 228.0), (1189.0, 221.0), (1188.0, 216.0), (1186.0, 213.0), (1187.0, 212.0), (1184.0, 209.0), (1183.0, 205.0), (1182.0, 200.0), (1181.0, 195.0), (1181.0, 195.0), (1181.0, 195.0), (1178.4, 195.16190476190476), (1175.8, 195.32380952380953), (1173.2, 195.4857142857143), (1170.6, 195.64761904761906), (1168.0, 195.8095238095238), (1165.4, 195.97142857142856), (1162.8, 196.13333333333333), (1160.2, 196.2952380952381), (1157.6, 196.45714285714286), (1155.0, 196.61904761904762), (1152.4, 196.78095238095239), (1149.8, 196.94285714285715), (1147.2, 197.10476190476192), (1144.6, 197.26666666666668), (1142.0, 197.42857142857142), (1139.4, 197.59047619047618), (1136.8, 197.75238095238095), (1134.2, 197.9142857142857), (1131.6, 198.07619047619048), (1129.0, 198.23809523809524), (1126.4, 198.4), (1123.8, 198.56190476190477), (1121.2, 198.72380952380954), (1118.6, 198.8857142857143), (1116.0, 199.04761904761904), (1113.4, 199.2095238095238), (1110.8, 199.37142857142857), (1108.2, 199.53333333333333), (1105.6, 199.6952380952381), (1103.0, 199.85714285714286), (1100.4, 200.01904761904763), (1097.8, 200.1809523809524), (1095.2, 200.34285714285716), (1092.6, 200.5047619047619), (1090.0, 200.66666666666666), (1087.4, 200.82857142857142), (1084.8, 200.9904761904762), (1082.2, 201.15238095238095), (1079.6, 201.31428571428572), (1077.0, 201.47619047619048), (1074.4, 201.63809523809525), (1071.8, 201.8), (1069.2, 201.96190476190475), (1066.6, 202.1238095238095), (1064.0, 202.28571428571428), (1061.4, 202.44761904761904), (1058.8, 202.6095238095238), (1056.2, 202.77142857142857), (1053.6, 202.93333333333334), (1051.0, 203.0952380952381), (1048.4, 203.25714285714287), (1045.8, 203.41904761904763), (1043.2, 203.58095238095237), (1040.6, 203.74285714285713), (1038.0, 203.9047619047619), (1035.4, 204.06666666666666), (1032.8, 204.22857142857143), (1030.2, 204.3904761904762), (1027.6, 204.55238095238096), (1025.0, 204.71428571428572), (1022.4, 204.8761904761905), (1019.8, 205.03809523809525), (1017.2, 205.2), (1014.6, 205.36190476190475), (1012.0, 205.52380952380952), (1009.4, 205.68571428571428), (1006.8, 205.84761904761905), (1004.2, 206.0095238095238), (1001.6, 206.17142857142858), (999.0, 206.33333333333334), (996.4, 206.4952380952381), (993.8, 206.65714285714284), (991.2, 206.8190476190476), (988.6, 206.98095238095237), (986.0, 207.14285714285714), (983.4, 207.3047619047619), (980.8, 207.46666666666667), (978.2, 207.62857142857143), (975.6, 207.7904761904762), (973.0, 207.95238095238096), (970.4, 208.11428571428573), (967.8, 208.27619047619046), (965.2, 208.43809523809523), (962.6, 208.6), (960.0, 208.76190476190476), (957.4, 208.92380952380952), (954.8, 209.0857142857143), (952.2, 209.24761904761905), (949.6, 209.40952380952382), (947.0, 209.57142857142858), (944.4, 209.73333333333335), (941.8, 209.89523809523808), (939.2, 210.05714285714285), (936.6, 210.21904761904761), (934.0, 210.38095238095238), (931.4, 210.54285714285714), (928.8, 210.7047619047619), (926.2, 210.86666666666667), (923.5999999999999, 211.02857142857144), (921.0, 211.1904761904762), (918.4, 211.35238095238094), (915.8, 211.5142857142857), (913.2, 211.67619047619047), (910.5999999999999, 211.83809523809524), (908.0, 212.0), (906.0, 222.0), (901.0, 235.0), (900.0, 235.0), (898.0, 249.0), (893.0, 263.0), (888.0, 276.0), (883.0, 292.0), (878.0, 303.0), (871.0, 426.3333333333333), (864.0, 549.6666666666666), (857.0, 673.0), (860.0, 519.0), (863.0, 365.0), (859.0, 384.0), (859.0, 384.0), (855.0, 398.0), (851.0, 411.0), (849.0, 412.0), (845.0, 413.0), (841.0, 414.0), (841.0, 414.0), (837.0, 414.0), (835.0, 413.0), (830.0, 415.0), (828.0, 416.0), (825.0, 416.0), (825.0, 416.0), (821.0, 419.0), (817.0, 421.0), (816.0, 424.0), (813.0, 425.0), (809.0, 423.0), (809.0, 423.0), (805.0, 405.0), (804.0, 378.0), (803.0, 360.0), (799.0, 340.0), (800.0, 324.0), (800.0, 324.0), (797.6666666666666, 307.3333333333333), (795.3333333333334, 290.6666666666667), (793.0, 274.0), (791.0, 259.0), (788.0, 248.0), (788.0, 248.0), (787.0, 235.0), (783.0, 224.0), (783.0, 214.0), (781.0, 204.0), (785.6875, 229.8125), (790.375, 255.625), (795.0625, 281.4375), (799.75, 307.25), (804.4375, 333.0625), (809.125, 358.875), (813.8125, 384.6875), (818.5, 410.5), (823.1875, 436.3125), (827.875, 462.125), (832.5625, 487.9375), (837.25, 513.75), (841.9375, 539.5625), (846.625, 565.375), (851.3125, 591.1875), (856.0, 617.0), (857.0, 617.0), (860.0, 617.0), (855.2727272727273, 580.0), (850.5454545454545, 543.0), (845.8181818181819, 506.0), (841.0909090909091, 469.0), (836.3636363636364, 432.0), (831.6363636363636, 395.0), (826.9090909090909, 358.0), (822.1818181818181, 321.0), (817.4545454545455, 284.0), (812.7272727272727, 247.0), (808.0, 210.0), (814.0, 226.0), (818.0, 239.0), (820.0, 238.0), (824.0, 250.0), (830.0, 260.0), (836.0, 275.0), (839.0, 286.0), (843.3333333333334, 297.6666666666667), (847.6666666666666, 309.3333333333333), (852.0, 321.0), (858.0, 334.0), (860.0, 350.0), (868.0, 366.0), (875.0, 383.0), (875.0, 383.0), (880.0, 402.0), (885.0, 418.0), (891.4285714285714, 428.0), (897.8571428571429, 438.0), (904.2857142857143, 448.0), (910.7142857142857, 458.0), (917.1428571428571, 468.0), (923.5714285714286, 478.0), (930.0, 488.0), (936.4285714285714, 498.0), (942.8571428571429, 508.0), (949.2857142857143, 518.0), (955.7142857142858, 528.0), (962.1428571428571, 538.0), (968.5714285714286, 548.0), (975.0, 558.0), (991.0, 561.0), (991.0, 561.0), (994.0, 570.0), (997.0, 579.0), (1000.3333333333334, 578.6666666666666), (1003.6666666666666, 578.3333333333334), (1007.0, 578.0), (1010.3333333333334, 577.6666666666666), (1013.6666666666666, 577.3333333333334), (1017.0, 577.0), (992.0, 529.0), (967.0, 481.0), (942.0, 433.0), (942.0, 433.0), (943.0, 424.0), (944.0, 420.0), (946.0, 412.0), (949.0, 407.0), (948.0, 401.0), (948.0, 401.0), (948.0, 397.0), (949.0, 391.0), (950.0, 391.0), (952.0, 385.0), (954.0, 381.0), (954.0, 381.0), (954.0, 378.0), (954.0, 375.0), (955.0, 372.0), (956.0, 371.0), (956.0, 368.0), (956.0, 368.0), (956.0, 368.0), (960.0, 365.0), (959.0, 363.0), (960.0, 364.0), (961.0, 364.0), (961.0, 364.0), (963.0, 363.0), (963.0, 364.0), (962.0, 364.0), (965.0, 365.0), (967.0, 367.0), (967.0, 367.0), (967.0, 367.0), (966.0, 370.0), (966.0, 371.0), (968.0, 374.0), (969.0, 377.0), (969.0, 377.0), (969.0, 381.0), (969.0, 384.0), (969.0, 388.0), (970.5, 391.0), (972.0, 394.0), (972.0, 394.0), (971.0, 399.0), (972.0, 404.0), (973.0, 409.0), (972.0, 414.0), (973.0, 418.0), (973.0, 418.0), (973.0, 424.0), (973.0, 430.0), (972.0, 437.0), (972.1, 436.3), (972.2, 435.6), (972.3, 434.9), (972.4, 434.2), (972.5, 433.5), (972.6, 432.8), (972.7, 432.1), (972.8, 431.4), (972.9, 430.7), (973.0, 430.0), (974.0, 423.0), (974.0, 416.0), (974.0, 411.0), (974.0, 407.0), (974.0, 407.0), (973.0, 403.0), (972.0, 396.0), (971.5, 392.5), (971.0, 389.0), (973.0, 385.0), (973.0, 385.0), (972.0, 384.0), (973.0, 379.0), (972.0, 377.0), (971.0, 374.0), (972.0, 373.0), (973.0, 373.0), (972.0, 372.9375), (971.0, 372.875), (970.0, 372.8125), (969.0, 372.75), (968.0, 372.6875), (967.0, 372.625), (966.0, 372.5625), (965.0, 372.5), (964.0, 372.4375), (963.0, 372.375), (962.0, 372.3125), (961.0, 372.25), (960.0, 372.1875), (959.0, 372.125), (958.0, 372.0625), (957.0, 372.0), (956.3529411764706, 374.3529411764706), (955.7058823529412, 376.70588235294116), (955.0588235294117, 379.05882352941177), (954.4117647058823, 381.4117647058824), (953.7647058823529, 383.7647058823529), (953.1176470588235, 386.11764705882354), (952.4705882352941, 388.47058823529414), (951.8235294117648, 390.8235294117647), (951.1764705882352, 393.1764705882353), (950.5294117647059, 395.52941176470586), (949.8823529411765, 397.88235294117646), (949.2352941176471, 400.2352941176471), (948.5882352941177, 402.5882352941176), (947.9411764705883, 404.94117647058823), (947.2941176470588, 407.29411764705884), (946.6470588235294, 409.6470588235294), (946.0, 412.0), (941.0, 413.0), (935.0, 414.0), (936.0, 414.0), (929.0, 414.0), (922.0, 413.0), (914.0, 414.0), (908.0, 416.0), (902.0, 417.0), (902.0, 417.0), (894.0, 418.0), (889.0, 422.0), (882.0, 424.0), (873.0, 425.0), (867.0, 428.0), (867.0, 428.0), (861.0, 436.0), (853.0, 437.0), (846.8888888888889, 442.5), (840.7777777777778, 448.0), (834.6666666666666, 453.5), (828.5555555555555, 459.0), (822.4444444444445, 464.5), (816.3333333333334, 470.0), (810.2222222222222, 475.5), (804.1111111111111, 481.0), (798.0, 486.5), (791.8888888888889, 492.0), (785.7777777777778, 497.5), (779.6666666666666, 503.0), (773.5555555555555, 508.5), (767.4444444444445, 514.0), (761.3333333333334, 519.5), (755.2222222222222, 525.0), (749.1111111111111, 530.5), (743.0, 536.0), (738.0, 543.0), (732.0, 552.0), (732.0, 545.0), (732.0, 545.0), (734.0, 532.0), (723.0, 549.0), (712.0, 566.0), (701.0, 583.0), (711.8333333333334, 556.6666666666666), (722.6666666666666, 530.3333333333334), (733.5, 504.0), (744.3333333333334, 477.6666666666667), (755.1666666666666, 451.33333333333337), (766.0, 425.0), (770.0, 413.0), (769.0, 414.0), (774.0, 405.0), (776.0, 392.0), (780.0, 384.0), (783.0, 374.0), (788.0, 363.0), (788.0, 363.0), (791.0, 354.0), (794.0, 346.0), (799.0, 339.0), (802.0, 331.0), (805.0, 324.0), (805.0, 324.0), (808.0, 319.0), (813.0, 312.0), (814.0, 304.0), (818.0, 299.0), (824.0, 295.0), (824.0, 295.0), (828.0, 288.0), (828.0, 285.0), (832.0, 280.0), (835.0, 276.0), (838.0, 274.0), (838.0, 274.0), (842.0, 269.0), (846.0, 266.0), (848.0, 265.0), (852.0, 262.0), (855.0, 260.0), (855.0, 260.0), (857.0, 259.0), (861.0, 256.0), (864.5, 254.5), (868.0, 253.0), (885.75, 281.4166666666667), (903.5, 309.8333333333333), (921.25, 338.25), (939.0, 366.6666666666667), (956.75, 395.08333333333337), (974.5, 423.5), (992.25, 451.9166666666667), (1010.0, 480.33333333333337), (1027.75, 508.75), (1045.5, 537.1666666666667), (1063.25, 565.5833333333334), (1081.0, 594.0), (1091.0, 586.0), (1091.0, 586.0), (1103.0, 573.0), (1113.0, 564.0), (1126.0, 553.0), (1140.0, 542.0), (1150.0, 533.0), (1150.0, 533.0), (1163.0, 523.0), (1163.0, 523.0), (1163.0, 523.0), (1163.0, 523.0), (1163.0, 523.0), (1163.0, 523.0), (1163.0, 523.0), (1163.0, 523.0), (1163.0, 523.0), (1163.0, 523.0), (1163.0, 523.0), (1163.0, 523.0), (1163.0, 523.0), (1163.0, 523.0), (1163.0, 523.0), (1163.0, 523.0), (1163.0, 523.0), (1163.0, 523.0), (1163.0, 523.0), (1163.0, 523.0), (1163.0, 523.0), (1163.0, 523.0), (1163.0, 523.0), (1163.0, 523.0)] Using these coordinates I build a DataFrame consisting of 3 columns: x, y, bounce (coordinate where the ball touches the court - found manually) Sample: ... x y bounce 0 985.0 325.0 0 1 985.0 325.0 0 2 985.0 325.0 0 3 985.0 325.0 0 4 985.0 325.0 0 .. ... ... ... 921 1163.0 523.0 0 922 1163.0 523.0 0 923 1163.0 523.0 0 924 1163.0 523.0 0 925 1275.0 572.0 1 [926 rows x 3 columns] If I plot the x and y coordinates against the frame number and do a scatter plot for the bounce points as well, I get I can see that there is a certain pattern, the bounce happen 10-30 frames before the peak (local Max/local Min) but the ML model I build using sklearn can't seem to capture it. import numpy as np from sklearn.model_selection import train_test_split, GridSearchCV from sklearn.linear_model import LogisticRegression from sklearn.preprocessing import StandardScaler from sklearn.metrics import confusion_matrix X = df.drop('bounce', 1) y = df['bounce'] scaler = StandardScaler() X_scaled = scaler.fit_transform(X) X_train, X_test, y_train, y_test = train_test_split(X, y, stratify=y) grid={"C":np.logspace(-3,3,7), "penalty":["l1","l2"]}# l1 lasso l2 ridge logreg = LogisticRegression(C = 0.001, penalty='l2') logreg.fit(X_train, y_train) y_pred = logreg.predict(X_test) tn, fp, fn, tp = confusion_matrix(y_test, y_pred).ravel() print(tn, fp, fn, tp) >>> 381 0 6 0 As far as I know, for sklearn ML models looks for relationship across columns, whereas every row is a new case. In my case there isn't much across the columns but rather the rows are of higher value, how can I train my model accordingly?
Consider the frames as time point and the data as a time series data would help capture the relationship better. Time series models have different methods of training and it would be better to reframe the prediction question accordingly. This Post seems like a good starting point for this question.
Correlation analysis using seaborn : TypeError: 'float' object cannot be interpreted as an integer
I have a dataframe V of the following form: ECON1 ECON2 ECON3 FOOD1 FOOD2 FOOD3 ENV1 \ 28 0.310071 0.096913 0.228500 0.234986 0.260894 0.267858 0.489309 28 0.353609 0.045075 0.222571 0.222803 0.248388 0.330560 0.060107 28 0.280600 0.170201 0.232027 0.226792 0.233379 0.316765 0.114550 28 0.299062 0.127866 0.198080 0.189948 0.222982 0.327082 0.052881 28 0.346291 0.645534 0.371397 0.389068 0.380557 0.386004 0.186583 ENV2 HEA1 HEA2 HEA3 PERS1 PERS2 PERS3 \ 28 0.206320 0.252537 0.266968 0.248452 0.184450 0.093345 0.173952 28 -0.206570 0.263673 0.126182 0.265908 0.134481 0.191341 0.113324 28 0.237818 0.257337 0.102037 0.214423 0.159002 0.321451 0.165960 28 0.345857 0.272412 0.069192 0.251301 0.130606 0.132732 0.174925 28 0.372713 0.382155 0.373531 0.468293 0.364305 0.299510 0.350822 COM1 COM2 POL1 POL2 28 0.781430 0.487822 0.361886 0.233124 28 0.083918 0.005381 0.266604 0.237078 28 0.395897 0.257888 0.330607 0.229079 28 0.000000 0.000000 0.307907 0.238908 28 0.188402 0.101147 0.410619 0.385933 I am trying to do a correlation analysis as follows: import seaborn as sb corr = V.corr() ax = sb.heatmap( corr, vmin=-1, vmax=1, center=0, cmap=sb.diverging_palette(20, 220, n=200), square=True ) ax.set_xticklabels( ax.get_xticklabels(), rotation=45, horizontalalignment='right' ); I get an error as follows: TypeError: 'float' object cannot be interpreted as an integer Not sure how to interpret this error. Can someone comment on this please? additional information on the correlation matrix print(corr) ECON1 ECON2 ECON3 FOOD1 FOOD2 FOOD3 ENV1 \ ECON1 1.000000 0.341774 0.498779 0.522529 0.588714 0.503961 -0.074569 ECON2 0.341774 1.000000 0.964742 0.951770 0.932538 0.785570 0.003878 ECON3 0.498779 0.964742 1.000000 0.998125 0.983827 0.734790 0.104750 FOOD1 0.522529 0.951770 0.998125 1.000000 0.991068 0.703027 0.153686 FOOD2 0.588714 0.932538 0.983827 0.991068 1.000000 0.683437 0.192360 FOOD3 0.503961 0.785570 0.734790 0.703027 0.683437 1.000000 -0.580854 ENV1 -0.074569 0.003878 0.104750 0.153686 0.192360 -0.580854 1.000000 ENV2 -0.475257 0.564601 0.369804 0.349462 0.328092 0.202113 0.183099 HEA1 0.518089 0.971623 0.948098 0.938049 0.941533 0.857258 -0.087292 HEA2 0.492331 0.760587 0.854620 0.882823 0.909930 0.320175 0.579590 HEA3 0.637159 0.933654 0.949112 0.949667 0.970425 0.798348 0.014684 PERS1 0.435383 0.965742 0.986036 0.988420 0.983967 0.656593 0.222572 PERS2 0.006943 0.584600 0.574856 0.535135 0.424989 0.647732 -0.423388 PERS3 0.278137 0.981872 0.931251 0.923784 0.918289 0.687020 0.134177 COM1 -0.323141 -0.151890 -0.047608 -0.009682 -0.018765 -0.702210 0.913371 COM2 -0.405013 -0.141136 -0.060505 -0.026537 -0.041302 -0.702745 0.897211 POL1 0.024764 0.819855 0.797155 0.804438 0.792430 0.291577 0.526974 POL2 0.534160 0.974790 0.970808 0.965523 0.969961 0.813307 -0.000965 ENV2 HEA1 HEA2 HEA3 PERS1 PERS2 PERS3 \ ECON1 -0.475257 0.518089 0.492331 0.637159 0.435383 0.006943 0.278137 ECON2 0.564601 0.971623 0.760587 0.933654 0.965742 0.584600 0.981872 ECON3 0.369804 0.948098 0.854620 0.949112 0.986036 0.574856 0.931251 FOOD1 0.349462 0.938049 0.882823 0.949667 0.988420 0.535135 0.923784 FOOD2 0.328092 0.941533 0.909930 0.970425 0.983967 0.424989 0.918289 FOOD3 0.202113 0.857258 0.320175 0.798348 0.656593 0.647732 0.687020 ENV1 0.183099 -0.087292 0.579590 0.014684 0.222572 -0.423388 0.134177 ENV2 1.000000 0.440689 0.309514 0.335610 0.473824 0.161769 0.664619 HEA1 0.440689 1.000000 0.738058 0.982913 0.938014 0.492595 0.945905 HEA2 0.309514 0.738058 1.000000 0.811820 0.901376 0.157842 0.801182 HEA3 0.335610 0.982913 0.811820 1.000000 0.942849 0.387558 0.915053 PERS1 0.473824 0.938014 0.901376 0.942849 1.000000 0.472608 0.963744 PERS2 0.161769 0.492595 0.157842 0.387558 0.472608 1.000000 0.447905 PERS3 0.664619 0.945905 0.801182 0.915053 0.963744 0.447905 1.000000 COM1 0.106662 -0.304509 0.362041 -0.239231 0.040733 -0.226292 -0.058492 COM2 0.185397 -0.307438 0.332330 -0.257903 0.034155 -0.208413 -0.041872 POL1 0.727061 0.707109 0.856765 0.695222 0.875352 0.297894 0.887691 POL2 0.424788 0.995079 0.798982 0.989886 0.965114 0.480057 0.953595 COM1 COM2 POL1 POL2 ECON1 -0.323141 -0.405013 0.024764 0.534160 ECON2 -0.151890 -0.141136 0.819855 0.974790 ECON3 -0.047608 -0.060505 0.797155 0.970808 FOOD1 -0.009682 -0.026537 0.804438 0.965523 FOOD2 -0.018765 -0.041302 0.792430 0.969961 FOOD3 -0.702210 -0.702745 0.291577 0.813307 ENV1 0.913371 0.897211 0.526974 -0.000965 ENV2 0.106662 0.185397 0.727061 0.424788 HEA1 -0.304509 -0.307438 0.707109 0.995079 HEA2 0.362041 0.332330 0.856765 0.798982 HEA3 -0.239231 -0.257903 0.695222 0.989886 PERS1 0.040733 0.034155 0.875352 0.965114 PERS2 -0.226292 -0.208413 0.297894 0.480057 PERS3 -0.058492 -0.041872 0.887691 0.953595 COM1 1.000000 0.995152 0.397261 -0.217775 COM2 0.995152 1.000000 0.419501 -0.225367 POL1 0.397261 0.419501 1.000000 0.748706 POL2 -0.217775 -0.225367 0.748706 1.000000
You might want to look into this issue: https://github.com/mwaskom/seaborn/issues/1907 The issue seems to come from cmap=sns.diverging_palette(20, 220, n=200), You might need to update your seaborn installation Works just fine for me. import seaborn as sns # sns version '0.11.0' corr = df_P5p5.corr() ax = sns.heatmap( corr, vmin=-1, vmax=1, center=0, cmap=sns.diverging_palette(20, 220, n=200), square=True ) ax.set_xticklabels( ax.get_xticklabels(), rotation=45, horizontalalignment='right' ); Dataframe: absh_0 absh_p absh_m absh_0_1 absh_p_1 absh_m_1 \ 599866 0.000177 0.000004 0.021056 0.000035 0.000013 1.484300 427635 0.000309 0.000006 0.017254 0.000074 0.000021 1.881500 1833852 0.000032 0.000005 0.016329 0.000006 0.000065 0.244173 690821 0.000040 0.000035 0.030917 0.000064 0.000101 1.063950 1098632 0.000327 0.000002 0.017160 0.000056 0.000016 0.005837 ... ... ... ... ... ... ... 617761 0.000341 0.000007 0.009808 0.000061 0.000011 0.491265 204467 0.000437 0.000021 0.012242 0.000019 0.000059 1.515220 932372 0.000036 0.000022 0.035300 0.000028 0.000073 1.089760 1584400 0.000023 0.000005 0.014236 0.000001 0.000059 1.662190 139578 0.000212 0.000005 0.015321 0.000009 0.000087 0.741250 absh_p_2 absh_m_2; CQe_2322 CLQ1_2223 P_5p_LQ5_LHCb 599866 2.283040e-07 1.085160e-05 -0.162193 0.670895 -0.570265 427635 2.789950e-08 1.895490e-05 -0.204701 0.742776 -0.577415 1833852 3.995840e-06 7.339210e-06 0.658051 0.984142 -0.560692 690821 1.061680e-05 2.352440e-05 -0.566117 0.734917 -0.622448 1098632 1.566270e-06 2.679160e-05 -0.376097 0.649306 -0.585776 ... ... ... ... ... ... 617761 2.077150e-06 3.115670e-05 0.079413 0.568284 -0.494631 204467 1.397560e-06 1.893320e-05 0.104801 0.618369 -0.565908 932372 1.335230e-05 6.610640e-08 0.225752 1.086700 -0.622773 1584400 1.609910e-05 3.062290e-06 -0.110411 0.635001 -0.560502 139578 9.748530e-06 7.800600e-06 -0.122956 0.679417 -0.628816 [100000 rows x 11 columns] Correlation matrix absh_0 absh_p absh_m absh_0_1 absh_p_1 absh_m_1 \ absh_0 1.000000 0.034578 0.097363 0.095424 -0.091923 0.195620 absh_p 0.034578 1.000000 0.403523 -0.001839 0.047511 0.136713 absh_m 0.097363 0.403523 1.000000 -0.004896 -0.005719 0.340453 absh_0_1 0.095424 -0.001839 -0.004896 1.000000 0.049618 -0.001182 absh_p_1 -0.091923 0.047511 -0.005719 0.049618 1.000000 -0.069683 absh_m_1 0.195620 0.136713 0.340453 -0.001182 -0.069683 1.000000 absh_p_2 -0.050823 0.021416 -0.000820 0.180376 0.496774 -0.023613 absh_m_2; 0.167619 -0.019075 -0.059183 0.246883 -0.032227 -0.219272 CQe_2322 -0.103104 -0.071771 -0.153265 -0.106895 0.028045 -0.412171 CLQ1_2223 -0.125011 -0.036544 -0.068685 -0.011385 0.030520 -0.253707 P_5p_LQ5_LHCb 0.001508 -0.006292 -0.020996 0.163136 0.122048 -0.121965 absh_p_2 absh_m_2; CQe_2322 CLQ1_2223 P_5p_LQ5_LHCb absh_0 -0.050823 0.167619 -0.103104 -0.125011 0.001508 absh_p 0.021416 -0.019075 -0.071771 -0.036544 -0.006292 absh_m -0.000820 -0.059183 -0.153265 -0.068685 -0.020996 absh_0_1 0.180376 0.246883 -0.106895 -0.011385 0.163136 absh_p_1 0.496774 -0.032227 0.028045 0.030520 0.122048 absh_m_1 -0.023613 -0.219272 -0.412171 -0.253707 -0.121965 absh_p_2 1.000000 -0.099868 -0.020970 0.023178 0.274502 absh_m_2; -0.099868 1.000000 -0.194679 -0.109361 0.122653 CQe_2322 -0.020970 -0.194679 1.000000 0.651148 0.006585 CLQ1_2223 0.023178 -0.109361 0.651148 1.000000 -0.003935 P_5p_LQ5_LHCb 0.274502 0.122653 0.006585 -0.003935 1.000000 Plot:
VTK file format error for VTK_Vertex
I am trying to visualize particle data in Paraview. I have no problem using the VTK file format PDF to visualize unstructured grid data (with 3 or 4 sided cells): http://www.vtk.org/wp-content/uploads/2015/04/file-formats.pdf However, I am having trouble getting point data to load into paraview. A simple particle file (that doesn't work) follows: <VTKFile type="UnstructuredGrid" version="0.1" byte_order="LittleEndian"> <UnstructuredGrid> <Piece NumberOfPoints=“2” NumberOfCells=“2”> <CellData Scalars="scalars"> <DataArray type="Float64" Name=“Particle Strengths" NumberOfComponents="1" Format="ascii"> -0.174227 -0.0716306 </DataArray> </CellData> <Points> <DataArray type="Float64" Name="Position" NumberOfComponents="3" Format="ascii"> 0.867532 0.186254 -0.00153193 1 0.157078 0 </DataArray> </Points> <Cells> <DataArray type="Int32" Name="connectivity" Format="ascii"> 0 1 </DataArray> <DataArray type="Int32" Name="offsets" Format="ascii"> 1 2 </DataArray> <DataArray type=“UInt8” Name="types" Format="ascii"> 1 1 </DataArray> </Cells> </Piece> </UnstructuredGrid> For reference, I am getting this error when trying to load into paraview, which makes it sound like 2 is not an acceptable number of points. Any ideas? ERROR: In /Users/kitware/Dashboards/MyTests/NightlyMaster/ParaViewSuperbuild- Release-Python27/paraview/src/paraview/VTK/IO/XMLParser/vtkXMLParser.cxx, line 483 vtkXMLDataParser (0x7f848c224cf0): Error parsing XML in stream at line 3, column 24, byte index 118: not well-formed (invalid token) ERROR: In /Users/kitware/Dashboards/MyTests/NightlyMaster/ParaViewSuperbuild- Release-Python27/paraview/src/paraview/VTK/IO/XML/vtkXMLReader.cxx, line 448 vtkXMLUnstructuredGridReader (0x7f848c2a0d40): Error parsing input file. ReadXMLInformation aborting. ERROR: In /Users/kitware/Dashboards/MyTests/NightlyMaster/ParaViewSuperbuild- Release-Python27/paraview/src/paraview/VTK/Common/ExecutionModel/vtkExecutive.cxx, line 784 vtkPVCompositeDataPipeline (0x7f848c292a50): Algorithm vtkXMLUnstructuredGridReader(0x7f848c2a0d40) returned failure for request: vtkInformation (0x7f848c224c80) Debug: Off Modified Time: 304502 Reference Count: 1 Registered Events: (none) Request: REQUEST_INFORMATION ALGORITHM_AFTER_FORWARD: 1 FORWARD_DIRECTION: 0
Ubuntu kernel modules for applications
We can see there are a lot of modules in the Ubuntu OS. How are these modules are being utilized, and by whom? Is there an example that shows some application interfacing one of these modules via ioctl or /dev/something? For example, there is aesni_intel module, and it seems to me that it provides AES functionality using Intel's special instruction set for the AES algorithm. Who is utilizing this feature? Is there any representative case? Is there any document or reference that explains the details of these modules? Google doesn’t give me anything. root#ubuntu:/dev/dri# lsmod Module Size Used by vsock 52846 0 acpiphp 23954 0 coretemp 13355 0 ghash_clmulni_intel 13259 0 aesni_intel 55399 0 aes_x86_64 17255 1 aesni_intel xts 12885 1 aesni_intel lrw 13257 1 aesni_intel gf128mul 14951 2 lrw,xts ablk_helper 13597 1 aesni_intel cryptd 20373 3 ghash_clmulni_intel,aesni_intel,ablk_helper snd_ens1371 25378 2 snd_ac97_codec 130268 1 snd_ens1371 ac97_bus 12766 1 snd_ac97_codec gameport 15515 1 snd_ens1371 snd_pcm 97451 2 snd_ac97_codec,snd_ens1371 snd_page_alloc 18710 1 snd_pcm snd_seq_midi 13324 0 vmw_balloon 12673 0 snd_seq_midi_event 14899 1 snd_seq_midi snd_rawmidi 30180 2 snd_ens1371,snd_seq_midi microcode 22881 0 psmouse 95870 0 serio_raw 13215 0 snd_seq 61554 2 snd_seq_midi_event,snd_seq_midi snd_seq_device 14497 3 snd_seq,snd_rawmidi,snd_seq_midi snd_timer 29425 2 snd_pcm,snd_seq joydev 17377 0 btusb 22474 0 snd 68876 11 snd_ac97_codec,snd_timer,snd_pcm,snd_seq,snd_rawmidi,snd_ens1371,snd_seq_device soundcore 12680 1 snd vmwgfx 130610 3 rfcomm 42641 12 bnep 18036 2 ttm 83187 1 vmwgfx parport_pc 28152 1 ppdev 17073 0 bluetooth 228619 22 bnep,btusb,rfcomm drm 286313 4 ttm,vmwgfx vmci 87554 1 vsock i2c_piix4 13266 0 shpchp 37032 0 mac_hid 13205 0 lp 17759 0 parport 46345 3 lp,ppdev,parport_pc hid_generic 12540 0 usbhid 47074 0 hid 101002 2 hid_generic,usbhid mptspi 22529 2 e1000 114507 0 mptscsih 40289 1 mptspi mptbase 101888 2 mptspi,mptscsih floppy 69449 0 vmxnet 26564 0 vmw_pvscsi 22358 0 vmxnet3 44609 0
look for the module's name in /usr/src/linux/Documentation. (For example, documentation on the sound modules is found in /usr/src/linux/Documentation/sound.) if you do not have the kernel docs installed, have a look here: https://www.kernel.org/doc/Documentation/
sorting scientific number with sort 8.21
I need to sort this file by column 3 then 2 then 1 9.2500e-02 9.7500e-01 1.2500e-01 5.0521e+00 9.2500e-01 9.7500e-01 1.2500e-02 5.0259e+00 9.2500e-02 9.7500e-02 1.2500e-02 4.9924e+00 9.2500e-01 9.7500e-02 2.7500e-03 4.9657e+00 9.2500e-02 9.7500e-03 2.7500e-03 5.0267e+00 9.2500e-01 9.7500e-02 2.7500e-03 5.0003e+00 So far I was using sort (version 8.13) sort -k 3,3g -k 2,2g -k 1,1g file to obtain the correct output: 9.2500e-02 9.7500e-03 2.7500e-03 5.0267e+00 9.2500e-01 9.7500e-02 2.7500e-03 4.9657e+00 9.2500e-01 9.7500e-02 2.7500e-03 5.0003e+00 9.2500e-02 9.7500e-02 1.2500e-02 4.9924e+00 9.2500e-01 9.7500e-01 1.2500e-02 5.0259e+00 9.2500e-02 9.7500e-01 1.2500e-01 5.0521e+00 Since I have upgraded my system (sort is now version 8.21), the above command gives me 9.2500e-01 9.7500e-01 1.2500e-02 5.0259e+00 9.2500e-02 9.7500e-01 1.2500e-01 5.0521e+00 9.2500e-02 9.7500e-02 1.2500e-02 4.9924e+00 9.2500e-01 9.7500e-02 2.7500e-03 4.9657e+00 9.2500e-01 9.7500e-02 2.7500e-03 5.0003e+00 9.2500e-02 9.7500e-03 2.7500e-03 5.0267e+00 Any idea about what is going on and how to do this?