-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
59 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
from scipy.optimize import curve_fit | ||
|
||
from countess import VERSION | ||
from countess.core.plugins import PandasTransformDictToDictPlugin | ||
from countess.core.parameters import ChoiceParam, ColumnGroupChoiceParam, ColumnGroupOrNoneChoiceParam | ||
from countess.core.logger import Logger | ||
|
||
FUNCTIONS = [ 'foo', 'bar', 'baz' ] | ||
|
||
class CurveFitPlugin(PandasTransformDictToDictPlugin): | ||
name = "Curve Fit Plugin" | ||
description = "Fit rows of data to curves" | ||
|
||
version = VERSION | ||
|
||
parameters = { | ||
"xaxis": ColumnGroupOrNoneChoiceParam("X Axis", None, []), | ||
"yaxis": ColumnGroupChoiceParam("Y Axis", None, []), | ||
"function": ChoiceParam("Function", FUNCTIONS[0], FUNCTIONS), | ||
} | ||
|
||
def process_dict(self, data: dict, logger: Logger): | ||
return data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters