mikecokina / elisa

GNU General Public License v2.0
15 stars 5 forks source link

run the demo01-basics.ipynb that bug in the binarysystem, #14

Closed wangnengdejiamao closed 1 year ago

wangnengdejiamao commented 2 years ago

bs = BinarySystem( primary=primary, secondary=secondary, argument_of_periastron=58 u.deg, gamma=-30.7 u.km / u.s, period=2.5 u.d, eccentricity=0.0, inclination=85 u.deg, primary_minimum_time=2440000.00000 u.d, phase_shift=0.0, distance = 153 u.pc )

ValueError Traceback (most recent call last)

in 9 primary_minimum_time=2440000.00000 * u.d, 10 phase_shift=0.0, ---> 11 distance = 153 * u.pc 12 ) ~/opt/anaconda3/envs/ljm/lib/python3.6/site-packages/elisa/binary_system/system.py in __init__(self, primary, secondary, name, **kwargs) 235 def __init__(self, primary, secondary, name=None, **kwargs): 236 # initial validity checks --> 237 utils.invalid_kwarg_checker(kwargs, BinarySystem.ALL_KWARGS, self.__class__) 238 utils.check_missing_kwargs(BinarySystem.MANDATORY_KWARGS, kwargs, instance_of=BinarySystem) 239 self.object_params_validity_check(dict(primary=primary, secondary=secondary), self.STAR_MANDATORY_KWARGS) ~/opt/anaconda3/envs/ljm/lib/python3.6/site-packages/elisa/utils.py in invalid_kwarg_checker(kwargs, kwarglist, instance) 39 invalid_kwargs = [kwarg for kwarg in kwargs if kwarg not in kwarglist] 40 if len(invalid_kwargs) > 0: ---> 41 raise ValueError(f'Invalid keyword argument(s): {", ".join(invalid_kwargs)} ' 42 f'in class instance {instance.__name__}.\n ' 43 f'List of available parameters: {", ".join(kwarglist)}') ValueError: Invalid keyword argument(s): distance in class instance BinarySystem. List of available parameters: inclination, period, eccentricity, argument_of_periastron, gamma, phase_shift, additional_light, primary_minimum_time
mirofedurco commented 2 years ago

Hi,

the implementation of the distances is a new feature that will be included in the upcoming release of ELISa v0.6. For know you can install the development version using command pip install git+https://github.com/mikecokina/elisa.git@dev.

wangnengdejiamao commented 2 years ago

Thank you very much for your help, the problem is solved.

mikecokina commented 1 year ago

I consider this issue as resolved. Closing.

wangnengdejiamao commented 1 year ago

我是林佳茂,你的邮件我已经收到了,我会尽快查阅的~~