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

stats do not work with nans in the fits file #148

Open
bennahugo opened this issue Jul 21, 2022 · 0 comments
Open

stats do not work with nans in the fits file #148

bennahugo opened this issue Jul 21, 2022 · 0 comments

Comments

@bennahugo
Copy link
Collaborator

Traceback (most recent call last):
  File "/home/hugo/workspace/tigger/TigGUI/Plot/SkyModelPlot.py", line 1966, in _measureRuler
    tiptext += f"   x={x} y={y} value=blank" % (x, y) if flag else f"   x={x} y={y} value={val:.6g}"
TypeError: not all arguments converted during string formatting
Traceback (most recent call last):
  File "/home/hugo/workspace/tigger/TigGUI/Plot/SkyModelPlot.py", line 1966, in _measureRuler
    tiptext += f"   x={x} y={y} value=blank" % (x, y) if flag else f"   x={x} y={y} value={val:.6g}"
TypeError: not all arguments converted during string formatting
Traceback (most recent call last):
  File "/home/hugo/workspace/tigger/TigGUI/Plot/SkyModelPlot.py", line 1966, in _measureRuler
    tiptext += f"   x={x} y={y} value=blank" % (x, y) if flag else f"   x={x} y={y} value={val:.6g}"
TypeError: not all arguments converted during string formatting
Traceback (most recent call last):
  File "/home/hugo/workspace/tigger/TigGUI/Plot/SkyModelPlot.py", line 1966, in _measureRuler
    tiptext += f"   x={x} y={y} value=blank" % (x, y) if flag else f"   x={x} y={y} value={val:.6g}"
TypeError: not all arguments converted during string formatting
Traceback (most recent call last):
  File "/home/hugo/workspace/tigger/TigGUI/Plot/SkyModelPlot.py", line 1966, in _measureRuler
    tiptext += f"   x={x} y={y} value=blank" % (x, y) if flag else f"   x={x} y={y} value={val:.6g}"
TypeError: not all arguments converted during string formatting
Traceback (most recent call last):
  File "/home/hugo/workspace/tigger/TigGUI/Plot/SkyModelPlot.py", line 1966, in _measureRuler
    tiptext += f"   x={x} y={y} value=blank" % (x, y) if flag else f"   x={x} y={y} value={val:.6g}"
TypeError: not all arguments converted during string formatting
Traceback (most recent call last):
  File "/home/hugo/workspace/tigger/TigGUI/Plot/SkyModelPlot.py", line 1966, in _measureRuler
    tiptext += f"   x={x} y={y} value=blank" % (x, y) if flag else f"   x={x} y={y} value={val:.6g}"
TypeError: not all arguments converted during string formatting
Traceback (most recent call last):
  File "/home/hugo/workspace/tigger/TigGUI/Plot/SkyModelPlot.py", line 1966, in _measureRuler
    tiptext += f"   x={x} y={y} value=blank" % (x, y) if flag else f"   x={x} y={y} value={val:.6g}"
TypeError: not all arguments converted during string formatting
Traceback (most recent call last):
  File "/home/hugo/workspace/tigger/TigGUI/Plot/SkyModelPlot.py", line 1966, in _measureRuler
    tiptext += f"   x={x} y={y} value=blank" % (x, y) if flag else f"   x={x} y={y} value={val:.6g}"
TypeError: not all arguments converted during string formatting
Traceback (most recent call last):
  File "/home/hugo/workspace/tigger/TigGUI/Plot/SkyModelPlot.py", line 1966, in _measureRuler
    tiptext += f"   x={x} y={y} value=blank" % (x, y) if flag else f"   x={x} y={y} value={val:.6g}"
TypeError: not all arguments converted during string formatting
Traceback (most recent call last):
  File "/home/hugo/workspace/tigger/TigGUI/Plot/SkyModelPlot.py", line 1966, in _measureRuler
    tiptext += f"   x={x} y={y} value=blank" % (x, y) if flag else f"   x={x} y={y} value={val:.6g}"
