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

Plots breaking when using a file with multiple instruments #8

Open
Kamuish opened this issue Mar 22, 2024 · 1 comment
Open

Plots breaking when using a file with multiple instruments #8

Kamuish opened this issue Mar 22, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Kamuish
Copy link
Contributor

Kamuish commented Mar 22, 2024

Whenever a file has a column indicating the "number" of the instrument, the plot_random_samples and phase_plot break with the following error. There is no impact on normal operations of kima

Traceback (most recent call last):
  File "plot_kima.py", line 12, in <module>
    res.plot_random_samples()
  File "/data/work/amiguel/kima_target_analysis/WG1Andre/venv/lib/python3.8/site-packages/kima/pykima/display.py", line 2504, in plot_random_samples
    model = res.burst_model(sample, tt, model)
  File "/data/work/amiguel/kima_target_analysis/WG1Andre/venv/lib/python3.8/site-packages/kima/pykima/results.py", line 2206, in burst_model
    if self._time_overlaps[0]:
  File "/data/work/amiguel/kima_target_analysis/WG1Andre/venv/lib/python3.8/site-packages/kima/pykima/results.py", line 2428, in _time_overlaps
    t2min, t2max = minmax(self.data.t[self.data.obs == i + 1])
  File "/data/work/amiguel/kima_target_analysis/WG1Andre/venv/lib/python3.8/site-packages/kima/pykima/results.py", line 2414, in minmax
    return x.min(), x.max()
  File "/data/work/amiguel/kima_target_analysis/WG1Andre/venv/lib/python3.8/site-packages/numpy/core/_methods.py", line 45, in _amin
    return umr_minimum(a, axis, None, out, keepdims, initial, where)
ValueError: zero-size array to reduction operation minimum which has no identity
@j-faria j-faria added the bug Something isn't working label Mar 26, 2024
@j-faria j-faria changed the title [bug] Plots breaking when using a file with multiple instruments Plots breaking when using a file with multiple instruments Mar 26, 2024
@j-faria
Copy link
Contributor

j-faria commented May 15, 2024

@Kamuish, do you have a MWE where this error shows up? Or at least the structure of the data file you used?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants