astro-otter 0.2.0__tar.gz → 0.3.0__tar.gz
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.2.0/src/astro_otter.egg-info → astro_otter-0.3.0}/PKG-INFO +2 -2
- {astro_otter-0.2.0 → astro_otter-0.3.0}/pyproject.toml +1 -1
- {astro_otter-0.2.0 → astro_otter-0.3.0/src/astro_otter.egg-info}/PKG-INFO +2 -2
- {astro_otter-0.2.0 → astro_otter-0.3.0}/src/otter/_version.py +1 -1
- {astro_otter-0.2.0 → astro_otter-0.3.0}/src/otter/io/otter.py +26 -2
- {astro_otter-0.2.0 → astro_otter-0.3.0}/src/otter/io/transient.py +8 -3
- {astro_otter-0.2.0 → astro_otter-0.3.0}/LICENSE +0 -0
- {astro_otter-0.2.0 → astro_otter-0.3.0}/README.md +0 -0
- {astro_otter-0.2.0 → astro_otter-0.3.0}/setup.cfg +0 -0
- {astro_otter-0.2.0 → astro_otter-0.3.0}/src/astro_otter.egg-info/SOURCES.txt +0 -0
- {astro_otter-0.2.0 → astro_otter-0.3.0}/src/astro_otter.egg-info/dependency_links.txt +0 -0
- {astro_otter-0.2.0 → astro_otter-0.3.0}/src/astro_otter.egg-info/requires.txt +0 -0
- {astro_otter-0.2.0 → astro_otter-0.3.0}/src/astro_otter.egg-info/top_level.txt +0 -0
- {astro_otter-0.2.0 → astro_otter-0.3.0}/src/otter/__init__.py +0 -0
- {astro_otter-0.2.0 → astro_otter-0.3.0}/src/otter/exceptions.py +0 -0
- {astro_otter-0.2.0 → astro_otter-0.3.0}/src/otter/io/__init__.py +0 -0
- {astro_otter-0.2.0 → astro_otter-0.3.0}/src/otter/io/data_finder.py +0 -0
- {astro_otter-0.2.0 → astro_otter-0.3.0}/src/otter/io/host.py +0 -0
- {astro_otter-0.2.0 → astro_otter-0.3.0}/src/otter/plotter/__init__.py +0 -0
- {astro_otter-0.2.0 → astro_otter-0.3.0}/src/otter/plotter/otter_plotter.py +0 -0
- {astro_otter-0.2.0 → astro_otter-0.3.0}/src/otter/plotter/plotter.py +0 -0
- {astro_otter-0.2.0 → astro_otter-0.3.0}/src/otter/schema.py +0 -0
- {astro_otter-0.2.0 → astro_otter-0.3.0}/src/otter/util.py +0 -0
- {astro_otter-0.2.0 → astro_otter-0.3.0}/tests/test_data_finder.py +0 -0
- {astro_otter-0.2.0 → astro_otter-0.3.0}/tests/test_exceptions.py +0 -0
- {astro_otter-0.2.0 → astro_otter-0.3.0}/tests/test_host.py +0 -0
- {astro_otter-0.2.0 → astro_otter-0.3.0}/tests/test_otter.py +0 -0
- {astro_otter-0.2.0 → astro_otter-0.3.0}/tests/test_package.py +0 -0
- {astro_otter-0.2.0 → astro_otter-0.3.0}/tests/test_transient.py +0 -0
- {astro_otter-0.2.0 → astro_otter-0.3.0}/tests/test_util.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: astro-otter
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
4
4
|
Author-email: Noah Franz <nfranz@arizona.edu>
|
|
5
5
|
License: MIT License
|
|
6
6
|
|
|
@@ -36,7 +36,7 @@ Classifier: Programming Language :: Python :: 3
|
|
|
36
36
|
Classifier: Programming Language :: Python :: 3.10
|
|
37
37
|
Classifier: Programming Language :: Python :: 3.11
|
|
38
38
|
Classifier: Development Status :: 2 - Pre-Alpha
|
|
39
|
-
Requires-Python:
|
|
39
|
+
Requires-Python: >=3.9
|
|
40
40
|
Description-Content-Type: text/markdown
|
|
41
41
|
License-File: LICENSE
|
|
42
42
|
Requires-Dist: numpy<2,>=1.20
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: astro-otter
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
4
4
|
Author-email: Noah Franz <nfranz@arizona.edu>
|
|
5
5
|
License: MIT License
|
|
6
6
|
|
|
@@ -36,7 +36,7 @@ Classifier: Programming Language :: Python :: 3
|
|
|
36
36
|
Classifier: Programming Language :: Python :: 3.10
|
|
37
37
|
Classifier: Programming Language :: Python :: 3.11
|
|
38
38
|
Classifier: Development Status :: 2 - Pre-Alpha
|
|
39
|
-
Requires-Python:
|
|
39
|
+
Requires-Python: >=3.9
|
|
40
40
|
Description-Content-Type: text/markdown
|
|
41
41
|
License-File: LICENSE
|
|
42
42
|
Requires-Dist: numpy<2,>=1.20
|
|
@@ -280,7 +280,7 @@ class Otter(Database):
|
|
|
280
280
|
|
|
281
281
|
WARNING! This does not do any conversions for you!
|
|
282
282
|
This is how it differs from the `get_meta` method. Users should prefer to use
|
|
283
|
-
`get_meta`,
|
|
283
|
+
`get_meta`, and `get_phot` independently because it is a better
|
|
284
284
|
workflow and can return the data in an astropy table with everything in the
|
|
285
285
|
same units.
|
|
286
286
|
|
|
@@ -816,8 +816,32 @@ class Otter(Database):
|
|
|
816
816
|
# read in the metadata and photometry file
|
|
817
817
|
meta = pd.read_csv(metafile)
|
|
818
818
|
phot = None
|
|
819
|
+
|
|
820
|
+
required_phot_cols = [
|
|
821
|
+
"name",
|
|
822
|
+
"date",
|
|
823
|
+
"date_format",
|
|
824
|
+
"filter",
|
|
825
|
+
"filter_eff",
|
|
826
|
+
"filter_eff_units",
|
|
827
|
+
"flux",
|
|
828
|
+
"flux_err",
|
|
829
|
+
"flux_unit",
|
|
830
|
+
]
|
|
831
|
+
|
|
819
832
|
if photfile is not None:
|
|
820
|
-
|
|
833
|
+
phot_unclean = pd.read_csv(photfile)
|
|
834
|
+
|
|
835
|
+
phot = phot_unclean.dropna(subset=required_phot_cols)
|
|
836
|
+
if len(phot) != len(phot_unclean):
|
|
837
|
+
warn("""
|
|
838
|
+
Filtered out rows with nan in the photometry file! Make sure you
|
|
839
|
+
expect this behaviour!
|
|
840
|
+
""")
|
|
841
|
+
|
|
842
|
+
if "bibcode" not in phot:
|
|
843
|
+
phot["bibcode"] = "private"
|
|
844
|
+
warn("Setting the bibcode column to the special keyword 'private'!")
|
|
821
845
|
|
|
822
846
|
# we need to generate columns of wave_eff and freq_eff
|
|
823
847
|
wave_eff = []
|
|
@@ -662,6 +662,12 @@ class Transient(MutableMapping):
|
|
|
662
662
|
try:
|
|
663
663
|
if isvegamag:
|
|
664
664
|
astropy_units = VEGAMAG
|
|
665
|
+
elif unit == "AB":
|
|
666
|
+
# In astropy "AB" is a magnitude SYSTEM not unit and while
|
|
667
|
+
# u.Unit("AB") will succeed without error, it will not produce
|
|
668
|
+
# the expected result!
|
|
669
|
+
# We can assume here that this unit really means astropy's "mag(AB)"
|
|
670
|
+
astropy_units = u.Unit("mag(AB)")
|
|
665
671
|
else:
|
|
666
672
|
astropy_units = u.Unit(unit)
|
|
667
673
|
|
|
@@ -806,20 +812,19 @@ class Transient(MutableMapping):
|
|
|
806
812
|
# magnitude upperlimits are independent of the actual measurement!)
|
|
807
813
|
# sigma_m > (1/3) * (ln(10)/2.5)
|
|
808
814
|
def is_upperlimit(row):
|
|
809
|
-
if pd.isna(row.upperlimit):
|
|
815
|
+
if "upperlimit" in row and pd.isna(row.upperlimit):
|
|
810
816
|
return row.converted_flux_err > np.log(10) / (3 * 2.5)
|
|
811
817
|
else:
|
|
812
818
|
return row.upperlimit
|
|
813
819
|
else:
|
|
814
820
|
|
|
815
821
|
def is_upperlimit(row):
|
|
816
|
-
if pd.isna(row.upperlimit):
|
|
822
|
+
if "upperlimit" in row and pd.isna(row.upperlimit):
|
|
817
823
|
return row.converted_flux < 3 * row.converted_flux_err
|
|
818
824
|
else:
|
|
819
825
|
return row.upperlimit
|
|
820
826
|
|
|
821
827
|
outdata["upperlimit"] = outdata.apply(is_upperlimit, axis=1)
|
|
822
|
-
|
|
823
828
|
return outdata
|
|
824
829
|
|
|
825
830
|
def _merge_names(t1, t2, out): # noqa: N805
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|