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

Error when trying to estimate position only #6

Open
lenhofed opened this issue Apr 30, 2024 · 1 comment
Open

Error when trying to estimate position only #6

lenhofed opened this issue Apr 30, 2024 · 1 comment

Comments

@lenhofed
Copy link

lenhofed commented Apr 30, 2024

Dear mainteners,

I have tried to run GARPOS with estimating seafloor coordinates only (no gradient parameters) by setting the parameter inversiontype of the config file to 0.
However, this returns an error message from setup_model.py due to a division by zero.

I managed to make a quick and dirty fix that allows to make the program work. But further modification should be made for consistency.

Best regards,

EL

Modification :

mp_estimation.py
if invtyp == 0:
#knotint0 = 0.
#knotint1 = 0.
#knotint2 = 0.
pass

Error message :

suffix lamb0 lgrad mu_t mu_m
0 0.1 0.1 0.0 0.5
bin/garpos_v101/setup_model.py:135: RuntimeWarning: divide by zero encountered in scalar divide
nknots = [ int(obsdur/knint) for knint in knotintervals ]
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
File "multiprocessing/pool.py", line 51, in starmapstar
return list(itertools.starmap(args[0], args[1]))
File "bin/garpos_v101/mp_estimation.py", line 157, in MPestimate
knots = make_knots(shots, spdeg, knotintervals)
File "bin/garpos_v101/setup_model.py", line 135, in make_knots
nknots = [ int(obsdur/knint) for knint in knotintervals ]
File "bin/garpos_v101/setup_model.py", line 135, in
nknots = [ int(obsdur/knint) for knint in knotintervals ]
OverflowError: cannot convert float infinity to integer
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "bin//solveSingleEpoch.py", line 47, in
rf = drive_garpos(options.cfgfile, options.invcfg, odir, options.suf, mc)
File "bin/garpos_v101/garpos_main.py", line 169, in drive_garpos
outputs = parallelrun(inputs, maxcore)
File "bin/garpos_v101/garpos_main.py", line 65, in parallelrun
reslist = p.starmap(MPestimate, inp)
File "multiprocessing/pool.py", line 375, in starmap
return self._map_async(func, iterable, starmapstar, chunksize).get()
File "multiprocessing/pool.py", line 774, in get
raise self._value
OverflowError: cannot convert float infinity to integer

@hbxfgccgx
Copy link

hbxfgccgx commented Apr 30, 2024 via email

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

No branches or pull requests

2 participants