Provide a way in sunpy to make composite image maps that combine short and long exposure time images
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Read the proposed make_composite_image flow and the sunpy.map.Map entry point first. Define how short and long exposure images are normalized and combined, including saturated-pixel substitution and metadata handling; done means a composite map is produced for compatible images without the AIA-specific assumptions.
Written by the indexing model from the issue text.
Description
Describe the feature
It would be nice to have a function that would make a composite map from short and long exposure time images that are close in time. Saturated pixels from the (exposure-time normalized) long exposure time image would be substituted with pixels from the (exposure-time normalized) short exposure time image. Care would have to be taken with the meta data, since two images are combined into one.
Proposed solution
Here is my (basic!) code to do this with AIA images if helpful (some things hardcoded for AIA).
import copy
def make_composite_image(file1,file2):
map1 = sunpy.map.Map(file1)
map2 = sunpy.map.Map(file2)
#check wavelengths are the same
if map1.wavelength.value == map2.wavelength.value:
#check that there is a short exposure time
if map1.exposure_time.value < 1.0 or map2.exposure_time.value < 1.0:
if map1.exposure_time > map2.exposure_time:
long_map = map1
short_map = map2
else:
long_map = map2
short_map = map1
saturated_indicies = (long_map.data > 4000).nonzero()
composite_map = copy.deepcopy(long_map)
composite_map.data[saturated_indicies] = short_map.data[saturated_indicies]
return composite_map
else: print("no short exposure time")
else: print("files need to be the same wavelength")
- Dominant language
- Python
- Stars
- 1k
- Forks
- 682
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 17
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from sunpy/sunpy
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Feature Request net
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
net
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Documentation Effort Low Package Novice Priority Medium
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Effort Medium map Package Intermediate Priority Medium
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
bancolombia/sentinel#23 ·
-
test md OpenCI
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
bug client
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100