Skip to content

Commit

Permalink
map_id_function option for coadd_map_files
Browse files Browse the repository at this point in the history
  • Loading branch information
arahlin committed Feb 5, 2024
1 parent 3fb6b94 commit cdd6e43
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions maps/python/map_modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -669,6 +669,7 @@ def coadd_map_files(
output_map_id="Coadd",
collate=False,
weighted=True,
map_id_function=None,
):
"""
Coadd map files, optionally collating map Id's into separate frames.
Expand All @@ -692,6 +693,11 @@ def coadd_map_files(
weighted : bool
If True, ensure that weights have been applied before coadding.
Otherwise, the input maps are coadded as they are.
map_id_function : callable
If supplied, use this callable to extract a map_id from the input map
frames. Otherwise, use ``frame["Id"]``. The function should take a
single frame object as an argument and return a string value to match
against ``map_ids``, or ``None`` if a valid Id cannot be constructed.
Returns
-------
Expand All @@ -713,6 +719,7 @@ def coadd_map_files(
collate=collate,
weighted=weighted,
drop_input_frames=True,
map_id_function=map_id_function,
)
pipe.Add(coadder)

Expand Down

0 comments on commit cdd6e43

Please sign in to comment.