Changes between Version 11 and Version 12 of WikiStart


Ignore:
Timestamp:
04/12/18 09:59:28 (8 months ago)
Author:
turam
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WikiStart

    v11 v12  
    4848 
    4949The write benchmark can be passed the -c parameter to enable output compression. Both benchmarks take an optional -a parameter to request that homogeneous aggregates (i.e. "float4") be used instead of using separate arrays for each position/velocity component. 
     50 
     51== Python module == 
     52 
     53The repository includes a genericio Python module that can read genericio-formatted files and return numpy arrays. This is included in the standard build. To use it, once you've built genericio, you can read genericio data as follows: 
     54 
     55{{{ 
     56$ export PYTHONPATH=${GENERICIO_DIR}/python 
     57$ python 
     58>>> import genericio 
     59>>> genericio.gio_inspect('m000-99.fofproperties') 
     60Number of Elements: 1691 
     61[data type] Variable name 
     62--------------------------------------------- 
     63[i 32] fof_halo_count 
     64[i 64] fof_halo_tag 
     65[f 32] fof_halo_mass 
     66[f 32] fof_halo_mean_x 
     67[f 32] fof_halo_mean_y 
     68[f 32] fof_halo_mean_z 
     69[f 32] fof_halo_mean_vx 
     70[f 32] fof_halo_mean_vy 
     71[f 32] fof_halo_mean_vz 
     72[f 32] fof_halo_vel_disp 
     73 
     74(i=integer,f=floating point, number bits size) 
     75>>> genericio.gio_read('m000-99.fofproperties','fof_halo_mass') 
     76array([[  4.58575588e+13], 
     77       [  5.00464689e+13], 
     78       [  5.07078771e+12], 
     79       ...,  
     80       [  1.35221006e+13], 
     81       [  5.29125710e+12], 
     82       [  7.12849857e+12]], dtype=float32) 
     83 
     84}}}