Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

single star distortion method allows 'roche' and passes checks but fails on compute #379

Open
MichaelAbdul-Masih opened this issue Sep 3, 2020 · 0 comments
Assignees

Comments

@MichaelAbdul-Masih
Copy link
Contributor

MichaelAbdul-Masih commented Sep 3, 2020

import phoebe

s = phoebe.default_star()
s['distortion_method'].set_value('roche')
s.run_checks()
s.run_compute()

returns a nasty error that isn't caught (see below)

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/lhome/michael/software/anaconda/envs/phoebe_devel/lib/python3.8/site-packages/phoebe/parameters/parameters.py", line 398, in _send_if_client
    return fctn(self, *args, **kwargs)
  File "/lhome/michael/software/anaconda/envs/phoebe_devel/lib/python3.8/site-packages/phoebe/frontend/bundle.py", line 9695, in run_compute
    system, pblums_abs, pblums_scale, pblums_rel, pbfluxes = self.compute_pblums(compute=compute, ret_structured_dicts=True, skip_checks=True, **{k:v for k,v in kwargs.items() if k in computeparams.qualifiers})
  File "/lhome/michael/software/anaconda/envs/phoebe_devel/lib/python3.8/site-packages/phoebe/frontend/bundle.py", line 8738, in compute_pblums
    system = kwargs.get('system', self._compute_intrinsic_system_at_t0(compute=compute, datasets=pblum_datasets, **kwargs))
  File "/lhome/michael/software/anaconda/envs/phoebe_devel/lib/python3.8/site-packages/phoebe/frontend/bundle.py", line 8427, in _compute_intrinsic_system_at_t0
    system = backends.PhoebeBackend()._compute_intrinsic_system_at_t0(self, system_compute, datasets=datasets, reset=False, lc_only=False, **kwargs)
  File "/lhome/michael/software/anaconda/envs/phoebe_devel/lib/python3.8/site-packages/phoebe/backend/backends.py", line 870, in _compute_intrinsic_system_at_t0
    system.update_positions(t0, x0, y0, z0, vx0, vy0, vz0, etheta0, elongan0, eincl0, ignore_effects=True)
  File "/lhome/michael/software/anaconda/envs/phoebe_devel/lib/python3.8/site-packages/phoebe/backend/universe.py", line 299, in update_positions
    body.update_position(time, xs, ys, zs, vxs, vys, vzs,
  File "/lhome/michael/software/anaconda/envs/phoebe_devel/lib/python3.8/site-packages/phoebe/backend/universe.py", line 942, in update_position
    new_mesh_dict, scale = self._build_mesh(mesh_method=self.mesh_method)
  File "/lhome/michael/software/anaconda/envs/phoebe_devel/lib/python3.8/site-packages/phoebe/backend/universe.py", line 2072, in _build_mesh
    mesh_args = self.instantaneous_mesh_args
  File "/lhome/michael/software/anaconda/envs/phoebe_devel/lib/python3.8/site-packages/phoebe/backend/universe.py", line 2031, in instantaneous_mesh_args
    d = np.float64(self.instantaneous_d)
  File "/lhome/michael/software/anaconda/envs/phoebe_devel/lib/python3.8/site-packages/phoebe/backend/universe.py", line 1443, in instantaneous_d
    self.inst_vals['d'] = np.sqrt(sum([(_value(self._get_coords_by_index(c, self.ind_self)) -
  File "/lhome/michael/software/anaconda/envs/phoebe_devel/lib/python3.8/site-packages/phoebe/backend/universe.py", line 1444, in <listcomp>
    _value(self._get_coords_by_index(c, self.ind_sibling)))**2
  File "/lhome/michael/software/anaconda/envs/phoebe_devel/lib/python3.8/site-packages/phoebe/backend/universe.py", line 778, in _get_coords_by_index
    return np.average([_value(coords_array[i]) for i in index],
  File "<__array_function__ internals>", line 5, in average
  File "/lhome/michael/software/anaconda/envs/phoebe_devel/lib/python3.8/site-packages/numpy/lib/function_base.py", line 422, in average
    raise ZeroDivisionError(
ZeroDivisionError: Weights sum to zero, can't be normalized

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants