Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion reproject/hips/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,8 +409,14 @@ def coadd_hips(input_directories, output_directory):
raise NotImplementedError(
"Convert jpg to png to allow for blending/coadding"
)
elif tile_format == "fits":
header = fits.getheader(filepath)
image1 = fits.getdata(filepath)
image2 = fits.getdata(target_filepath)
result = image1 + image2
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem with this is that as you get to the lower res tiles you will keep summing the fluxes so the effective flux will be much higher in the low res tiles. I think you want to take an average of the two here.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aha, makes sense!

fits.writeto(target_filepath, result, header, overwrite=True)
else:
raise NotImplementedError()
raise NotImplementedError(f"Tile format {tile_format} not implemented")
else:
shutil.copyfile(filepath, target_filepath)

Expand Down
Loading