← 输入框|github.com|刷新
Skip to content

Adding Object-Oriented tutorial - #410

Open
bmorris3 wants to merge 1 commit into
astropy-learn:mainfrom
bmorris3:oo
Open

bmorris3 wants to merge 1 commit into
astropy-learn:mainfrom
bmorris3:oo

Conversation

@bmorris3

@bmorris3 bmorris3 commented Nov 1, 2019

Copy link
Copy Markdown
Contributor

This is a little tutorial for creating your own Python object from scratch, building a LightCurve object and some related methods on it.

This closes #408 (thanks for the tip, @kelle!).

"metadata": {},
"outputs": [],
"source": [
"%%writefile generate_lcs.py\n",

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the %%writefile magic useable in this website framework?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should work, but we might need to double check that it writes to the correct location

@bmorris3

bmorris3 commented Nov 1, 2019

Copy link
Copy Markdown
Contributor Author

I'm going to need a bit of help with this PR. The section headers yield warnings and don't render, saying:

 WARNING: Title level inconsistent:

@adrn

adrn commented Nov 9, 2019

Copy link
Copy Markdown
Contributor

Thanks @bmorris3! I'll let others take a closer look at the content, but a few comments:

@kelle

kelle commented Nov 14, 2019

Copy link
Copy Markdown
Member

Colab notebook here: https://colab.research.google.com/drive/1A02gYb6aOOcXUnb0MlUKFoNX9aEtDJ6N

I think the issue that both @adrn and @bsipocz brought up about the time series class is an important one. Maybe y'all can discuss? Or we can discuss on the learn telecon this morning.

@kelle kelle closed this Jul 1, 2021
@kelle kelle reopened this Jul 1, 2021
@mwcraig

mwcraig commented Jul 1, 2021

Copy link
Copy Markdown
Contributor

The content of the tutorial itself looks pretty good. It would be useful to point out that in this specific case there are a couple of potential packages that users should use instead of making their own class: astropy time series and lightkurve.

I think it is actually good to have as an example something that has a better/more complete implementation elsewhere.

@adrn

adrn commented Sep 28, 2021

Copy link
Copy Markdown
Contributor

👋 We have changed the build infrastructure and layout of files in the repo, so I am going to rebase this pull request and force push to your branch. If you have any local changes that haven't been pushed, please push them by the end of this week (October 1). After I have rebased to bring the new build machinery in, please let us know if you would like to continue working on this tutorial or if you would rather someone else take it over. Thanks!

@ceb8

ceb8 commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

Hi @bmorris3!

I realise it has now been a number of years since you submitted this, but it looks basically complete. The only feedback that I see that hasn't been implemented is pointing the user to the existing light curve packages. I am happy to add this, if you are willing.

I apologise for how long we've let this sit. Let me know what you think.

@bmorris3

bmorris3 commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor Author

Sure @ceb8. Since I made this PR, I put a better version of this notebook in astropy-workshop that I could push to this branch instead if you like.

@ceb8

ceb8 commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

@bmorris3 That one looks great! Yes please push it here. Thanks!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Intro to Object Oriented program tutorial

6 participants