Skip to content

Commit

Permalink
Convert numbers to integer and float when converting xisf metadata to…
Browse files Browse the repository at this point in the history
… fits header
  • Loading branch information
Steffenhir committed Oct 20, 2023
1 parent 1565746 commit 4a4fd73
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions graxpert/astroimage.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,11 @@ def xisf_imagedata_2_fitsheader(self):
if key in commentary_keys:
if value == "":
value = comment

if value.isdigit():
value = int(value)
elif value.isdecimal():
value = float(value)

self.fits_header[key] = (value, comment)

Expand Down

0 comments on commit 4a4fd73

Please sign in to comment.