TypeError: not all arguments converted during string formatting
Traceback (most recent call last):
  File "/home/hugo/workspace/tigger/TigGUI/Plot/SkyModelPlot.py", line 1966, in _measureRuler
    tiptext += f"   x={x} y={y} value=blank" % (x, y) if flag else f"   x={x} y={y} value={val:.6g}"
TypeError: not all arguments converted during string formatting
Traceback (most recent call last):
  File "/home/hugo/workspace/tigger/TigGUI/Plot/SkyModelPlot.py", line 1966, in _measureRuler
    tiptext += f"   x={x} y={y} value=blank" % (x, y) if flag else f"   x={x} y={y} value={val:.6g}"
TypeError: not all arguments converted during string formatting
Traceback (most recent call last):
  File "/home/hugo/workspace/tigger/TigGUI/Plot/SkyModelPlot.py", line 1966, in _measureRuler
    tiptext += f"   x={x} y={y} value=blank" % (x, y) if flag else f"   x={x} y={y} value={val:.6g}"
TypeError: not all arguments converted during string formatting
Traceback (most recent call last):
  File "/home/hugo/workspace/tigger/TigGUI/Plot/SkyModelPlot.py", line 1966, in _measureRuler
    tiptext += f"   x={x} y={y} value=blank" % (x, y) if flag else f"   x={x} y={y} value={val:.6g}"
TypeError: not all arguments converted during string formatting
Traceback (most recent call last):
  File "/home/hugo/workspace/tigger/TigGUI/Plot/SkyModelPlot.py", line 1966, in _measureRuler
    tiptext += f"   x={x} y={y} value=blank" % (x, y) if flag else f"   x={x} y={y} value={val:.6g}"
TypeError: not all arguments converted during string formatting
Traceback (most recent call last):
  File "/home/hugo/workspace/tigger/TigGUI/Plot/SkyModelPlot.py", line 1966, in _measureRuler
    tiptext += f"   x={x} y={y} value=blank" % (x, y) if flag else f"   x={x} y={y} value={val:.6g}"
TypeError: not all arguments converted during string formatting
Traceback (most recent call last):
  File "/home/hugo/workspace/tigger/TigGUI/Plot/SkyModelPlot.py", line 2298, in _selectRectStats
    self._selectImageSubset(zoomrect, image)
  File "/home/hugo/workspace/tigger/TigGUI/Plot/SkyModelPlot.py", line 2254, in _selectImageSubset
    stats = self._imgman.getLMRectStats(self._image_subset)
  File "/home/hugo/workspace/tigger/TigGUI/Images/Manager.py", line 474, in getLMRectStats
    return self._imagecons[0].renderControl().getLMRectStats(rect)
  File "/home/hugo/workspace/tigger/TigGUI/Images/RenderControl.py", line 374, in getLMRectStats
    mmin, mmax = measurements.extrema(subset, labels=mask, index=None if mask is None else False)[:2]
  File "/home/hugo/workspace/venvtiggernew/lib/python3.6/site-packages/scipy/ndimage/measurements.py", line 1316, in extrema
    find_max_positions=True)
  File "/home/hugo/workspace/venvtiggernew/lib/python3.6/site-packages/scipy/ndimage/measurements.py", line 819, in _select
    return single_group(input[mask], masked_positions)
  File "/home/hugo/workspace/venvtiggernew/lib/python3.6/site-packages/scipy/ndimage/measurements.py", line 790, in single_group
    result += [vals.min()]
  File "/home/hugo/workspace/venvtiggernew/lib/python3.6/site-packages/numpy/core/_methods.py", line 43, in _amin
    return umr_minimum(a, axis, None, out, keepdims, initial, where)
ValueError: zero-size array to reduction operation minimum which has no identity

Need to explicitly check if none finite and use nanstats

bennahugo added a commit that referenced this issue Jul 21, 2022
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