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

Math Domain Error #144

Open
DominikRh opened this issue Dec 24, 2020 · 0 comments
Open

Math Domain Error #144

DominikRh opened this issue Dec 24, 2020 · 0 comments

Comments

@DominikRh
Copy link

Dear authors,
I am using pybdsf to remove sources from artificial maps. Out of the 200 maps from this one particular run, one specific map results in a math domain error with the following console output:

Traceback (most recent call last):
  File "python-pybdsf-scripts/pybdsf-8.py", line 18, in <module>
    img = bdsf.process_image(input_image, quiet=True, frequency=850e9, beam = (14./3600, 14./3600, 0.), ncores=8)
  File "/users/drhiem/.local/lib/python2.7/site-packages/bdsf/__init__.py", line 253, in process_image
    img.process(**kwargs)
  File "/users/drhiem/.local/lib/python2.7/site-packages/bdsf/image.py", line 135, in process
    success = interface.process(self, **kwargs)
  File "/users/drhiem/.local/lib/python2.7/site-packages/bdsf/interface.py", line 62, in process
    _run_op_list(img, op_chain)
  File "/users/drhiem/.local/lib/python2.7/site-packages/bdsf/__init__.py", line 152, in _run_op_list
    op(img)
  File "/users/drhiem/.local/lib/python2.7/site-packages/bdsf/gaul2srl.py", line 61, in __call__
    src_index, source = self.process_CM(img, g_list, isl, src_index)
  File "/users/drhiem/.local/lib/python2.7/site-packages/bdsf/gaul2srl.py", line 194, in process_CM
    isl, delc, subn, subm)
  File "/users/drhiem/.local/lib/python2.7/site-packages/bdsf/gaul2srl.py", line 319, in process_Multiple
    mompara = func.momanalmask_gaus(subim_src, mask, isrc, bmar_p, True)
  File "/users/drhiem/.local/lib/python2.7/site-packages/bdsf/functions.py", line 583, in momanalmask_gaus
    mompara[4] = sqrt((m2[0]+m2[1]-sqrt((m2[0]-m2[1])*(m2[0]-m2[1])+4.0*m11*m11))/(2.0*tot))*fwsig
ValueError: math domain error

As far as I can tell, there is nothing unusual about this map, and as mentioned, this is the only map out of 200 with the same statistical properties where this error occurs. I have uploaded both the map and the log file here:
https://drive.google.com/drive/folders/12jSFdvqpWKZVZI8jTvyuxHEpYnL_rWLx?usp=sharing

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

1 participant