From 9ca14bf67a16ffe1b87b9bea5adb5016b5c5f456 Mon Sep 17 00:00:00 2001 From: Kuo-Song Wang Date: Thu, 28 Nov 2024 13:53:36 +0800 Subject: [PATCH 1/4] support up to 16 profiles in multprofile plotting mode --- .../SpectralProfileWidget/SpectralProfileSelectionStore.ts | 2 +- src/utilities/color/color.ts | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/stores/Widgets/SpectralProfileWidget/SpectralProfileSelectionStore.ts b/src/stores/Widgets/SpectralProfileWidget/SpectralProfileSelectionStore.ts index 2b5d0e619e..c2b3f36846 100644 --- a/src/stores/Widgets/SpectralProfileWidget/SpectralProfileSelectionStore.ts +++ b/src/stores/Widgets/SpectralProfileWidget/SpectralProfileSelectionStore.ts @@ -29,7 +29,7 @@ interface SpectralConfig extends CARTA.SetSpectralRequirements.ISpectralConfig { regionId: number | null; } -const MAXIMUM_PROFILES = 10; +const MAXIMUM_PROFILES = 16; type Profile = { channelValues: number[]; diff --git a/src/utilities/color/color.ts b/src/utilities/color/color.ts index 34601a97c9..77119acd2c 100644 --- a/src/utilities/color/color.ts +++ b/src/utilities/color/color.ts @@ -20,6 +20,8 @@ export const SWATCH_COLORS = [ Colors.FOREST3, Colors.GOLD3, Colors.CERULEAN3, + Colors.ROSE3, + Colors.VERMILION3, Colors.LIGHT_GRAY3, Colors.DARK_GRAY3, Colors.WHITE, @@ -27,13 +29,12 @@ export const SWATCH_COLORS = [ ]; export const DEFAULT_COLOR = SWATCH_COLORS[0]; -const SELECTABLE_COLORS = ["blue", "orange", "green", "red", "violet", "sepia", "indigo", "gray", "lime", "turquoise", "forest", "gold", "cobalt", "light_gray", "dark_gray", "white", "black"]; +const SELECTABLE_COLORS = ["blue", "orange", "green", "red", "violet", "sepia", "indigo", "gray", "lime", "turquoise", "forest", "gold", "cerulean", "rose", "vermilion", "light_gray", "dark_gray", "white", "black"]; export const AUTO_COLOR_OPTIONS = SELECTABLE_COLORS.map(color => { return `auto-${color}`; }); -// SUPPORTED_COLORS are supported since ver. 1.4, and rose/vermilion are removed from selectable colors due to similar to red -const SUPPORTED_COLORS = [...SELECTABLE_COLORS, "rose", "vermilion"]; +const SUPPORTED_COLORS = [...SELECTABLE_COLORS]; // Supported auto colors are in pattern "auto-blue", "auto-orange", "auto-green"...etc // Validate with regex ^auto-(blue|orange|green...)$ From 8c82a6ac0f6b14820021eaaafd468b48140dd0e5 Mon Sep 17 00:00:00 2001 From: Kuo-Song Wang Date: Thu, 28 Nov 2024 14:01:12 +0800 Subject: [PATCH 2/4] add changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index cf312a7be3..0b2441997c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * Synchronized the value format in the pan and zoom tab in the image view settings widget ([#2235](https://github.com/CARTAvis/carta-frontend/issues/2235)). * Fix save image/export regions bug which could cause directory overwrite or deletion ([#1377](https://github.com/CARTAvis/carta-backend/issues/1377)). * Fix incorrect rendering of image view when moving the window to monitors with different screen resolution ([[#2285](https://github.com/CARTAvis/carta-frontend/issues/2285)]) +### Changed +* Changed the limitation of plotting up-to-10 profiles in the spectral profiler multi-profile mode to up-to-16 ([#2440](https://github.com/CARTAvis/carta-frontend/issues/2440)) + ## [4.1.0] From 83ac1f631ec09ef4f8fdfc35823d1d495f7b63ab Mon Sep 17 00:00:00 2001 From: Kuo-Song Wang Date: Mon, 9 Dec 2024 14:24:28 +0800 Subject: [PATCH 3/4] remove white and black colors --- src/utilities/color/color.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/utilities/color/color.ts b/src/utilities/color/color.ts index 77119acd2c..48c790daff 100644 --- a/src/utilities/color/color.ts +++ b/src/utilities/color/color.ts @@ -24,12 +24,13 @@ export const SWATCH_COLORS = [ Colors.VERMILION3, Colors.LIGHT_GRAY3, Colors.DARK_GRAY3, - Colors.WHITE, - Colors.BLACK + //Colors.WHITE, + //Colors.BLACK ]; export const DEFAULT_COLOR = SWATCH_COLORS[0]; -const SELECTABLE_COLORS = ["blue", "orange", "green", "red", "violet", "sepia", "indigo", "gray", "lime", "turquoise", "forest", "gold", "cerulean", "rose", "vermilion", "light_gray", "dark_gray", "white", "black"]; +//const SELECTABLE_COLORS = ["blue", "orange", "green", "red", "violet", "sepia", "indigo", "gray", "lime", "turquoise", "forest", "gold", "cerulean", "rose", "vermilion", "light_gray", "dark_gray", "white", "black"]; +const SELECTABLE_COLORS = ["blue", "orange", "green", "red", "violet", "sepia", "indigo", "gray", "lime", "turquoise", "forest", "gold", "cerulean", "rose", "vermilion", "light_gray", "dark_gray"]; export const AUTO_COLOR_OPTIONS = SELECTABLE_COLORS.map(color => { return `auto-${color}`; }); From bfa37e0ff2af855bcc29b2659f13e4c0c39b7dc6 Mon Sep 17 00:00:00 2001 From: Kuo-Song Wang Date: Mon, 9 Dec 2024 14:35:24 +0800 Subject: [PATCH 4/4] adjust color lists --- src/utilities/color/color.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/utilities/color/color.ts b/src/utilities/color/color.ts index 48c790daff..0c9aa90476 100644 --- a/src/utilities/color/color.ts +++ b/src/utilities/color/color.ts @@ -24,18 +24,17 @@ export const SWATCH_COLORS = [ Colors.VERMILION3, Colors.LIGHT_GRAY3, Colors.DARK_GRAY3, - //Colors.WHITE, - //Colors.BLACK + Colors.WHITE, + Colors.BLACK ]; export const DEFAULT_COLOR = SWATCH_COLORS[0]; -//const SELECTABLE_COLORS = ["blue", "orange", "green", "red", "violet", "sepia", "indigo", "gray", "lime", "turquoise", "forest", "gold", "cerulean", "rose", "vermilion", "light_gray", "dark_gray", "white", "black"]; const SELECTABLE_COLORS = ["blue", "orange", "green", "red", "violet", "sepia", "indigo", "gray", "lime", "turquoise", "forest", "gold", "cerulean", "rose", "vermilion", "light_gray", "dark_gray"]; export const AUTO_COLOR_OPTIONS = SELECTABLE_COLORS.map(color => { return `auto-${color}`; }); -const SUPPORTED_COLORS = [...SELECTABLE_COLORS]; +const SUPPORTED_COLORS = [...SELECTABLE_COLORS, "white", "black"]; // Supported auto colors are in pattern "auto-blue", "auto-orange", "auto-green"...etc // Validate with regex ^auto-(blue|orange|green...)$