DataMedSci / pymchelper

Python toolkit for SHIELD-HIT12A and FLUKA
http://datamedsci.github.io/pymchelper/
15 stars 7 forks source link

Discussion on converters #358

Open grzanka opened 4 years ago

grzanka commented 4 years ago

Right now following converters are available:

positional arguments:
  converter
    txt          converts to plain txt file
    image        converts to PNG images
    excel        converts to MS Excel file
    hdf          converts to HDF file
    plotdata     converts to gnuplot data
    gnuplot      converts to gnuplot script
    inspect      prints metadata
    sparse       converts to sparse matrix format
    tripcube     converts to trip98 data cube
    tripddd      converts to trip98 ddd file

I would like to discuss naming and funcionality of some of them. The oldest one, namely txt is an equivalent of the old bdo2txt converter and is producing exactly the same output (using Fortran-like formatting), i.e:

#   DETECTOR OUTPUT MSH/DMSH
#   X BIN:     1 Y BIN:   100 Z BIN:     1
#   JPART:    -1 DETECTOR TYPE: ENERGY    
#   X START:-0.100D+01 Y START:-0.500D+01 Z START: 0.100D+02
#   X END  : 0.100D+01 Y END  : 0.500D+01 Z END  : 0.120D+02
#   PRIMARIES: 0.300D+04
 0.0000000E+00 -0.4950000E+01  0.1100000E+02  0.7468303173602919E-02
 0.0000000E+00 -0.4850000E+01  0.1100000E+02  0.8106817623222365E-02
 0.0000000E+00 -0.4750000E+01  0.1100000E+02  0.8401210886999192E-02
 0.0000000E+00 -0.4650000E+01  0.1100000E+02  0.8509474193308351E-02
 0.0000000E+00 -0.4550000E+01  0.1100000E+02  0.9730082428327397E-02
 0.0000000E+00 -0.4450000E+01  0.1100000E+02  0.1184107508916652E-01
 0.0000000E+00 -0.4350000E+01  0.1100000E+02  0.1170395899225091E-01
 0.0000000E+00 -0.4250000E+01  0.1100000E+02  0.9939687263975738E-02
 0.0000000E+00 -0.4150000E+01  0.1100000E+02  0.9605372797199595E-02
 0.0000000E+00 -0.4050000E+01  0.1100000E+02  0.1378746695705103E-01

Another useful converter is plotdata which for the same output is producing following output:

-4.95 0.0074683
-4.85 0.00810682
-4.75 0.00840121
-4.65 0.00850947
-4.55 0.00973008
-4.45 0.0118411
-4.35 0.011704
-4.25 0.00993969
-4.15 0.00960537
-4.05 0.0137875
(...)

To summarize:

What I have in mind is to:

@nbassler Do you have some ideas ?

nbassler commented 4 years ago

Yes, I had similar thoughts.

What I find really important, however is,:

What would be nice:

nbassler commented 4 years ago

One more note: DDD converter needs --projectile and --energy However, I think both are available from the .bdo file. Would be very nice to get rid of these in pymchelper. Related: https://github.com/pytrip/TRiPbase/issues/13

nbassler commented 4 years ago

One more note: DDD converter needs --projectile and --energy However, I think both are available from the .bdo file. Would be very nice to get rid of these in pymchelper. Related: pytrip/TRiPbase#13

Issue #366