Published September 29, 2017
| Version v0.3
Software
Open
skuschel/postpic: v0.3
Authors/Creators
- 1. HZDR, TU Dresden
Description
v0.3
2017-09-28
Many improvements in terms of speed and features. Unfortunately some changes are not backwards-compatible to v0.2.3, so you may have to adapt your code to the new interface. For details, see the corresponding section below.
Highlights
- kspace reconstruction and propagation of EM waves.
postpic.Fieldproperly handles operator overloading and slicing. Slicing can be index based (integers) or referring the actual physical extent on the axis of a Field object (using floats).- Expression based interface to particle properties (see below)
Incompatible adjustments to last version
- New dependency: Postpic requires the
numexprpackage to be installed now. - Expression based interface of for particles: If
msis apostpic.MultiSpeciesobject, then the callms.X()has been deprecated. Usems('x')instead. This new particle interface can handle expressions that thenumexprpackage understands. Alsoms('sqrt(x**2 + gamma - id)')is valid. This interface is easier to use, has better functionality and is faster due tonumexpr. The list of known per particle scalars and their definitions is available atpostpic.particle_scalars. In addition all constants ofscipy.constants.*can be used. In case you find particle scalar that you use regularly which is not in the list, please open an issue and let us know! - The
postpic.Fieldclass now behaves more like annumpy.ndarraywhich means that almost all functions return a new field object instead of modifying the current. This change affects the following functions:half_resolution,autoreduce,cutout,mean.
Other improvements and new features
postpic.helper.kspacecan reconstruct the correct k-space from three EM fields provided to distinguish between forward and backward propagating waves (thanks to @Ablinne)postpic.helper.kspace_propagatewill turn the phases in k-space to propagate the EM-wave.- List of new functions in
postpicfrompostpic.helper(thanks to @Ablinne):kspace_epoch_like,kspace,kspace_propagate. Field.fftfunction for fft optimized with pyfftw (thanks to @Ablinne).Field.__getitem__to slice a Field object. If integers are provided, it will interpret them as gridpoints. If float are provided they are interpreted as the physical region of the data and slice along the corresponding axis positions (thanks to @Ablinne).Fieldclass has been massively impoved (thanks to @Ablinne): The operator overloading is now properly implemented and thanks to__array__method, it can be interpreted by numpy as an ndarray whenever neccessary.- List of new functions of the
Fieldclass (thanks to @Ablinne):meshgrid,conj,replace_data,pad,transform,squeeze,integrate,fft,shift_grid_by,__getitem__,__setitem__. - List of new properties of the
Fieldclass (thanks to @Ablinne):matrix,real,imag,angle. - Many performance optimizations using pyfftw library (optional) or numexpr (now required by postpic) or by avoiding in memory data copying.
- Lots of fixes
Files
skuschel/postpic-v0.3.zip
Files
(114.2 kB)
| Name | Size | Download all |
|---|---|---|
|
md5:692014b96841272ca4b985743cc4524d
|
114.2 kB | Preview Download |
Additional details
Related works
- Is supplement to
- https://github.com/skuschel/postpic/tree/v0.3 (URL)