COSMOGRAIL / PyCS

Python Curve Shifting
http://www.cosmograil.org
GNU General Public License v3.0
4 stars 4 forks source link

sim.run.multirun : problem with kwargs_optim #24

Open mtewes opened 5 years ago

mtewes commented 5 years ago

Hi @martin-millon,

a user contacted me about a problem with a demo script (probably inspired by the ones given with pycs): it seems that this is related to a change in the positional arguments (namely, adding kwargs_optim) in sim.run.multirun.

Error:

Traceback (most recent call last):
File "pycs_test_j1206.py", line 70, in <module>
 pycs.sim.run.multirun("copies", lcs, myopt.spl,  optset="spl", tsrand=10.0, keepopt=True)
TypeError: multirun() takes at least 4 arguments (6 given)

Could you make this kwargs_optim optional, by setting it to None, and later "if None, make it an empty dict"? I'm asking you, as you are likely most aware of any potential related changes. Or if you prefer, modify the doc and demo files. Thanks!

martin-millon commented 5 years ago

OK, I have pushed the modification. This should indeed be optional. This option is made to pass arguments to the optimization function.