diff --git a/backend/nodes/acf_1d.py b/backend/nodes/acf_1d.py index 0fc9961..bc9f70d 100644 --- a/backend/nodes/acf_1d.py +++ b/backend/nodes/acf_1d.py @@ -40,7 +40,7 @@ class ACF1D: DESCRIPTION = ( "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." ) @@ -54,6 +54,14 @@ class ACF1D: x_unit = profile.x_unit if isinstance(profile, LineData) else "" 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 = [] if peak_lag is not None: rows.append({"quantity": "Peak period", "value": peak_lag, "unit": x_unit}) diff --git a/frontend/src/styles.css b/frontend/src/styles.css index 8b32c93..3c9ec0e 100644 --- a/frontend/src/styles.css +++ b/frontend/src/styles.css @@ -592,7 +592,6 @@ html, body, #root { .io-inline-widget input[type="text"], .io-inline-widget input[type="number"], -.io-inline-widget input[type="color"], .io-inline-widget select { background: var(--bg-deep); color: var(--text-primary); @@ -606,7 +605,6 @@ html, body, #root { .widget-row input[type="text"], .widget-row input[type="number"], -.widget-row input[type="color"], .widget-row select { background: var(--bg-deep); color: var(--text-primary); @@ -619,8 +617,31 @@ html, body, #root { } .widget-row input[type="color"] { - padding: 2px; - height: 24px; + appearance: none; + -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"] {