Skip to content

Commit 48df3f8

Browse files
committed
Bug fix: computation of tables that have coverage in a area too rough use healpix 4 instead of 2
1 parent 3501017 commit 48df3f8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/firefly/js/drawingLayers/hpx/TileDataMaker.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ function setupTileDataParams(drawLayer, table, plot, expanded) {
162162
const totalRows= table.totalRows;
163163

164164
const {centerWp, fov} = getPointMaxSide(plot, plot.viewDim);
165-
const coverageTblIds = hasCoverageTables(centerWp, fov, isHiPSAitoff(plot));
165+
const coverageTblIds = hasCoverageTables(centerWp, fov, plot);
166166
if (!centerWp || !coverageTblIds.includes(tbl_id)) return []; // this should force a clear for this layer
167167
const cells = getAllVisibleHiPSCells(norder, centerWp, fov*1.3, CoordSys.EQ_J2000, isHiPSAitoff(plot));
168168
const tblIdx = coverageTblIds.indexOf(tbl_id);
@@ -217,13 +217,13 @@ function addTo(ary,addAry) {
217217
}
218218

219219
function hasCoverageTables(centerWp, fov, plot) {
220-
const cells = getAllVisibleHiPSCells(MIN_NORDER_FOR_COVERAGE, centerWp, fov, CoordSys.EQ_J2000, isHiPSAitoff(plot));
220+
const cells = getAllVisibleHiPSCells(MIN_NORDER_FOR_COVERAGE+2, centerWp, fov, CoordSys.EQ_J2000, isHiPSAitoff(plot));
221221
if (!cells?.length) return 0;
222222
const ipixAry = cells.map(({ipix}) => ipix);
223223
return Object.entries(idxRoot())
224224
.filter(([, idxData]) => idxData.ready)
225225
.filter(([, idxData]) =>
226-
getKeysForOrder(idxData.orderData,MIN_NORDER_FOR_COVERAGE).some((ipix) => ipixAry.includes(ipix)))
226+
getKeysForOrder(idxData.orderData,MIN_NORDER_FOR_COVERAGE+2).some((ipix) => ipixAry.includes(ipix)))
227227
.map(([tbl_id]) => tbl_id);
228228
}
229229

0 commit comments

Comments
 (0)