question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Flatten shouldn't automatically normalize

See original GitHub issue

Problem description

Currently, lc.flatten() will return a normalized light curve, but this isn’t always desired.

Example

from lightkurve import search_lightcurvefile
lcf = search_lightcurvefile("kic 6922244", quarter=4).download()
pdcsap = lcf.PDCSAP_FLUX
pdcsap.scatter() # makes scatter plot with y in electron counts per second
pdcsap.flatten().scatter() # makes scatter plot of flattened light curve but y is normalized.

Expected behavior

I expected a flattened light curve still in electron counts per second, but after flattening found that the lightcurve had also been normalized.

Environment

  • platform (e.g. Linux, OSX, Windows): OSX 10.14.6
  • lightkurve version (e.g. 1.0b6): 1.3.0
  • installation method (e.g. pip, conda, source): pip

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
christinahedgescommented, Nov 18, 2019

I think I agree, I think there are some questions tho:

  1. Do we renormalize to the mean or the median?
  2. This is likely going to break a lot of code. Maybe there should be a keyword “normalize” that defaults to True?
1reaction
github-actions[bot]commented, Nov 15, 2019

Hi there! 👋 Thank you for opening your first Lightkurve issue! 🙏 One of our maintainers will get back to you as soon as possible. 👩‍🚀 We love that you are using Lightkurve and appreciate your feedback. 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

Maybe Normalizing Isn't Normal - Coding Horror
Normalization provides better performance. (You're automatically measuring all the queries that flow through your software, right?)
Read more >
Normalize should not need to define an inverse() method #7320
The user does not specify an inverse function. In this case we have to do something automatically. There are multiple criteria but something ......
Read more >
Normalize audio files in Logic Pro - Apple Support
Normalize audio files in Logic Pro. Normalization raises the peak level of an audio file by a specified amount—typically to its highest possible...
Read more >
Why Is "Normalize" a Dirty Word? - Sweetwater
If you want to start an argument, say that normalizing is good. Then again, sometimes it is —but sometimes it isn't, and it...
Read more >
When should you not normalize data in machine learning?
So normalization in statistics basically means: I have dataset 1 with possible values from 0-1000 randomly distributed. I have dataset 2 with possible...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found