change color picker and make ACF >0 only
This commit is contained in:
@@ -40,7 +40,7 @@ class ACF1D:
|
|||||||
|
|
||||||
DESCRIPTION = (
|
DESCRIPTION = (
|
||||||
"Compute the one-dimensional autocorrelation function of a line profile. "
|
"Compute the one-dimensional autocorrelation function of a line profile. "
|
||||||
"The output is symmetric about zero lag with the lag on the x-axis. "
|
"Only positive lags are output on the x-axis. "
|
||||||
"The measurement table reports the dominant period from the first positive peak."
|
"The measurement table reports the dominant period from the first positive peak."
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -54,6 +54,14 @@ class ACF1D:
|
|||||||
x_unit = profile.x_unit if isinstance(profile, LineData) else ""
|
x_unit = profile.x_unit if isinstance(profile, LineData) else ""
|
||||||
peak_lag = _first_positive_peak(acf_line.data, acf_line.x_axis)
|
peak_lag = _first_positive_peak(acf_line.data, acf_line.x_axis)
|
||||||
|
|
||||||
|
mask = acf_line.x_axis > 0
|
||||||
|
acf_line = LineData(
|
||||||
|
data=acf_line.data[mask],
|
||||||
|
x_axis=acf_line.x_axis[mask],
|
||||||
|
x_unit=acf_line.x_unit,
|
||||||
|
y_unit=acf_line.y_unit,
|
||||||
|
)
|
||||||
|
|
||||||
rows = []
|
rows = []
|
||||||
if peak_lag is not None:
|
if peak_lag is not None:
|
||||||
rows.append({"quantity": "Peak period", "value": peak_lag, "unit": x_unit})
|
rows.append({"quantity": "Peak period", "value": peak_lag, "unit": x_unit})
|
||||||
|
|||||||
@@ -592,7 +592,6 @@ html, body, #root {
|
|||||||
|
|
||||||
.io-inline-widget input[type="text"],
|
.io-inline-widget input[type="text"],
|
||||||
.io-inline-widget input[type="number"],
|
.io-inline-widget input[type="number"],
|
||||||
.io-inline-widget input[type="color"],
|
|
||||||
.io-inline-widget select {
|
.io-inline-widget select {
|
||||||
background: var(--bg-deep);
|
background: var(--bg-deep);
|
||||||
color: var(--text-primary);
|
color: var(--text-primary);
|
||||||
@@ -606,7 +605,6 @@ html, body, #root {
|
|||||||
|
|
||||||
.widget-row input[type="text"],
|
.widget-row input[type="text"],
|
||||||
.widget-row input[type="number"],
|
.widget-row input[type="number"],
|
||||||
.widget-row input[type="color"],
|
|
||||||
.widget-row select {
|
.widget-row select {
|
||||||
background: var(--bg-deep);
|
background: var(--bg-deep);
|
||||||
color: var(--text-primary);
|
color: var(--text-primary);
|
||||||
@@ -619,8 +617,31 @@ html, body, #root {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.widget-row input[type="color"] {
|
.widget-row input[type="color"] {
|
||||||
padding: 2px;
|
appearance: none;
|
||||||
height: 24px;
|
-webkit-appearance: none;
|
||||||
|
padding: 0;
|
||||||
|
width: 22px;
|
||||||
|
height: 22px;
|
||||||
|
border-radius: 50%;
|
||||||
|
border: 1.5px solid var(--border-default);
|
||||||
|
flex: none;
|
||||||
|
cursor: pointer;
|
||||||
|
overflow: hidden;
|
||||||
|
background: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-row input[type="color"]::-webkit-color-swatch-wrapper {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-row input[type="color"]::-webkit-color-swatch {
|
||||||
|
border: none;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-row input[type="color"]::-moz-color-swatch {
|
||||||
|
border: none;
|
||||||
|
border-radius: 50%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.widget-row input[type="checkbox"] {
|
.widget-row input[type="checkbox"] {
|
||||||
|
|||||||
Reference in New Issue
Block a user