remove_bad_expflag

grizli.pipeline.auto_script.remove_bad_expflag(field_root='', HOME_PATH='./', min_bad=2)[source]

Remove FLT files in RAW directory with bad EXPFLAG values, which usually corresponds to failed guide stars.

The script moves files associated with an affected visit to a subdirectory

>>> bad_dir = os.path.join(HOME_PATH, field_root, 'RAW', 'Expflag')
Parameters:
field_root : str

Field name, i.e., ‘j123654+621608’

HOME_PATH : str

Base path where files are found.

min_bad : int

Minimum number of exposures of a visit where EXPFLAG == 'INDETERMINATE'. Occasionally the first exposure of a visit has this value set even though guiding is OK, so set to 2 to try to flag more problematic visits.