Skip to content

Commit df23e53

Browse files
committed
Force dataframe
1 parent 88b6105 commit df23e53

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

arrakis/cutout.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -564,9 +564,13 @@ def cutout_islands(
564564
cuts: List[pymongo.UpdateOne] = []
565565
for stoke in stokeslist:
566566
for beam_num in unique_beams_nums:
567+
# Force the DataFrame type in the rare case of a single
568+
# source / component in a beam
567569
results = big_cutout.submit(
568-
sources=beam_source_df.loc[beam_num],
569-
comps=comps_df.loc[beam_source_df.loc[beam_num].Source_ID],
570+
sources=pd.DataFrame(beam_source_df.loc[beam_num]),
571+
comps=pd.DataFrame(
572+
comps_df.loc[beam_source_df.loc[beam_num].Source_ID]
573+
),
570574
beam_num=beam_num,
571575
stoke=stoke,
572576
datadir=directory,

0 commit comments

Comments
 (0)