get_velocity_profile() and annulus.get_vlos() with GP method fails at return
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 48/100
Direzione di ricerca
Start in annulus.py at annulus.get_vlos() and get_vlos_GP(), especially the return-handling code around the reported line 479. Reproduce the failure with tutorial_4 or the shown get_vlos(fit_method='GP') call, then verify that the GP method returns successfully without the ambiguous-array error.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
When running annulus.get_vlos(fit_method=''GP") returns this error. I got this error in tutorial_4 and with my own notebook trying to use get_velocity_profile().
100%|███████████████████████████████████████████████████████████████████████████████████████████| 1000/1000 [00:14<00:00, 69.43it/s]
ValueError Traceback (most recent call last)
Cell In[26], line 1
----> 1 print('v_phi = {:.0f} +- {:.0f} m/s'.format(*np.squeeze(annulus.get_vlos(fit_method='GP'))))
File ~/opt/anaconda3/envs/py310/lib/python3.10/site-packages/eddy/annulus.py:236, in annulus.get_vlos(self, p0, fit_method, fit_vrad, fix_vlsr, vrot_mask, vlsr_mask, vrad_mask, dv_mask, resample, optimize, nwalkers, nburnin, nsteps, scatter, signal, optimize_kwargs, mcmc, mcmc_kwargs, centroid_method, repeat_with_mask)
234 if fit_method == 'gp':
235 resample = False if resample is None else resample
--> 236 popt = self.get_vlos_GP(p0=p0,
237 fit_vrad=fit_vrad,
238 vlsr_mask=vlsr_mask,
239 dv_mask=dv_mask,
240 nwalkers=nwalkers,
241 nsteps=nsteps,
242 nburnin=nburnin,
243 scatter=scatter,
244 plots='none',
245 returns='percentiles',
246 resample=resample,
247 mcmc=mcmc,
248 optimize_kwargs=optimize_kwargs,
249 mcmc_kwargs=mcmc_kwargs)
251 cvar = 0.5 * (popt[:, 2] - popt[:, 0])
252 popt = np.array([popt[0, 1],
253 popt[1, 1] if fit_vrad else np.nan,
254 np.nan])
File ~/opt/anaconda3/envs/py310/lib/python3.10/site-packages/eddy/annulus.py:479, in annulus.get_vlos_GP(self, p0, fit_vrad, vlsr_mask, dv_mask, optimize, nwalkers, nburnin, nsteps, scatter, niter, plots, returns, resample, mcmc, optimize_kwargs, mcmc_kwargs)
477 idx = returns.index('percentiles')
478 returns[idx] = np.percentile(samples, [16, 50, 84], axis=0).T
--> 479 if 'samples' in returns:
480 idx = returns.index('samples')
481 returns[idx] = samples
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
- Lingua principale
- Python
- Stelle
- 23
- Fork
- 10
- Merge medio
- 28m
- PR unite (30g)
- 1
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di PlanetFormationLab/eddy
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
PlanetFormationLab/eddy#36 ·
-
StructureFunction2DStack.fit_spiral / calculate_modal_power has no per-annulus fault tolerance Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 78/100
PlanetFormationLab/eddy#39 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
PlanetFormationLab/eddy#35 ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
PlanetFormationLab/eddy#34 ·
-
vlsr prior is too narrow Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
PlanetFormationLab/eddy#33 · 2 commenti ·
Tutte le issue di PlanetFormationLab/eddy
Issue simili
-
area: harness bug status: needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
Human-Agent-Society/reef#625 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 80/100
learningequality/kolibri#15351 · 2 commenti ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Name consistency Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
eellak/triplestore#65 · 1 commento ·