From 83ecf0d4a058be06d7ec6ea8b09c08d9676ff77a Mon Sep 17 00:00:00 2001 From: KCollins Date: Tue, 17 Sep 2024 17:54:09 -0400 Subject: [PATCH] WIP on #4 --- conjugate_map/conjCalcFunctions.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/conjugate_map/conjCalcFunctions.py b/conjugate_map/conjCalcFunctions.py index c667da6..1f30beb 100644 --- a/conjugate_map/conjCalcFunctions.py +++ b/conjugate_map/conjCalcFunctions.py @@ -1,14 +1,15 @@ """Functions for computing geomagnetic conjugate points.""" # Importing packages -import aacgmv2 import datetime as dt +import os + +import aacgmv2 from geopack import geopack as gp from geopack import t89 import gpxpy import gpxpy.gpx import numpy as np -import os import pandas as pd @@ -186,7 +187,7 @@ def conjcalc(gdf, latname="GLAT", lonname="GLON", lon = row[lonname] if is_verbose: print('Checking hemisphere.') - if type(lon) == str: + if isinstance(lon, str): if is_verbose: print('Longitude encoded as string. Fixing...') try: @@ -195,7 +196,7 @@ def conjcalc(gdf, latname="GLAT", lonname="GLON", except Exception as e: print(e) continue - if type(lat) == str: + if isinstance(lat, str): if is_verbose: print('Latitude encoded as string. Fixing...') try: