-
Notifications
You must be signed in to change notification settings - Fork 1
Add ColorBlending module for multi-image blending support #156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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: |
Copilot
AI
May 5, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
| 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 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: