From 737b8c01208eead921e2d2c649aa8894109f3383 Mon Sep 17 00:00:00 2001 From: michealroberts Date: Tue, 28 Jan 2025 15:39:13 +0000 Subject: [PATCH] feat: add `json:` struct tags to WCS in wcs module in @observerly/skysolve feat: add `json:` struct tags to WCS in wcs module in @observerly/skysolve --- pkg/wcs/wcs.go | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/pkg/wcs/wcs.go b/pkg/wcs/wcs.go index cfb06d5..6ce9f6d 100644 --- a/pkg/wcs/wcs.go +++ b/pkg/wcs/wcs.go @@ -74,25 +74,25 @@ type WCSParams struct { /*****************************************************************************************************************/ type WCS struct { - WCAXES int `hdu:"WCAXES" default:"2"` // Number of world coordinate axes - CRPIX1 float64 `hdu:"CRPIX1"` // Reference pixel X - CRPIX2 float64 `hdu:"CRPIX2"` // Reference pixel Y - CRVAL1 float64 `hdu:"CRVAL1" default:"0.0"` // Reference RA (example default, often specific to image) - CRVAL2 float64 `hdu:"CRVAL2" default:"0.0"` // Reference Dec (example default, often specific to image) - CTYPE1 string `hdu:"CTYPE1" default:"RA---TAN"` // Coordinate type for axis 1, typically RA with TAN projection - CTYPE2 string `hdu:"CTYPE2" default:"DEC--TAN"` // Coordinate type for axis 2, typically DEC with TAN projection - CDELT1 float64 `hdu:"CDELT1"` // Coordinate increment for axis 1 (no default) - CDELT2 float64 `hdu:"CDELT2"` // Coordinate increment for axis 2 (no default) - CUNIT1 string `hdu:"CUNIT1" default:"deg"` // Coordinate unit for axis 1, defaulted to degrees - CUNIT2 string `hdu:"CUNIT2" default:"deg"` // Coordinate unit for axis 2, defaulted to degrees - CD1_1 float64 `hdu:"CD1_1"` // Affine transform parameter A (no default) - CD1_2 float64 `hdu:"CD1_2"` // Affine transform parameter B (no default) - CD2_1 float64 `hdu:"CD2_1"` // Affine transform parameter C (no default) - CD2_2 float64 `hdu:"CD2_2"` // Affine transform parameter D (no default) - E float64 `hdu:"E"` // Affine translation parameter e (optional, no default) - F float64 `hdu:"F"` // Affine translation parameter f (optional, no default) - FSIP transform.SIP2DForwardParameters `` // SIP forward transformation (distortion) coefficients - ISIP transform.SIP2DInverseParameters `` // SIP inverse transformation (distortion) coefficients + WCAXES int `json:"wcaxes" hdu:"WCAXES" default:"2"` // Number of world coordinate axes + CRPIX1 float64 `json:"crpix1" hdu:"CRPIX1"` // Reference pixel X + CRPIX2 float64 `json:"crpix2" hdu:"CRPIX2"` // Reference pixel Y + CRVAL1 float64 `json:"crval1" hdu:"CRVAL1" default:"0.0"` // Reference RA (example default, often specific to image) + CRVAL2 float64 `json:"crval2" hdu:"CRVAL2" default:"0.0"` // Reference Dec (example default, often specific to image) + CTYPE1 string `json:"ctype1" hdu:"CTYPE1" default:"RA---TAN"` // Coordinate type for axis 1, typically RA with TAN projection + CTYPE2 string `json:"ctype2" hdu:"CTYPE2" default:"DEC--TAN"` // Coordinate type for axis 2, typically DEC with TAN projection + CDELT1 float64 `json:"cdelt1" hdu:"CDELT1"` // Coordinate increment for axis 1 (no default) + CDELT2 float64 `json:"cdelt2" hdu:"CDELT2"` // Coordinate increment for axis 2 (no default) + CUNIT1 string `json:"cunit1" hdu:"CUNIT1" default:"deg"` // Coordinate unit for axis 1, defaulted to degrees + CUNIT2 string `json:"cunit2" hdu:"CUNIT2" default:"deg"` // Coordinate unit for axis 2, defaulted to degrees + CD1_1 float64 `json:"cd1_1" hdu:"CD1_1"` // Affine transform parameter A (no default) + CD1_2 float64 `json:"cd1_2" hdu:"CD1_2"` // Affine transform parameter B (no default) + CD2_1 float64 `json:"cd2_1" hdu:"CD2_1"` // Affine transform parameter C (no default) + CD2_2 float64 `json:"cd2_2" hdu:"CD2_2"` // Affine transform parameter D (no default) + E float64 `json:"e" hdu:"E"` // Affine translation parameter e (optional, no default) + F float64 `json:"f" hdu:"F"` // Affine translation parameter f (optional, no default) + FSIP transform.SIP2DForwardParameters `json:"fsip" hdu:"FSIP"` // SIP forward transformation (distortion) coefficients + ISIP transform.SIP2DInverseParameters `json:"isip" hdu:"ISIP"` // SIP inverse transformation (distortion) coefficients } /*****************************************************************************************************************/