Skip to content

Commit 9b46e84

Browse files
authored
Merge branch 'master' into multithread-remove-weights
2 parents 82dc643 + dc6a8eb commit 9b46e84

File tree

3 files changed

+17
-10
lines changed

3 files changed

+17
-10
lines changed

.github/workflows/cmake.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272
run: cmake --build . --config $BUILD_TYPE --parallel 4
7373

7474
- name: Upload
75-
uses: actions/upload-artifact@v5
75+
uses: actions/upload-artifact@v7
7676
if: runner.environment == 'github-hosted'
7777
with:
7878
name: cmake-${{matrix.os}}-${{matrix.toolset}}

.github/workflows/wheels.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
fetch-tags: true
4545

4646
- name: Build wheels
47-
uses: pypa/cibuildwheel@v3.3.0
47+
uses: pypa/cibuildwheel@v3.3.1
4848
env:
4949
CIBW_BUILD: ${{ matrix.pyver }}-${{ matrix.build }}
5050
CIBW_BEFORE_ALL_LINUX: yum install -y zlib-devel bzip2-devel xz-devel netcdf-devel cfitsio-devel
@@ -74,7 +74,7 @@ jobs:
7474
CIBW_TEST_COMMAND: ctest --test-dir {package}/build --output-on-failure
7575

7676
- name: Upload artifacts
77-
uses: actions/upload-artifact@v5
77+
uses: actions/upload-artifact@v7
7878
with:
7979
name: cibw-wheel-${{ matrix.pyver }}-${{ matrix.build }}
8080
path: ./wheelhouse/spt3g*.whl
@@ -91,7 +91,7 @@ jobs:
9191
- name: Build sdist
9292
run: pipx run build --sdist
9393

94-
- uses: actions/upload-artifact@v5
94+
- uses: actions/upload-artifact@v7
9595
with:
9696
name: cibw-sdist
9797
path: dist/*.tar.gz
@@ -105,7 +105,7 @@ jobs:
105105
if: github.event_name == 'release' && github.event.action == 'published'
106106
steps:
107107
- name: Download artifacts
108-
uses: actions/download-artifact@v6
108+
uses: actions/download-artifact@v8
109109
with:
110110
# unpacks all CIBW artifacts into dist/
111111
pattern: cibw-*

maps/python/map_modules.py

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -921,6 +921,7 @@ def coadd_map_files(
921921
collate=False,
922922
weighted=True,
923923
record_obs_id=False,
924+
return_outputs=False,
924925
):
925926
"""
926927
Coadd map files, optionally collating map Id's into separate frames.
@@ -951,12 +952,17 @@ def coadd_map_files(
951952
If True, include source name and observation ID info in the output coadd
952953
frame ``InputMapIds`` key, along with the map ID for each input frame.
953954
If False, only the map frame ID is included.
955+
return_outputs : bool
956+
If True, return output coadds from this function. Assumed ``True`` if
957+
``output_file`` is not set.
954958
955959
Returns
956960
-------
957961
maps : G3Frame or dict of G3Frames
958962
If ``collate`` is True, returns a dictionary of map frames
959-
keyed by Id. Otherwise, returns a single map frame.
963+
keyed by Id. Otherwise, returns a single map frame. Only
964+
returned if ``return_outputs`` is True or if ``output_file``
965+
is not set.
960966
"""
961967

962968
pipe = core.G3Pipeline()
@@ -971,7 +977,7 @@ def coadd_map_files(
971977
weighted=weighted,
972978
drop_input_frames=True,
973979
record_obs_id=record_obs_id,
974-
keep_outputs=True,
980+
keep_outputs=return_outputs or not output_file,
975981
)
976982
pipe.Add(coadder)
977983

@@ -982,9 +988,10 @@ def coadd_map_files(
982988
pipe.Add(core.G3Writer, filename=output_file)
983989
pipe.Run()
984990

985-
if collate:
986-
return coadder.coadd_frames
987-
return coadder.coadd_frame
991+
if return_outputs or not output_file:
992+
if collate:
993+
return coadder.coadd_frames
994+
return coadder.coadd_frame
988995

989996

990997
@core.indexmod

0 commit comments

Comments
 (0)