Changelog¶
v0.7.6¶
Added xlabel and ylabel axes to
shgpy.plotter.easy_plot()
v0.7.5¶
- Fixed a number of tensors which were incorrectly defined due to typos in Boyd. The affected tensors were
D_6 (dipole)
C_4 (quadrupole)
C_4h (quadrupole)
S_4 (quadrupole)
v0.7.0¶
Officially transitioned to supporting only tensors for which all the involved symbols are purely real, as defined by
sympy
assumptions. This got rid of a lot of redundancy in function definitions, such asshgpy.fformgen.generate_contracted_fourier_transforms
versusshgpy.fformgen.generate_contracted_fourier_transforms_complex
,shgpy.formgen.formgen_dipole_quadrupole_real
andshgpy.formgen.formgen_dipole_quadrupole_complex
, ect. In all cases, these functions have been replaced by a single function, e.g.shgpy.formgen.formgen_dipole_quadrupole
, and you will receive aNotImplementedError
if you try to use any of the replaced definitions.To aid in explicitly defining the reality of SHG tensors, added
shgpy.make_tensor_real
to complementshgpy.make_tensor_complex
.Transitioned to compiling cost functions at runtime by generating C code with
sympy.ulities.codegen
. This is a workaround to the fact that complicatedsympy.lambdify
functions are very slow to evaluate.Added the ability to generate a cost function independently with
shgpy.fformfit.gen_cost_func()
and use it in one of the fitting routines by theload_cost_func_filename
argument.Added
shgpy.fformfit.dual_annealing_fit
andshgpy.fformfit.dual_annealing_fit_with_bounds
.
v0.6.1¶
Added the ability to optionally send arguments to the
scipy.optimize.basinhopping
function. This is useful e.g. for debugging – use
>>> basinhopping_kwargs = {'disp':True}
to send disp=True
to scipy.optimize.basinhopping
, which initializes verbose output.
v0.5.1¶
Fixed a bug related to the change in v0.5.0 in which
shgpy.load_fform()
wasn’t compatible with the new pickling scheme.
v0.5.0¶
In
.p
file handling, switched from pickling puresympy
expressions inshgpy.fformgen
to pickling string represetations of those expressions generated usingsympy.srepr
. This is a workaround to asympy
/pickle
bug in which unpicklingsympy
expressions will causesympy
to conflate objects likesympy.Symbol('x')
withsympy.Symbol('x', real=True)
.To use v0.5.0, you will have to remake your
.p
files.