barentsen / notebooks

Curated Notebooks from STScI
BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

Tutorial: How to verify the location of a signal in Kepler pixel data #15

Closed astrobel closed 4 years ago

astrobel commented 4 years ago

Hi all, I figured I'd open a new issue for this one. @barentsen floated it here in Issue #10 as a complement to the tutorials on identifying instrument noise. The first draft of this notebook is now complete and in the Google Drive folder, ready for review. I am particularly interested in hearing from you if you think I should cover another signal verification technique, or if you have a favourite contaminated TPF that I can play around with (the examples I've used are not set in stone.) I would also really appreciate any suggestions for papers I can link to as part of a more thorough literature review!

ojhall94 commented 4 years ago

This notebook is awesome!! I learned a lot, and I'm super excited that Lightkurve can be used to do this kind of detailed analysis.

astrobel commented 4 years ago

Cheers @ojhall94, and thanks for your comments!

barentsen commented 4 years ago

Thank you @astrobel . This is a really good tutorial! I love the writing style and the clarity of the explanations. For example, the way a lambda function is explained is A+++. I also love the plot twist at the end of the first example (the signal doesn't come from either star!).

Two thoughts:

  1. Section 3 is a bit harder to follow than the earlier sections. I recommend adding a few sub-headings to help the reader understand the different steps, e.g. "3.1. Determining the signal period", "3.2. Determining the min/max phase time", "3.3. Computing the difference image".

  2. As you are aware, this line is problematic

    lcs = lk.search_lightcurve('KIC 5112687', mission='Kepler').download_all()
    lcs.stitch()

    ...because lcs is a collection of light curves from "two different targets" (albeit overlapping), and hence the stitch() operation ends up being a weird combination of different light curves. I'll try to solve this issue as a matter of urgency. Stay tuned...

barentsen commented 4 years ago

An additional comment: I wonder if we can make the title, Signal verification with Lightkurve, a bit more specific, because signal verification can mean many things.

Here are some ideas for alternative titles:

Any thoughts/suggestions/votes?

astrobel commented 4 years ago

Thanks for your comments @barentsen! I've made some changes and left one reply on the notebook.

As for the title, my vote is for the first option!

astrobel commented 4 years ago

After the Lightkurve bug fix (KeplerGO/lightkurve#718) that helped with the star that was downloading two stars' worth of data in this tutorial, it turns out the signal wasn't actually that clear with only one star's worth, and the difference image in Section 3 no longer conveyed enough information to make it a good example for this tutorial. I've switched to another star for the example, a different cluster star still subject to crowding. Let me know if anyone has any thoughts - otherwise I think this tutorial is just about ready to go for copy editing!

barentsen commented 4 years ago

I have started my final review of this awesome notebook! In response to a discussion above, I changed the title and filename of the notebook into "How to verify the location of a signal in Kepler pixel data". Let me know if anyone can think of a better title.

barentsen commented 4 years ago

This tutorial is really, really fabulous. I think it is ready for copy-editing!

I am aware that a suggestion has been made to move the difference imaging part into a separate notebook. That's not a bad idea, but given the limited time we have left on this project, I think it's probably best to move ahead with this notebook as-is and use our remaining time on other notebooks. This notebook is really good as-is! :+1:

lglattly commented 4 years ago

@astrobel I finished proofreading this tutorial and it is also in excellent shape! I made some very small copy editing changes, no questions this time. I'll let you know when structural editing is done!

astrobel commented 4 years ago

@lglattly Great, thank you!

lglattly commented 4 years ago

@astrobel (cc @barentsen) copy editing on this tutorial "How to Verify the Location of a Signal in Kepler Pixel Data" is complete! I reviewed the changes to the section structure and the additions, and everything looks fantastic. This tutorial is all set on my end and ready to go!

dhomeier commented 4 years ago

Hi @astrobel, great tutorial indeed, just following up on the little comment I forgot to pass on: the docs link for the lambda fuction[sp] provides a lot of info and use examples, but I find it actually a bit overwhelming for a quick first lookup of the definition; personally I am getting a better overview from the core python docs tutorial (or alternatively this HOWTO, but that is rather discouraging their use, so maybe it's not such a good option ;-). Again, that's my personal feeling what is easier to ingest, as changing the link would not affect the copy-editing this is up to you. And one final nit-pick in the actual body: the following code sections tpf.plot_pixels(corrector_func=lambda x:x.remove_nans().flatten().remove_outliers(), show_flux=True); trigger an [E231] flake complaint (missing whitespace after the colon).

astrobel commented 4 years ago

Hi @dhomeier, I think you raise a great point about linking to a tutorial instead of the docs. I've gone ahead and added those extra spaces to the lines that use lambda functions, and fixed the typo, but I just want to check in with @lglattly first - do you have a preference for which I link to? Personally I'm leaning towards the how-to, linked above.

lglattly commented 4 years ago

@astrobel and @dhomeier yes I agree switching out the current lambda function link with the how-to link seems like a good change, the more concise explanation works well!

astrobel commented 4 years ago

Great, I've made the switch!

barentsen commented 4 years ago

This notebook has successfully been merged into spacetelescope/notebooks. Thanks everyone! Closing the issue...