Skip to content

Commit

Permalink
remove load_apokasc()
Browse files Browse the repository at this point in the history
  • Loading branch information
henrysky committed Jul 19, 2024
1 parent 3d91673 commit 07d6605
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 52 deletions.
14 changes: 0 additions & 14 deletions docs/source/tools_apogee.rst
Original file line number Diff line number Diff line change
Expand Up @@ -354,20 +354,6 @@ Or you can use `load_apogee_rc()` to load the data by
# 'fakemag' for astroNN's k-band fakemag scale
RA, DEC, array = load_apogee_rc(dr=16, unit='distance', extinction=True) # extinction only effective if not unit='distance'
-----------------------------------------
APOKASC in the Kepler Fields
-----------------------------------------

.. code-block:: python
:linenos:
from astroNN.datasets import load_apokasc
ra, dec, logg = load_apokasc()
# OR you want the gold and basic standard separately
gold_ra, gold_dec, gold_logg, basic_ra, basic_dec, basic_logg = load_apokasc(combine=False)
-----------------------------------------
APOGEE Distance Estimations
-----------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion src/astroNN/datasets/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from astroNN.datasets.apogee import load_apogee_distances, load_apogee_rc, load_apokasc
from astroNN.datasets.apogee import load_apogee_distances, load_apogee_rc
from astroNN.datasets.galaxy10 import load_data as load_galaxy10
from astroNN.datasets.galaxy10sdss import load_data as load_galaxy10sdss
from astroNN.datasets.h5 import H5Loader
Expand Down
31 changes: 0 additions & 31 deletions src/astroNN/datasets/apogee.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,34 +149,3 @@ def load_apogee_rc(dr=None, unit="distance", extinction=True):
raise ValueError("Unknown unit")

return ra, dec, output


def load_apokasc(combine=True):
"""
Load APOKASC asteroseismic surface gravity measurement
:param combine: True to combine gold and basic standard, otherwise only get gold standard log(g)
:type combine: boolean
:return: numpy array of ra, dec, array
:rtype: ndarrays
:History:
| 2017-Dec-23 - Written - Henry Leung (University of Toronto)
"""
catalog_list = Vizier.find_catalogs("apokasc")
Vizier.ROW_LIMIT = 99999
catalogs_gold = Vizier.get_catalogs(catalog_list.keys())[1]
catalogs_basic = Vizier.get_catalogs(catalog_list.keys())[2]
gold_ra = catalogs_gold["_RA"]
gold_dec = catalogs_gold["_DE"]
gold_logg = catalogs_gold["log_g_"]
basic_ra = catalogs_basic["_RA"]
basic_dec = catalogs_basic["_DE"]
basic_logg = catalogs_basic["log.g2"]

if combine is True:
ra = np.append(np.array(gold_ra), np.array(basic_ra))
dec = np.append(np.array(gold_dec), np.array(basic_dec))
logg = np.append(np.array(gold_logg), np.array(basic_logg))
return ra, dec, logg
else:
return gold_ra, gold_dec, gold_logg, basic_ra, basic_dec, basic_logg
6 changes: 0 additions & 6 deletions tests/test_datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,6 @@ def test_xmatch(self):
self.assertEqual(len(idx_1), len(idx_2))
self.assertEqual(np.all(sep==0.), True)

def test_apokasc(self):
from astroNN.datasets.apogee import load_apokasc

ra, dec, logg = load_apokasc()
gold_ra, gold_dec, gold_logg, basic_ra, basic_dec, basic_logg = load_apokasc(combine=False)

def test_galaxy10(self):
from astroNN.datasets.galaxy10 import galaxy10cls_lookup, galaxy10_confusion
# make sure galaxy10 exists on astro's server
Expand Down

0 comments on commit 07d6605

Please sign in to comment.