From 3f45c72a3eb71b8fc102de1d0450fc597dea6fd9 Mon Sep 17 00:00:00 2001 From: Natanael Date: Tue, 3 Sep 2024 22:30:19 -0300 Subject: [PATCH] fix legacy pixscale --- components/xtable/XTableBody.tsx | 4 ++-- services/LegacyService.ts | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/components/xtable/XTableBody.tsx b/components/xtable/XTableBody.tsx index e947a46..9829174 100644 --- a/components/xtable/XTableBody.tsx +++ b/components/xtable/XTableBody.tsx @@ -206,11 +206,11 @@ export default function XTableBody() { // legacy imaging column if (schema.legacyImaging) { - const size = Math.round((tcState.legacyImaging.pixelScale * 600) / 0.4) row.legacyImaging = legacyService.getRGBUrl( ra, dec, - size, + 600, + tcState.legacyImaging.pixelScale, tcState.legacyImaging.dataRelease ) } diff --git a/services/LegacyService.ts b/services/LegacyService.ts index 52829f4..5aba545 100644 --- a/services/LegacyService.ts +++ b/services/LegacyService.ts @@ -53,10 +53,11 @@ export default class LegacyService { ra: number | string, dec: number | string, size: number | string = 600, + pixscale: number | string = 0.55, dataRelease: string = '10', ) { const layer = dataRelease == '10' ? 'ls-dr10' : 'ls-dr9' - return `${LEGACY_RGB}?ra=${ra}&dec=${dec}&layer=${layer}&pixscale=0.4&size=${size}` + return `${LEGACY_RGB}?ra=${ra}&dec=${dec}&layer=${layer}&pixscale=${pixscale}&size=${size}` } async getNearbyRedshift(ra: any, dec: any, radius: number) {