Add ColorBlending module for multi-image blending support#156
Open
izkgao wants to merge 10 commits intoCARTAvis:devfrom
Open
Add ColorBlending module for multi-image blending support#156izkgao wants to merge 10 commits intoCARTAvis:devfrom
izkgao wants to merge 10 commits intoCARTAvis:devfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a new ColorBlending module to support multi-image blending in CARTA. Key changes include updates to image activation logic with a try/except branch for CARTA version handling and the addition of a new ColormapSet enum in constants.
Reviewed Changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| carta/image.py | Reorders imports and updates the make_active method to handle version differences. |
| carta/constants.py | Adds the ColormapSet enum to support color blending functionality. |
Files not reviewed (1)
- docs/source/quickstart.rst: Language not supported
| try: | ||
| # Before CARTA 5.0.0 | ||
| self.session.call_action("setActiveFrameById", self.image_id) | ||
| except CartaActionFailed: |
There was a problem hiding this comment.
Consider logging the exception in the except block (lines 258-260) to capture details when falling back from 'setActiveFrameById' to 'setActiveImageByFileId', which can help with debugging version-specific issues.
Suggested change
| except CartaActionFailed: | |
| except CartaActionFailed as e: | |
| # Log the exception details for debugging | |
| logging.error("Failed to set active frame by ID. Falling back to set active image by file ID.", exc_info=True) |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements the
colorblendingmodule that adds support for creating and manipulating color blended images in CARTA.Required before this can be moved out of draft: