astro-otter 0.3.4__py3-none-any.whl → 0.4.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of astro-otter might be problematic. Click here for more details.
- {astro_otter-0.3.4.dist-info → astro_otter-0.4.0.dist-info}/METADATA +1 -1
- {astro_otter-0.3.4.dist-info → astro_otter-0.4.0.dist-info}/RECORD +8 -8
- otter/_version.py +1 -1
- otter/io/otter.py +10 -10
- otter/io/transient.py +12 -0
- {astro_otter-0.3.4.dist-info → astro_otter-0.4.0.dist-info}/WHEEL +0 -0
- {astro_otter-0.3.4.dist-info → astro_otter-0.4.0.dist-info}/licenses/LICENSE +0 -0
- {astro_otter-0.3.4.dist-info → astro_otter-0.4.0.dist-info}/top_level.txt +0 -0
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
astro_otter-0.
|
|
1
|
+
astro_otter-0.4.0.dist-info/licenses/LICENSE,sha256=s9IPE8A3CAMEaZpDhj4eaorpmfLYGB0mIGphq301PUY,1067
|
|
2
2
|
otter/__init__.py,sha256=pvX-TN7nLVmvKpkDi89Zxe-jMfHNiVMD3zsd_bPEK9Y,535
|
|
3
|
-
otter/_version.py,sha256=
|
|
3
|
+
otter/_version.py,sha256=ZcBa0Ot5IOR3xciel7I9-UXThGwiJPkdBgEX2D4ikpo,76
|
|
4
4
|
otter/exceptions.py,sha256=3lQF4AXVTfs9VRsVePQoIrXnramsPZbUL5crvf1s9Ng,1702
|
|
5
5
|
otter/schema.py,sha256=J-iI_kEEd0aHN_Hr49HFEa8W07enh1FSDbU99NwIz3Y,11240
|
|
6
6
|
otter/util.py,sha256=G5M2PdtPGKpRXCqkItyXMLj6h5F3EboBBDKWMViw04k,23333
|
|
7
7
|
otter/io/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
8
|
otter/io/data_finder.py,sha256=M6kzqMyy-yhwQfxbOs2E7i_8bCcZFW4Zyf8z-6LCxNQ,38425
|
|
9
9
|
otter/io/host.py,sha256=xv_SznZuvMoMVsZLqlcmlOyaqKCMZqlTQ_gkN4VBSTw,7139
|
|
10
|
-
otter/io/otter.py,sha256=
|
|
11
|
-
otter/io/transient.py,sha256=
|
|
10
|
+
otter/io/otter.py,sha256=gr3iXtzns2ahAzP2DftTQ_Ib6lArPLyHsSdkBbR8mQQ,61143
|
|
11
|
+
otter/io/transient.py,sha256=1yVy-9NEo9ozM4B-sqEcGlJW_1abD0sWSXYG0Ex-3Jc,58020
|
|
12
12
|
otter/plotter/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
13
13
|
otter/plotter/otter_plotter.py,sha256=yUjGHR0FcbndwC1yLQekJWqX2KBMAJXtjFKbbASG_Cc,2144
|
|
14
14
|
otter/plotter/plotter.py,sha256=ni4WV63wIjhMHStDmuccltaMHSaFbwwfztYpuMdYAz8,9340
|
|
15
|
-
astro_otter-0.
|
|
16
|
-
astro_otter-0.
|
|
17
|
-
astro_otter-0.
|
|
18
|
-
astro_otter-0.
|
|
15
|
+
astro_otter-0.4.0.dist-info/METADATA,sha256=glWe0YdGJsIXNDTth1x7hAWqDuGTiXo8B8Fyxbi4ug8,7046
|
|
16
|
+
astro_otter-0.4.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
17
|
+
astro_otter-0.4.0.dist-info/top_level.txt,sha256=Wth72sCwBRUk3KZGknSKvLQDMFuJk6qiaAavMDOdG5k,6
|
|
18
|
+
astro_otter-0.4.0.dist-info/RECORD,,
|
otter/_version.py
CHANGED
otter/io/otter.py
CHANGED
|
@@ -63,15 +63,15 @@ class Otter(Database):
|
|
|
63
63
|
|
|
64
64
|
def __init__(
|
|
65
65
|
self,
|
|
66
|
-
url: str = "
|
|
66
|
+
url: str = "https://otter.idies.jhu.edu/api",
|
|
67
67
|
username: str = os.environ.get("ARANGO_USER_USERNAME", "user-guest"),
|
|
68
|
-
password: str = os.environ.get("ARANGO_USER_PASSWORD", ""),
|
|
68
|
+
password: str = os.environ.get("ARANGO_USER_PASSWORD", "test"),
|
|
69
69
|
gen_summary: bool = False,
|
|
70
70
|
datadir: str = None,
|
|
71
71
|
debug: bool = False,
|
|
72
72
|
**kwargs,
|
|
73
73
|
) -> None:
|
|
74
|
-
print("Attempting to login with the following credentials:")
|
|
74
|
+
print(f"Attempting to login to {url} with the following credentials:")
|
|
75
75
|
print(f"username: {username}")
|
|
76
76
|
print(f"password: {password}")
|
|
77
77
|
|
|
@@ -943,7 +943,7 @@ class Otter(Database):
|
|
|
943
943
|
|
|
944
944
|
# merge the meta and phot data
|
|
945
945
|
if phot is not None:
|
|
946
|
-
data = pd.merge(phot, meta, on="name", how="
|
|
946
|
+
data = pd.merge(phot, meta, on="name", how="outer")
|
|
947
947
|
else:
|
|
948
948
|
data = meta
|
|
949
949
|
|
|
@@ -951,11 +951,11 @@ class Otter(Database):
|
|
|
951
951
|
assert (
|
|
952
952
|
len(data[pd.isna(data.ra)].name.unique()) == 0
|
|
953
953
|
), "Missing some RA and Decs, please check the input files!"
|
|
954
|
-
if phot is not None:
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
954
|
+
# if phot is not None:
|
|
955
|
+
# for name in meta.name:
|
|
956
|
+
# assert len(data[data.name == name]) == len(
|
|
957
|
+
# phot[phot.name == name]
|
|
958
|
+
# ), f"failed on {name}"
|
|
959
959
|
|
|
960
960
|
# actually do the data conversion to OTTER
|
|
961
961
|
all_jsons = []
|
|
@@ -1084,7 +1084,7 @@ class Otter(Database):
|
|
|
1084
1084
|
# skip the photometry code if there is no photometry file
|
|
1085
1085
|
# if there is a photometry file then we want to convert it below
|
|
1086
1086
|
phot_sources = []
|
|
1087
|
-
if phot is not None:
|
|
1087
|
+
if phot is not None and not np.all(pd.isna(tde["flux"])):
|
|
1088
1088
|
tde["obs_type"] = [
|
|
1089
1089
|
freq_to_obstype(vv * u.Unit(uu))
|
|
1090
1090
|
for vv, uu in zip(
|
otter/io/transient.py
CHANGED
|
@@ -932,6 +932,18 @@ class Transient(MutableMapping):
|
|
|
932
932
|
if deduplicate:
|
|
933
933
|
outdata = deduplicate(outdata)
|
|
934
934
|
|
|
935
|
+
# throw a warning if the output dataframe has UV/Optical/IR or Radio data
|
|
936
|
+
# where we don't know if the dataset has been host corrected or not
|
|
937
|
+
if ("corr_host" not in outdata) or (
|
|
938
|
+
len(outdata[pd.isna(outdata.corr_host) * (outdata.obs_type != "xray")]) >= 0
|
|
939
|
+
):
|
|
940
|
+
logger.warning(
|
|
941
|
+
f"{self.default_name} has at least one photometry point where it is "
|
|
942
|
+
+ "unclear if a host subtraction was performed. This can be especially "
|
|
943
|
+
+ "detrimental for UV data. Please consider filtering out UV/Optical/IR"
|
|
944
|
+
+ " or radio rows where the corr_host column is null/None/NaN."
|
|
945
|
+
)
|
|
946
|
+
|
|
935
947
|
logger.removeFilter(warn_filt)
|
|
936
948
|
return outdata
|
|
937
949
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|