From 0a1c69d6041214cf185d750d2f2dee637dae604a Mon Sep 17 00:00:00 2001 From: alexandergagliano Date: Sun, 21 Apr 2024 21:31:25 -0400 Subject: [PATCH] Fix small bug in southern-hemisphere association --- astro_ghost/DLR.py | 1 - astro_ghost/PS1QueryFunctions.py | 4 ++-- astro_ghost/_version.py | 2 +- setup.py | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/astro_ghost/DLR.py b/astro_ghost/DLR.py index e3e839f..1f098bf 100644 --- a/astro_ghost/DLR.py +++ b/astro_ghost/DLR.py @@ -327,7 +327,6 @@ def chooseByDLR(path, hosts, transients, fn, orig_dict, todo="s"): #Subset so that we're less than 5 in DLR units #Tentative selection of the host with lowest DLR chosenHost = min(R_dict, key=R_dict.get) - print(chosenHost) #this is the right host! if R_dict[chosenHost] > 5.0: #If we can't find a host, say that this galaxy has no host diff --git a/astro_ghost/PS1QueryFunctions.py b/astro_ghost/PS1QueryFunctions.py index c1e0398..19ffaf5 100644 --- a/astro_ghost/PS1QueryFunctions.py +++ b/astro_ghost/PS1QueryFunctions.py @@ -779,8 +779,8 @@ def southernSearch(ra, dec, rad): #add the photometry columns tempDF = dfPhot[dfPhot['filter']==filter] - if len(tempDF) <1: - tempDF.append(pd.Series(), ignore_index=True) #add dummy row for the sake of not crashing + if len(tempDF) < 1: + pd.concat([tempDF, pd.Series()], ignore_index=True) #add dummy row for the sake of not crashing for col in tempDF.columns.values: if col != 'object_id': tempDF[filter + col] = tempDF[col] diff --git a/astro_ghost/_version.py b/astro_ghost/_version.py index 55fa725..f811561 100644 --- a/astro_ghost/_version.py +++ b/astro_ghost/_version.py @@ -1 +1 @@ -__version__ = '2.1.1' +__version__ = '2.1.2' diff --git a/setup.py b/setup.py index 27dc7ba..2a08f06 100755 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ from setuptools import setup -version = "2.1.1" +version = "2.1.2" VERSION_TEMPLATE = """ Note that we need to fall back to the hard-coded version if either