Skip to content

Commit

Permalink
refactor: amend NewFITSHeader to use h.Set in fits module in @observe…
Browse files Browse the repository at this point in the history
…rly/iris

refactor: amend NewFITSHeader to use h.Set in fits module in @observerly/iris
  • Loading branch information
michealroberts committed Nov 10, 2024
1 parent 8668e79 commit 7eb7a0f
Showing 1 changed file with 8 additions and 28 deletions.
36 changes: 8 additions & 28 deletions pkg/fits/header.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,37 +97,17 @@ func NewFITSHeader(naxis int32, naxis1 int32, naxis2 int32) FITSHeader {

h.Naxis2 = naxis2

h.Strings["TIMESYS"] = struct {
Value string
Comment string
}{
Value: "UTC",
Comment: "The temporal reference frame",
}
// Set the Time Refernce System header to default to UTC:
h.Set("TIMESYS", "UTC", "The temporal reference frame")

h.Dates["DATE"] = struct {
Value string
Comment string
}{
Value: time.Now().Format("2006-01-02"),
Comment: "Created Timestamp FITS file was generated",
}
// Set the date of the FITS file creation:
h.Set("DATE", time.Now().Format(time.RFC3339), "Created Timestamp FITS file was generated")

h.Strings["ORIGIN"] = struct {
Value string
Comment string
}{
Value: "observerly",
Comment: "The organization or institution responsible for creating the FITS file",
}
// Set the data origin to the observerly organization (for reference):
h.Set("ORIGIN", "observerly", "The organization or institution responsible for creating the FITS file")

h.Strings["PROGRAM"] = struct {
Value string
Comment string
}{
Value: "@observerly/iris",
Comment: "@observerly/iris FITS Exposure Generator",
}
// Set the FITS file creation software to the observerly/iris FITS Exposure Generator:
h.Set("PROGRAM", "@observerly/iris", "The software used to generate the FITS file")

return h
}
Expand Down

0 comments on commit 7eb7a0f

Please sign in to comment.