Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an Intro Animation/Display #404

Open
dougbrn opened this issue Mar 15, 2024 · 0 comments
Open

Add an Intro Animation/Display #404

dougbrn opened this issue Mar 15, 2024 · 0 comments
Labels
documentation Improvements or additions to documentation Intro Project Potential Onboarding Project

Comments

@dougbrn
Copy link
Collaborator

dougbrn commented Mar 15, 2024

Having a front and center animation that showcases fundamental usage of TAPE is probably the ideal starting point for our documentation. We're envisioning some kind of example like this, where this workflow is generated iteratively with some checkpoints to show tables/plots:

# Load some ZTF Data
from tape import Ensemble, ColumnMapper

colmap = ColumnMapper().use_known_map("ztf")
ens= Ensemble().from_hipscat("https://epyc.astro.washington.edu/~lincc-frameworks/half_degree_surveys/ztf/ztf_source",
                "https://epyc.astro.washington.edu/~lincc-frameworks/half_degree_surveys/ztf/ztf_object",
                column_mapper=colmap, source_index="ps1_objid", object_index="ps1_objid")

# Do some filtering
ens.calc_nobs(by_band=True)
ens.object.query("nobs_g > 50").update_ensemble()

# Compute the Periodogram for all lightcurves
import light_curve as lc
periodogram = lc.Periodogram()
ens.batch(periodogram, band_to_calc="g", label="periodograms")

# Plot the periodogram distribution, or some kind of multi-lightcurve plot
import matplotlib.pyplot as plt
periods = ens.select_frame("periodograms")
plt.hist(periods)

# Drill into a particular lightcurve by period
max_id = periods.iloc[result_comp['result'].argmax()]["id"]
ens.to_timeseries(max_id).plot()

As part of this ticket, the goal is also to fine-tune the API to achieve this workflow with a minimal amount of keystrokes (and fix any bugs present in this example). Therefore, a number of issues will be added that block this, as they are identified.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation Intro Project Potential Onboarding Project
Projects
None yet
Development

No branches or pull requests

1 participant