diff --git a/grizli/aws/visit_processor.py b/grizli/aws/visit_processor.py index 16510a9b..02031a3c 100755 --- a/grizli/aws/visit_processor.py +++ b/grizli/aws/visit_processor.py @@ -1574,7 +1574,7 @@ def check_jwst_assoc_guiding(assoc): ALL_FILTERS = ['F410M', 'F467M', 'F547M', 'F550M', 'F621M', 'F689M', 'F763M', 'F845M', 'F200LP', 'F350LP', 'F435W', 'F438W', 'F439W', 'F450W', 'F475W', 'F475X', 'F555W', 'F569W', 'F600LP', 'F606W', 'F622W', 'F625W', 'F675W', 'F702W', 'F775W', 'F791W', 'F814W', 'F850LP', 'G800L', 'F098M', 'F127M', 'F139M', 'F153M', 'F105W', 'F110W', 'F125W', 'F140W', 'F160W', 'G102', 'G141'] -def process_visit(assoc, clean=True, sync=True, max_dt=4, combine_same_pa=False, visit_split_shift=1.2, blue_align_params=blue_align_params, ref_catalogs=['LS_DR9', 'PS1', 'DES', 'NSC', 'GAIA'], filters=None, prep_args={}, fetch_args={}, get_wcs_guess_from_table=True, master_radec='astrometry_db', align_guess=None, with_db=True, global_miri_skyflat=None, miri_tweak_align=False, tab=None, other_args={}, do_make_visit_mosaic=True, visit_mosaic_kwargs={}, expinfo_kwargs={}, **kwargs): +def process_visit(assoc, clean=True, sync=True, s3_acl="public-read", max_dt=4, combine_same_pa=False, visit_split_shift=1.2, blue_align_params=blue_align_params, ref_catalogs=['LS_DR9', 'PS1', 'DES', 'NSC', 'GAIA'], filters=None, prep_args={}, fetch_args={}, get_wcs_guess_from_table=True, master_radec='astrometry_db', align_guess=None, with_db=True, global_miri_skyflat=None, miri_tweak_align=False, tab=None, other_args={}, do_make_visit_mosaic=True, visit_mosaic_kwargs={}, expinfo_kwargs={}, **kwargs): """ Run the `grizli.pipeline.auto_script.go` pipeline on an association defined in the `grizli` database. @@ -1590,7 +1590,11 @@ def process_visit(assoc, clean=True, sync=True, max_dt=4, combine_same_pa=False, sync : bool Sync results to `grizli` S3 buckets and database (requires write permissions). - + + s3_acl : str + S3 access control list (ACL) type for synced files (e.g., "public-read", + "private") + prep_args : dict Keyword arguments to pass in `visit_prep_args` @@ -1815,7 +1819,7 @@ def process_visit(assoc, clean=True, sync=True, max_dt=4, combine_same_pa=False, --include "Prep/*skyflat.*" \ --include "Prep/*angles.*" \ --include "*fail*" \ - --include "RAW/*[nx][tg]" """ + --include "RAW/*[nx][tg]" --acl {s3_acl}""" os.system(cmd) print('\n# Sync\n' + cmd.replace(' ', '') + '\n') @@ -1824,7 +1828,7 @@ def process_visit(assoc, clean=True, sync=True, max_dt=4, combine_same_pa=False, files = glob.glob(f'{assoc}*.*') for file in files: os.system(f'aws s3 cp {file} ' + - f' s3://grizli-v2/HST/Pipeline/{assoc}/') + f' s3://grizli-v2/HST/Pipeline/{assoc}/ --acl {s3_acl}') if (clean & 2) > 0: print(f'rm -rf {assoc}*')