Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add horizontal paramaters to FITSObservation struct in @observerly/iris #231

Merged
merged 1 commit into from
Oct 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions pkg/fits/fits.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ type FITSObservation struct {
Equinox float32 `json:"equinox"` // Equinox of observation e.g., J2000
RA float32 `json:"ra"` // Right Ascension of observation
Dec float32 `json:"dec"` // Declination of observation
Altitude float32 `json:"altitude"` // Altitude of the observation
Azimuth float32 `json:"azimuth"` // Azimuth of the observation
Airmass float32 `json:"airmass"` // Airmass of the observation
Refraction float32 `json:"refraction"` // Refraction of the observation
Object string `json:"object"` // The name for the object observed
Telescope string `json:"telescope"` // The telescope used to acquire the data
Instrument string `json:"instrument"` // The instrument used to acquire the data
Expand Down Expand Up @@ -191,6 +195,15 @@ func (f *FITSImage) AddObservationEntry(observation *FITSObservation) *FITSImage
Comment: "Equinox of observation e.g., Julian 2000.0",
}

// Necessary for Twirl API Plate Solving
f.Header.Strings["RADESYS"] = struct {
Value string
Comment string
}{
Value: "ICRS",
Comment: "International Celestial Reference System",
}

// Necessary for Twirl API Plate Solving
f.Header.Floats["RA"] = struct {
Value float32
Expand All @@ -200,6 +213,22 @@ func (f *FITSImage) AddObservationEntry(observation *FITSObservation) *FITSImage
Comment: "Right Ascension (in degrees) of the observation",
}

f.Header.Floats["ALT"] = struct {
Value float32
Comment string
}{
Value: observation.Altitude,
Comment: "Altitude (in degrees) of the observation",
}

f.Header.Floats["AZ"] = struct {
Value float32
Comment string
}{
Value: observation.Azimuth,
Comment: "Azimuth (in degrees) of the observation",
}

// Necessary for Twirl API Plate Solving
f.Header.Floats["DEC"] = struct {
Value float32
Expand All @@ -209,6 +238,22 @@ func (f *FITSImage) AddObservationEntry(observation *FITSObservation) *FITSImage
Comment: "Declination (in degrees) of the observation",
}

f.Header.Floats["AIRMASS"] = struct {
Value float32
Comment string
}{
Value: observation.Airmass,
Comment: "Airmass of the observation (sec z)",
}

f.Header.Floats["REFRACT"] = struct {
Value float32
Comment string
}{
Value: observation.Refraction,
Comment: "Refraction correction (in degrees) of the observation",
}

f.Header.Strings["OBJECT"] = struct {
Value string
Comment string
Expand Down
Loading