Created
November 29, 2024 05:16
-
-
Save danhey/0757476dd66f02c23cb9ef5298bdc736 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tqdm | |
import pandas as pd | |
targets = [] | |
quarters = range(0, 18, 1) | |
for q in tqdm.tqdm(quarters): | |
quarter = str(q).zfill(2) | |
df = pd.read_csv( | |
f"https://archive.stsci.edu/missions/kepler/download_scripts/lightcurves/kepler_lightcurves_Q{quarter}_long.sh", | |
skiprows=1, | |
header=None, | |
) | |
KICIDS = df[0].str.split("/", expand=True)[3] | |
targets.append(pd.DataFrame({"KICID": KICIDS, "QUARTER": [q] * len(KICIDS)})) | |
all_targets = pd.concat(targets) | |
all_targets.value_counts("KICID").reset_index().to_csv( | |
"quarters_condensed.csv", index=False | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment