Skip to content

Commit 2ee3de3

Browse files
committed
remove infiite in case of error
1 parent 8149c6d commit 2ee3de3

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

  • SEFramework/src/lib/CoordinateSystem

SEFramework/src/lib/CoordinateSystem/WCS.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,10 @@ ImageCoordinate WCS::worldToImage(WorldCoordinate world_coordinate) const {
255255
int ret_val = wcss2p(&wcs_copy, 1, 1, wc_array, &phi, &theta, ic_array, pc_array, &status);
256256
if (ret_val != WCSERR_SUCCESS) {
257257
logger.warn() << "Bad worldToImage from RA/Dec: " << wc_array[0] << "/" << wc_array[1];
258-
pc_array[0] = -std::numeric_limits<double>::infinity();
259-
pc_array[1] = -std::numeric_limits<double>::infinity();
258+
// pc_array[0] = -std::numeric_limits<double>::infinity();
259+
// pc_array[1] = -std::numeric_limits<double>::infinity();
260+
pc_array[0] = -10000000.0;
261+
pc_array[1] = -10000000.0;
260262
}
261263
wcsfree(&wcs_copy);
262264
return ImageCoordinate(pc_array[0] - 1, pc_array[1] - 1); // -1 as fits standard coordinates start at 1

0 commit comments

Comments
 (0)