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.

Implement new `Corrector` API design

See original GitHub issue

During a brainstorm today (by @christinahedges, @nksaunders, @barentsen), we provisionally decided to deprecate LightCurve.correct() in favor of an object-oriented approach centered on an abstract Corrector class which has three key methods:

Corrector(**data_required):
    .correct(**options) -> LightCurve
    .diagnose(**options) -> Figure
    .interact() -> Bokeh widget

Specific implementations of this class would include SFFCorrector, PLDCorrector, and PCACorrector. The rationale behind removing lc.correct() is three-fold:

  1. Different correction methods require different input data and different options, which is difficult to expose as a single method.
  2. Forcing pixel-level decomposition (PLD) methods to operate on a LightCurve objects is awkward because the method requires pixel-level data.
  3. By exposing Corrector class objects, we will encourage users to research the correction methods being applied and, if necessary, develop their own Corrector subclass.

In summary, the old syntax:

lc_corrected = lc.correct(method="sff", **options)

…will be replaced by the new syntax:

lc_corrected = SFFCorrector(lc, centroids).correct(**options)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
barentsencommented, Feb 8, 2019

I’d like to leave this open until we have added a diagnose() method to both SFFCorrector and PLDCorrector. (Even if all it does for now is return an informative summary plot.)

0reactions
barentsencommented, Jul 18, 2019

Closing this issue due to inactivity. Improvements on the Corrector classes continue to be made, e.g. over in #525.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Advanced REST API Design - Medium
This method is easy to design, implement and remember. ... Clients will need to be updated to use the new API endpoints.
Read more >
Build Grammarly API Opensource Grammar Correction ...
... We'll learn how to build an open source Grammarly API alternative for Grammar Correction in Python. We'll use Gramformer...
Read more >
Building a Spell Checking Web API in ASP.NET Core
The sample implements the Web API controller SpellController: ... In the method Check, a new instance of the spell checker is created and...
Read more >
Spell checker framework - Android Developers
The Android platform offers a spelling checker framework that lets you implement and access spell checking in your application.
Read more >
How to Build Consistent, Meaningful APIs with Postman
Designing API First · Fork the gopher-holes-unlimited repo and clone it onto your machine · In your Postman workspace, hit New > API...
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