PaNOSC-ViNYL / SimEx

Start-to-end photon experiment simulation platform
https://simex.readthedocs.io/
GNU General Public License v3.0
26 stars 25 forks source link

Fix data order of x and y for reading prop_out #166

Closed n01r closed 6 years ago

n01r commented 6 years ago

The data order for x and y was switched in the reader

def f_load_pulse(self, a_prop_out )

of the photon matter interaction module.

I loaded https://zenodo.org/record/888853 as the source file and went ahead with the start_to_end_demo.ipynb as mentioned in #163.

When I load the output of the pulse after propagation by hand, I can see the following

import h5py
xfp  = h5py.File( "./prop_out.h5" , "r" )
nx   = xfp.get( 'params/Mesh/nx' )   .value
ny   = xfp.get( 'params/Mesh/ny' )   .value
print( nx, ny )
[Out]: 84 42
arrEver = xfp.get( 'data/arrEver' )   .value
print( arrEver.shape )
[Out]: (42, 84, 258, 2)
# order: ny, nx, nSlices, ...

If this is the standard behaviour then this PR will fix that. Can you confirm @CFGrote?

CFGrote commented 6 years ago

@samoylv, can you also comment? looks good to me.