Refactor area method calculation

This commit is contained in:
2020-11-10 16:20:04 +01:00
parent 11e1a6b60c
commit 4343d6e2b6
2 changed files with 16 additions and 12 deletions

View File

@ -43,6 +43,7 @@ from bokeh.models import (
)
import pyzebra
from pyzebra.ccl_io import AREA_METHODS
javaScript = """
@ -476,10 +477,10 @@ def create():
fit_button.on_click(fit_button_callback)
def area_method_radiobutton_callback(_attr, _old, new):
det_data["meta"]["area_method"] = ("fit", "integ")[new]
det_data["meta"]["area_method"] = AREA_METHODS[new]
area_method_radiobutton = RadioButtonGroup(
labels=["Fit", "Integral"], active=0, default_size=145
labels=["Fit area", "Int area"], active=0, default_size=145
)
area_method_radiobutton.on_change("active", area_method_radiobutton_callback)