Pyhiiextractor: a tool to detect and extract physical properties of H ii regions from integral field spectroscopic data. Issue 1 (28th July 2022) - Lugo-Aranda, A Z; Sánchez, S F; Espinosa-Ponce, C; López-Cobá, C; Galbany, L; Barrera-Ballesteros, J K; Sánchez-Menguiano, L; Anderson, J P
Abstract: We present a new code named pyhiiextractor, which detects and extracts the main features (positions and radii) of clumpy ionized regions, i.e. candidate H ii regions, using $\rm {H}\, α$ emission line images. Our code is optimized to be used on the dataproducts provided by the pipe3d pipeline (or dataproducts with such a format), applied to high-spatial resolution integral field spectroscopy data (like that provided by the AMUSING++ compilation, using muse ). The code provides the properties of both the underlying stellar population and the emission lines for each detected H ii candidate. Furthermore, the code delivers a novel estimation of the diffuse ionized gas (DIG) component, independent of its physical properties, which enables a decontamination of the properties of the H ii regions from the DIG. Using simulated data, mimicking the expected observations of spiral galaxies, we characterize pyhiiextractor and its ability to extract the main properties of the H ii regions (and the DIG), including the line fluxes, ratios, and equivalent widths. Finally, we compare our code with other such tools adopted in the literature, which have been developed or used for similar purposes: pyhiiexplorer, sourceextractor, hiiphot, and astrodendro . We conclude that pyhiiextractor exceeds the performance of previous tools in aspects such as the number of recovered regions and the distribution of sizes and fluxes (an improvement that is especially noticeable for the faintest and smallest regions). pyhiiextractor is therefore an optimal tool to detect candidate H ii regions, offering an accurate estimation of their properties and a good decontamination of the DIG component.