Skip to content

Commit

Permalink
Merge pull request #185 from observerly/feature/wcs/WCS
Browse files Browse the repository at this point in the history
feat: add `json:` struct tags to WCS in wcs module in @observerly/skysolve
  • Loading branch information
michealroberts authored Jan 28, 2025
2 parents 24d2c48 + 737b8c0 commit f846f4f
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions pkg/wcs/wcs.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

/*****************************************************************************************************************/
Expand Down

0 comments on commit f846f4f

Please sign in to comment.