Skip to content

Commit

Permalink
output file fix
Browse files Browse the repository at this point in the history
  • Loading branch information
arahlin committed Sep 6, 2023
1 parent 7943239 commit 118475c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions maps/python/map_modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ def __call__(self, frame):
@core.usefulfunc
def coadd_map_files(
input_files,
output_file="map_coadd.g3",
output_file=None,
map_ids=None,
collate=False,
output_map_id="Coadd",
Expand All @@ -585,7 +585,8 @@ def coadd_map_files(
input_files : list of str
List of input files to feed through the pipeline.
output_file : str
Output G3 filename.
Output G3 filename. If not supplied, the output frames are
returned without saving to disk.
map_ids : list of str
A list of map Id's to include in the coadd(s).
collate : bool
Expand Down Expand Up @@ -651,7 +652,8 @@ def coadd_map_files(

pipe.Add(lambda fr: "Id" not in fr or fr["Id"].startswith(output_map_id))

pipe.Add(core.G3Writer, filename=output)
if output_file:
pipe.Add(core.G3Writer, filename=output_file)
pipe.Run()

if collate:
Expand Down

0 comments on commit 118475c

Please sign in to comment.