diff --git a/grizli/utils.py b/grizli/utils.py index d805379c..23f5cc72 100644 --- a/grizli/utils.py +++ b/grizli/utils.py @@ -8086,6 +8086,7 @@ def drizzle_from_visit( calc_wcsmap=calc_wcsmap, verbose=verbose, data=data, + first_uniqid=count + 1, ) outsci, outwht, outctx = res[:3] @@ -8131,7 +8132,7 @@ def drizzle_from_visit( wcs_tab = GTable(names=wcs_colnames, rows=wcs_rows) outwht *= (wcs_i.pscale / outputwcs.pscale) ** 4 - return outsci, outwht, header, flist, wcs_tab + return outsci, outwht, outctx, header, flist, wcs_tab def drizzle_array_groups( @@ -8145,6 +8146,7 @@ def drizzle_array_groups( calc_wcsmap=False, verbose=True, data=None, + first_uniqid=1, ): """ Drizzle array data with associated wcs @@ -8179,6 +8181,9 @@ def drizzle_array_groups( Tuple containing the output drizzled science, weight, and context images. If not provided, new arrays will be created. + first_uniqid : int, optional + First `uniqid` value to use for the drizzle for contex maps + Returns ------- outsci, outwht, outctx : `~numpy.ndarray` @@ -8266,7 +8271,7 @@ def drizzle_array_groups( "cps", 1, wcslin_pscale=wcs_list[i].pscale, - uniqid=1, + uniqid=first_uniqid + i, pixfrac=pixfrac, kernel=kernel, fillval="0",