I'm encountering a ValueError when running the function run_mdet_sims(sim_func, {"psf_fwhm": psf_fwhm}, seed=2000, n_sims=1) imported from mdet_meas_tools.py. The error message is:
ValueError: no field of name 'flags'
The error occurs during the execution of the _mask function in measure_shear_metadetect, where the code expects the field 'flags' in the data (which is an output of metadetect.metadetect.do_metadetect), but it is not present. This causes the simulation to fail.
Could you please assist with identifying why the 'flags' field is missing and how to resolve this issue?

I'm encountering a
ValueErrorwhen running the functionrun_mdet_sims(sim_func, {"psf_fwhm": psf_fwhm}, seed=2000, n_sims=1)imported frommdet_meas_tools.py. The error message is:ValueError: no field of name 'flags'The error occurs during the execution of the
_maskfunction inmeasure_shear_metadetect, where the code expects the field'flags'in the data (which is an output ofmetadetect.metadetect.do_metadetect), but it is not present. This causes the simulation to fail.Could you please assist with identifying why the
'flags'field is missing and how to resolve this issue?