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

warnings emitted during divide by zero and invalid value encountered in multiply #18

Open
falkben opened this issue Apr 30, 2021 · 0 comments

Comments

@falkben
Copy link
Member

falkben commented Apr 30, 2021

we get a bunch of RuntimeWarnings on the last few steps of pipeline.

Possibly consider handling the divide/mult. differently (exclude zeros w/ np.where etc) to avoid these warnings, which might confuse the user.

Summing the images of filter uw1...
combine.py:224: RuntimeWarning: invalid value encountered in true_divide
  coicorr_rel = sum_datacube[2] / primary
combine.py:229: RuntimeWarning: invalid value encountered in true_divide
  notnan = np.isfinite(datacube[0]/datacube[1])
combine.py:230: RuntimeWarning: invalid value encountered in true_divide
  denom[notnan] += (datacube[0]/datacube[1])[notnan]
combine.py:231: RuntimeWarning: invalid value encountered in true_divide
  f_coi = primary / denom
combine.py:236: RuntimeWarning: invalid value encountered in true_divide
  notnan = np.isfinite(datacube[0]/datacube[3])
combine.py:237: RuntimeWarning: invalid value encountered in true_divide
  denom[notnan] += (datacube[0]/datacube[3])[notnan]
combine.py:238: RuntimeWarning: invalid value encountered in true_divide
  f_zp = primary / denom
combine.py:241: RuntimeWarning: invalid value encountered in sqrt
  poisson_rel = 1./np.sqrt(primary)
combine.py:241: RuntimeWarning: divide by zero encountered in true_divide
  poisson_rel = 1./np.sqrt(primary)
Normalizing the total sky image of filter uw1...
combine.py:274: RuntimeWarning: invalid value encountered in true_divide
  datacube[0] = datacube[0]/exp_data
Calibration and aperture correction (calibration.py)
Converting the units of the final image from counts/s to Jy and correcting for the aperture calibration...
calibration.py:48: RuntimeWarning: invalid value encountered in multiply
  poisson = hdulist[0].data[4] * primary
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