Skip to content

Commit

Permalink
precommit
Browse files Browse the repository at this point in the history
  • Loading branch information
wtbarnes committed Apr 5, 2024
1 parent ec78531 commit f49377b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions posts/2024/eclipse_helpers.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import astropy.units as u

from sunpy.time import parse_time


SOLAR_ECLIPSE_IMAGE = "total_solar_eclipse2017.jpg"


Expand Down Expand Up @@ -52,7 +50,9 @@ def get_camera_metadata(tags):
camera_metadata["author"] = tags["Image Artist"].values
if "EXIF DateTimeOriginal" in tags:
datetime_str = tags["EXIF DateTimeOriginal"].values.replace(" ", ":").split(":")
camera_metadata["time"] = parse_time(f"{'-'.join(datetime_str[:3])} {':'.join(datetime_str[3:])}")
camera_metadata["time"] = parse_time(
f"{'-'.join(datetime_str[:3])} {':'.join(datetime_str[3:])}"
)
if "Image Model" in tags:
camera_metadata["camera_model"] = tags["Image Model"].values

Expand Down

0 comments on commit f49377b

Please sign in to comment.