Skip to content

Commit

Permalink
var weight squared
Browse files Browse the repository at this point in the history
  • Loading branch information
rcooke-ast committed Dec 18, 2024
1 parent 5291da0 commit ef1f63e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pypeit/core/datacube.py
Original file line number Diff line number Diff line change
Expand Up @@ -1822,7 +1822,7 @@ def subpixellate(output_wcs, bins, sciImg, ivarImg, waveImg, slitid_img_gpm, wgh
vox_coord = vox_coord.reshape(numpix * num_all_subpixels, 3)
# Use the "fast histogram" algorithm, that assumes regular bin spacing
flxcube += histogramdd(vox_coord, bins=outshape, range=binrng, weights=np.repeat(this_sci[this_sl] * this_wght_subpix[this_sl], num_all_subpixels) * subpix_wght)
varcube += histogramdd(vox_coord, bins=outshape, range=binrng, weights=np.repeat(this_var[this_sl] * this_wght_subpix[this_sl]**2, num_all_subpixels) * subpix_wght**3)
varcube += histogramdd(vox_coord, bins=outshape, range=binrng, weights=np.repeat(this_var[this_sl] * this_wght_subpix[this_sl]**2, num_all_subpixels) * subpix_wght**2) # NOTE :: This was changed from subpix_wght**3 to subpix_wght**2 by RJC on 2024-12-18
normcube += histogramdd(vox_coord, bins=outshape, range=binrng, weights=np.repeat(this_wght_subpix[this_sl], num_all_subpixels) * subpix_wght)

# Normalise the datacube and variance cube
Expand Down

0 comments on commit ef1f63e

Please sign in to comment.