The nature of sub-millimetre galaxies I: A comparison of AGN and star-forming galaxy SED fits

High redshift sub-millimetre galaxies (SMGs) are usually assumed to be powered by star-formation. However, it has been clear for some time that $>$20% of such sources brighter than $\approx3$mJy host quasars. Here we analyse a complete sample of 12 sub-mm LABOCA/ALMA 870 $\mu$m sources in the centre of the William Herschel Deep Field (WHDF) with multi-wavelength data available from the X-ray to the radio bands. Previously, two sources were identified as X-ray absorbed quasars at $z=1.32$ and $z=2.12$. By comparing their spectral energy distributions (SEDs) with unabsorbed quasars in the same field, we confirm that they are dust reddened although at a level significantly lower than implied by their X-ray absorption. Then we compare the SED's of all the sources to dust-reddened AGN and star-forming galaxy models. This optical/NIR comparison combined with Spitzer MIR colours and faint Chandra X-ray detections shows that 7/12 SMGs are best fitted with an obscured quasarmodel, a further 3/12 show no preference between AGN and star-forming templates, leaving only a $z=0.046$ spiral galaxy and one unidentified source. So in our complete sample, the majority (10/12) of bright SMGs are at least as likely to fit an AGN as a star-forming galaxy template, although no claim is made to rule out the latter as SMG power sources. We then suggest modifications to a previous SMG number count model and conclude that obscured AGN in SMGs may still provide the dominant contribution to both the hard X-ray and sub-millimetre backgrounds.


INTRODUCTION
It is now more than two decades since the first blank field surveys using the Submillimetre Common-User Bolometer Array (SCUBA) on the James Clerk Maxwell Telescope (JCMT) revealed the existence of large numbers of highly luminous Far Infra-Red (FIR) sources, usually referred to as sub-millimetre galaxies or SMGs (Smail et al. 1997; Barger et al. 1998). These objects were quickly found to be at high redshift and to be heavily obscured by dust (e.g. Blain et al. 2002). But the identity of luminous sub-mm sources is still controversial. The standard view is that they are hyper-luminous starburst galaxies, seen in an obscured phase of their evolution (e.g. Alexander et al. 2005). In this interpretation they may be involved in the origin of early-type galaxies. But because of their high star-formation rate (SFR) and mass they then present a problem for the standard cosmology that still has to invoke a 'top-heavy' stellar Initial Mass Function (IMF) in starbursts to explain them (Baugh et al. 2005;Lacey et al. 2008). Bars and even spiral arms have been detected in ALMA (Atacama Large Millimeter/submillimeter Array) images and claimed as support for the star-forming galaxy picture (Hodge et al. 2016;Gullberg et al. 2019). However, these features are always only seen on scales an order of magnitude smaller than seen in local classical spiral galaxies. ★ E-mail: tom.shanks@durham.ac.uk (TS) An alternative hypothesis is that the bright sub-millimetre population is mainly powered by Active Galactic Nuclei (AGN). Many sub-mm sources contain AGN but the usual view is that they are sub-dominant to star-formation in powering these sources (e.g. Laird et al. 2010). But there are strong arguments for considering obscured AGN as being candidates for powering the SMG population. Obscured quasars are the primary candidates to explain the "missing" hard X-ray background (e.g. Comastri et al. 1995). Since these highly absorbed sources are likely to be dust-rich objects, they would be expected to have substantial luminosities in the infrared where the reprocessed light is emitted. Obscured AGN models have been previously shown to give a reasonable fit to the bright end of the submillimetre source counts, while star-forming galaxies are expected to make the dominant contribution at fainter fluxes (see Fig. 12 of Hill & Shanks 2011a following Gunn & Shanks 1999). If the sub-millimetre emission results from a dust torus irradiated by an AGN instead of star-formation, it must lie far enough (≈ 0.5kpc) from the central engine to maintain a cool (∼ 35K) temperature and simple torus models confirm feasibility (e.g. Andreani et al. 1999;Kuraszkiewicz et al. 2003;Siebenmorgen et al. 2014). Hill & Shanks (2011a,b) also showed that an obscured AGN model also fitted the bimodality of the Herschel Spectral and Photometric Imaging Receiver (SPIRE) ( ), with the star-forming and AGN components dominating at low and high respectively, while predicting that ≈ 20% of bright SMGs should be X-ray sources even at soft energies.
There now exists clear evidence of AGN activity in 20-40% of bright sub-millimetre sources, confirming this prediction. First, early 1. 4 ALMA imaging by Wang et al. (2013) found that 17 ± 6% of Extended Chandra Deep Field South (ECDFS) SMG's are X-ray sources. More recently, Cowie et al. (2018) in their Super GOODs ALMA survey found evidence for bright SMGs being dominated by hard X-ray sources while fainter sub-mJy SMGs were dominated by soft X-ray sources more consistent with star-forming galaxies. Franco et al. (2018) found that at least 40% of bright SMGs host an X-ray AGN, compared to ≈ 14% for other galaxies of similar mass and redshift. Finally, Stach et al. (2019) find that 18 ± 10% of bright SMGs are AGN as identified by power-law SEDs and other diagnostics. These significant AGN fractions are all the more remarkable given the 2 − 3× more near-Compton-thick AGN that may be wholly invisible even to ≈ 10 keV X-ray surveys. We also note that AGNpowered SMG number count models generally assume that fainter sub-mJy SMGs will be dominated by star-forming galaxies while the >1mJy luminous SMG population will be dominated by AGN powered sources, consistent with these recently reported results. With the advent of high resolution ALMA observations, submm source counterparts can be more accurately identified and then tested for the presence of an active nucleus. In about ≈ 20% of cases, broad or high excitation emission lines can be seen. In the other ≈ 80%, we can now check how well a dust obscured AGN Spectral Energy Distribution (SED) fits the ALMA counterpart in the optical/IR.
Here, we shall test how well a sample of 12 SMGs, complete to ≈ 3 mJy at 870 m, can be fitted with dust obscured AGN template SEDs. They were originally identified in an 11. 4 diameter area of the William Herschel Deep Field (WHDF, Metcalfe et al. 1996Metcalfe et al. , 2001Metcalfe et al. , 2006 by Bielby et al. (2012) using the Large APEX Bolometer Camera (LABOCA) on the Atacama Pathfinder Experiment (APEX) telescope. We shall compare the quality of these fits to those for similarly absorbed star-forming galaxies. We are helped by having new, high resolution, high signal-noise (S/N) ALMA imaging for eight of the twelve sources to help identify counterparts. These eight ALMA sources in themselves form a complete sample within the original 7 × 7 of the original WHDF (see Figs. 2, 3 of Heywood et al. 2013), although there are no ALMA data for the nearby spiral galaxy LAB-06. All 12 sources are contained in the extended 16 ×16 WHDF area where there is a large amount of multi-wavelength data. We shall fit optical and Near Infra-Red/Mid Infra-Red (NIR/MIR) data to estimate redshift and dust absorption, FIR and sub-millimetre data to estimate dust temperatures and masses. Although we shall not model or fit the WHDF Chandra X-ray data, these will also be vital for identifying several of our sources. Therefore in Section 2 we describe the multi-wavelength data now available in the WHDF. In Section 3 we detail our SED fitting procedures before reporting the results of fitting AGN and star-forming templates to the twelve individual SMG SED's in Section 4. In Section 5 we discuss how well the AGN and star-forming template fits compare overall and the implications for the nature of sub-millimetre sources. Finally, in Section 6 we present our conclusions.
We note that the analysis of the size, structure and SFR surface brightness of the seven sources observed by ALMA will be presented in Paper II (see Ansarinejad (2020) for preliminary results). There, the analysis of the ALMA observations of four > 6 QSOs (Quasi-Stellar Objects or quasars) (Carnall et al. 2015;Chehade et al. 2018) will also be presented to complement the interpretation of the WHDF SMGs. Finally, Paper III will discuss the FIR properties from the Herschel HerMES Large Mode Survey (HeLMS) of the full population of sixteen X-ray QSOs found by Chandra in the WHDF (Vallbe Mumbru 2004;Bielby et al. 2012) plus the four > 6 QSOs detected by ALMA.

DATA
The William Herschel Deep Field (WHDF) is a 7 × 7 sky area (extended to 16 ×16 ) at RA(J2000)=00h22m33.3s, Dec=+00d20m57s, initially observed in the optical at the William Herschel 4.2-m telescope (Metcalfe et al. 2001) and in the NIR at the Calar Alto 3.5-m telescope (Metcalfe et al. 2006) to provide UBRIZHK photometry to ≈ 28. Subsequently, it was observed with deep Chandra Xray data, Hubble Space Telescope (HST) i-band imaging (Böhm & Ziegler 2007;Fritz et al. 2009), Spitzer IRAC Equatorial Survey (SPIES) 3.6 and 4.5 m imaging (Timlin et al. 2016) and in the Herschel HeLMS survey at 250, 350 and 450 m (e.g. Wang et al. 2015). It has also been observed with deep LABOCA+ALMA exposures at sub-millimetre (sub-mm) wavelengths (Bielby et al. 2012) and at 8.4GHz(3.57cm) with the Karl G. Jansky Very Large Array (VLA) (Heywood et al. 2013). A summary of the fluxes in each band for the SMGs can be found in Table 1. Further details including the flux errors, the coordinates of source counterparts and their magnitudes and colours are given in Tables A1, A2, A3 and A4 in Appendix A.
Although WHDF was one of the earliest deep fields observed with CCD detectors, clearly there are now other fields with wider and deeper coverage in more high resolution bandpasses from HST, such as the GOODS fields (Dickinson et al. 2003) and successors, eg CDFS (Luo et al. 2017), the HST UDF (Beckwith et al. 2006), the COSMOS field (Le Fèvre et al. 2015), CANDELS (Grogin et al. 2011) etc. Nevertheless, for our current purpose, the availability of high resolution 0. 09, high S/N FIR data from ALMA is ideal for checking for counterparts and looking for low surface brightness features such as bars and spiral arms. Such data is still only rarely available in the other deep fields. The availability of 75ksec Chandra X-ray data is also vital for diagnosing AGN. Again, other fields such as CDFS have 7Ms exposures available and their deepest exposure per pixel is effectively ≈ 50× that in WHDF. Nevertheless, in searching for AGN X-ray signatures from typical bright SMGs we shall see that our Chandra combination of exposure time, resolution and low background are ideal. Fainter exposures are dominated by X-ray galaxies below the usual > 10 42 ergs s −1 AGN limit. So with WHDF we can develop the analysis methods to see if a hypothesis of significant AGN contribution to SMGs passes this first test that may motivate similar analyses of datasets such as ALESS (Karim et al. 2013;Hodge et al. 2013) in ECDFS (Weiß et al. 2009) with similar ALMA coverage but deeper HST and Chandra data or AS2UDS (Dudzevičiūtė et al. 2020) with many more ALMA sources albeit observed at lower resolution, together with deeper ground-based Kband data.

FIR and sub-mm data
The original 870 m survey in the WHDF was made in August 2008 and May 2009 using the LABOCA instrument on the APEX telescope at the Chajnantor site in Chile. The observations were fully described by Bielby et al. (2012) who compared eleven detected sub-mm sources in a central 16 diameter area of the WHDF to the Chandra X-ray sources, mainly identified as quasars (Vallbe Mumbru 2004). The sub-mm sources were detected as a complete sample down to 3.3mJy/beam. Only three sub-mm sources were optically identified, LAB-05 and LAB-11 as X-ray absorbed quasars at = 1.32 and = 2.12 and LAB-06 as a spiral galaxy at = 0.046.
A complete, flux-limited (but excluding LAB-06) subset of the LABOCA sources, LAB-01,-02,-03,-04,-05,-10, -11, in the central 7 × 7 of the WHDF were then targetted by ALMA on 11/10/2016 with the 12m Array in a configuration which yielded 870 m continuum images at 0. 095 resolution and a maximum recovered scale of 0. 926. The exposure times were 1572s each, long enough to detect any diffuse emission including spiral arms and bars surrounding the sub-mm core (see Paper II). These observations reached an 870 m surface brightness rms of 65 Jy/beam over a ≈ 17 field-of-view. All seven targets were strongly detected with LAB-11 revealing a second sub-mm source (named LAB-12) at ≈ 5 from the main LAB-11 source. The ALMA data were reduced using CASA imaging pipeline and then fitted for ellipticity, flux and position using the IMFIT package. Full details will be given in Paper II.
The Herschel HeLMS survey (Asboth et al. 2016;Oliver et al. 2012), covers the WHDF within its full 302 deg 2 area. HeLMS was observed in 2 fast-mode scans by Herschel SPIRE in the 250, 350 and 500 m bands, reaching almost the confusion limits. The resolution was 18 , 25 , 36 FWHM with 6 , 8. 33 and 12 pixels, resampled to 6 in the final maps. The nominal 1 noise (instrument+confusion) limits are 15.61, 12.88 and 10.45 mJy in the 250, 350 and 450 m bands. Here we assume detection limits of > 20mJy in each band. The 12 LABOCA sources were crosscorrelated with these Herschel catalogues and FIR sources were taken as counterparts within radii of 20 , 30 , 40 at 250, 350, 500 m. The resulting source fluxes are listed in Table 1 and their coordinates in Table A4.

Chandra X-ray data
The Chandra X-ray data on the WHDF turns out to be crucial in establishing the identity of several of our sub-mm sources. Chandra observed the WHDF with the ACIS-I detectors for 75 ksec (71 ksec on-sky). These data and their reduction and analysis were presented by Vallbe Mumbru (2004) and an initial comparison to the WHDF LABOCA sources was carried out by Bielby et al. (2012). The X-ray observations were made in December 2000 with Chandra's ACIS-I detector. The observation reaches fluxes of 4 × 10 −16 erg cm −2 s −1 in the soft 0.5-2 keV band and 3 × 10 −15 erg cm −2 s −1 in the hard 2-8 keV band and 1 × 10 −15 erg cm −2 s −1 in the total 0.5-8 keV band, and resolves > 70% of the hard X-ray background. The ACIS-I pointing centre was 00h 22m 33.3s, +00 20 55.0 (J2000) and the Chandra observation id was 900079. Vallbe Mumbru (2004) detected 150 sources with / > 2 in the total band. As reported by Bielby et al. (2012), only 2 sources were identified with X-rays to this limit to / > 3, LAB-05, (whdfch008) and LAB-11, (whdfch007). These X-ray sources have optical spectrosccopy that identify them as = 1.32 and = 2.12 X-ray absorbed QSOs.
Here, we reanalyse these X-ray data looking at the ALMA source positions for X-ray photons to a formal / > 1.43 (ie 90% confidence) that the source flux is non-zero in one of 3 bands, 0.5-1.2, 1.2-2.0 and 2-7 keV using 'ciao' routine srcflux. At these limits we detected LAB-01, LAB-03, and LAB-04 in at least one of these bands, as well as LAB-05 and LAB-11. We also detected X-rays at optical positions within the LABOCA ≈ 11 radius error circles for a further two sources, LAB-06 and LAB-07. In the latter case there are two possible optical counterparts with X-rays, named LAB-07-1 and LAB-07-3.
We then tested for the significance of these detections by making srcflux measurements in a randomly chosen 10 × 10 grid at ≈ 40 intervals in the central 7 × 7 ACIS-I area. No detections were made in any band where the formal 90% confidence interval included zero.
We note that these latter flux limits indicate they are 99% flux limits when the srcflux computed flux limit was at the 90% level. We suggest that this is due to the background level in these early Chandra observations being low at the level of 0.05 counts per pixel in the two softer bands and 0.15 counts/pixel in our hard band. With ACIS-I having 0. 492 pixels and 50% of light encircled within a 0. 75 radius within the 7 WHDF field, ACIS-I there are only ≈ 7 pixels per resolution element giving a background count of ≈ 0.35 counts in the softer bands and ≈ 1 count in the hard band. This means a single count is usually enough to establish a detection in the two softer bands and 1-2 counts in the hard band. So LAB-01 we detect 1 count at 0.5-2keV and 2 counts at 2-7keV, in LAB-03 we detect 2 counts at 1.2-2keV and in LAB-04 we detect 1 count at 0.5-1.2 keV and 1 count at 1.2-2keV. Clearly, although the error on each flux will be of order of 100% of the signal the significance of detection in each case is secure. This is confirmed empirically by our random flux measurements on the real Chandra data. The X-ray fluxes are listed in Table 1 and exact coordinates in Tables A2 and A3.
Given these astrometric issues, here for the 8 ALMA sources we follow Bielby et al. (2012) and take Δ < 1. 3 or ≈ 3 pixels as the upper limit on WHDF-ALMA separations. Since the galaxy sky density at the WHDF 3 limit of = 26.3 is ≈ 3 × 10 5 deg −2 , this means that in a circle of radius 1. 3 around an ALMA source. the expected number of optical sources is ≈ 0.12. So we only expect contamination by ≈ 1 faint WHDF source in our 8 ALMA source counterparts. The WHDF coordinate corrections are less important for the sources with only, less accurate, LABOCA positions i.e. LAB-06, -07, -08 and -09. For these we take the error circle radii, Δ , listed individually in Table 1 of Bielby et al. (2012). The resulting fluxes for the WHDF counterparts in (where available) are given in Table 1.
The WHDF band data in the central 7 ×7 from a 14.25 hr Calar Alto OmegaPrime exposure has 0. 9 seeing with 0. 396 pixels and is particularly deep, reaching = 22.9 at 3 (Metcalfe et al. 2006). The central WHDF band data is less deep, only reaching = 20.7 in similar seeing in a 0.9 hr exposure with the same  instrument (Metcalfe et al. 2006). For the HST Advanced Camera for Surveys (ACS) 2450s exposure -band frame on WHDF (Böhm & Ziegler 2007) the resolution is 0. 1 and the pixel size is 0. 05 but we still allow a radius of Δ = 0. 65 to allow for astrometry systematics. Again, the WHDF and HST band fluxes are listed in Table 1.

SPIES MIR data
Spitzer 3.6 and 4.5 m data from the Spitzer IRAC Equatorial Survey (SPIES Timlin et al. 2016) cover ≈ 115 deg 2 of SDSS Stripe 82 and therefore contains the whole WHDF within this equatorial region. The SPIES data reach 5 depths of 6.13 Jy and 5.75 Jy at 3.6 and 4.5 , respectively. Here, for our fits we set ≈ 2 flux limits of 2 Jy in each band. The SPIES pixel size of 0. 6 is half of the Spitzer IRAC pixel size due to image dithering. The Point Spread Function (PSF) FWHM corresponds to the 'warm' IRAC values of 1. 95 in the 3.6 m detector and 2. 02 in the 4.5 m detector. All 3 catalogues including the Dual detection, 3.6 m only and 4.5 m only were used. 2839 matches to SPIES data were found to the 14527 < 25.9 objects in the 16 × 16 extended WHDF area. No deep, longer wavelength data at 8, 12, 65, 100 m are available and this will clearly make it difficult to detect hotter temperature dust components in our SMG SED's. The only data at longer MIR wavelengths in the WHDF are given by the much shallower WISE data in the W3 and W4 bands at 12 and 22 m (Wright et al. 2010). Only LAB-11 is detected in these bands. See Table 1 for the SMG counterpart fluxes at 3.6 and 4.5 m.

VLA radio data
VLA data for the central 7 × 7 at 8.4 GHz (3.57cm) were reported by Heywood et al. (2013). These radio data were aimed at helping to identify the LABOCA source counterparts and were made in the most compact D-configuration in March-June 2010, with a 30hr exposure time. Over most of the central 7 × 7 WHDF field, the observations  6] colour-magnitude plot for all objects in WHDF area from SPIES data. Red dots mark WHDF SMGs with SPIES detections (ie excluding LAB-2,-3,-10). LAB-08 with only a 4.5 m detection is shown as an upper limit in in 3.6 m and a lower limit in [3.6]-[4.5] m colour. Blue dots mark WHDF QSOs with Chandra X-ray detections. The horizontal line represents the 1 − 2 > 0.4 limit recommended by Stern et al. (2012) for QSO selection and we note that all our SMGs with the exception of LAB-06 lie above this line. achieved a spatial resolution of 8 FWHM and an rms background noise of 2.5 Jy. 41 sources were detected at > 4 of which 17 had primary beam corrected flux densities. LAB-02, -05, -06 and -11 were identified as radio sources with LAB-05 and LAB-11 identity confirmed as X-ray absorbed QSOs, LAB-06 as a low redshift spiral galaxy and LAB-02 remained optically unidentified. The VLA fluxes are again listed as the final entries in Table 1.

Source photometry
Finding charts giving the relative positions of these multiwavelength data are given for the ALMA sources in Fig. 1 and for the LABOCAonly sources in Fig. 2. The resulting multi-waveband source photometry is summarised in Table 1 from the X-ray to the radio. Wavelengths are given in microns and fluxes are given in mJy. Flux upper limits are given where there was no detection in a given band. Flux errors are given in Table A1. The details of how the counterparts were decided upon are included in the object-by-object description of the SED fits in Section 4.4. Coordinates and other details for source counterparts and companions are given in Tables A2, A3 and A4.
Again we note that the optical/NIR WHDF data on which Figs. 1 and 2 are based have fewer HST bands than eg the CDFS CANDELS field where the HST depth is also ≈ 1 mag deeper. However, we are fortunate to have the HST F814W band available to explore the morphology of any counterpart in the optical/UV. The CDFS field also has the advantage in having HST WFC3 H band data at nominally 0. 15 resolution (although with 0. 13 pixel size) whereas the best band resolution is 0. 9 in the WHDF. But again, it turns out that only 1 out of 12 submm sources are undetected in at least one of our bands. The WHDF ground-based depth is also highest in the U, B bands and this makes it vital to explicitly use flux upper limits in these bands when sed fitting. Clearly we shall return to exploit the advantages of ALESS and AS2UDS data to test AGN fits if the WHDF results make this appear worthwhile.
We shall be referring to the 3.6 and 4.5 m SPIES data throughout the following. We therefore first show a comparison between the distribution of 3.6 m magnitudes (Vega-auto system) for the submm sources and the 16 X-ray quasars listed by Bielby et al. (2012) in Fig. 3(a) and similarly for the 4.5 m magnitudes in Fig. 3(b). Note that LAB-05 and LAB-11 that were previously identified as quasars are here counted in the quasars rather than SMGs. LAB-06 is also excluded from either population on the grounds of its low redshift and hence luminosity. We see that the broad-lined quasars are ≈ 10× brighter than the SMGs and we shall discuss the implications of this result in Section 5. Fig. 4 compares the [3.6] − [4.5] (Vega aperture 1) magnitude colours of the QSOs and sub-mm sources.
Here we initially see that all but one of our sub-mm sources show similar colours to the quasars with [3.6] − [4.5] > 0.4, the limit used to select AGN by Stern et al. (2012). Again these colours will be discussed as we assess the SED fitting results in Section 4.4.

SED FITTING METHOD
The method we use for SED fitting is maximum likelihood, . Here we broadly follow the method set out by Sawicki (2012) which deals with upper limits as well as detected fluxes, coded in Fortran. We note that we are minimising ( ) ≈ 2 /2 so 1 errors on derived parameters are approximately given where ( ) = ( )+0.5×Δ 2 ( ) where Δ 2 = 3.53, 4.72, 5.89 for = 3, 4, 5 fitted parameters. When all fluxes are detected this reduces to the usual 2 fit. Note that when there are upper limits involved, ( ) can numerically lie below zero, unlike for 2 . We fit the SED scaling parameter, , in the optical-IR regime separately from the FIR-sub-mm range but add the likelihoods to get the best overall fit, analogous to adding chi-squares when all observed fluxes are detected. We do not SED-fit the X-ray data, which we regard as being beyond the scope of this study. However, X-ray detections remain a valuable diagnostic for distinguishing AGN and star-forming sources.
We first fit in the optical-NIR for absorption, , and redshift, then we fit separately for a gray-body temperature plus redshift. More details are given in Paper II but we essentially use eqn. 1 of Dunne et al. (2000) with dust mass opacity coefficient, = 0.077 × ( /352.0 9) m 2 kg −1 , with emissivity index, = 1.8, to estimate the dust mass, , given a dust temperature, . For the estimates we assumed a cosmology with Ω = 0.7, Ω = 0.3 and 0 = 100 km s −1 Mpc −1 . Then we combine the two fits to derive an overall best-fit redshift, dust temperature and mass. This procedure usually leaves the best fit absorption, , unaffected. We convert all data into and then into for fitting. We calculate = 0 model values with wavelength and compare to observed values for the source with each spectral band's rest wavelength calculated for the tested redshift. The redshift range tested was 0 < < 4.5 at 0.1 redshift intervals. Other ranges were 0 < < 2.5 at 0.25mag intervals and 10 < < 50 at 1K intervals.
Since we are fitting five parameters, , , and scaling factors / and , we apply Δ 2 > 5.89 to give our 1 errors following Press et al. (1992). This corresponds to Δ − ( ) > 2.95 which is required since we use the Maximum Likelihood estimates to derive parameter errors as well as the parameters themselves. For goodness of fit measures we calculate 2 for the maximum likelihood model parameters. Here, we replace data upper limits by the upper limits themselves with errors also equal to the upper limit values, thus effectively treating all upper limits as 1 detections.

SED FITTING RESULTS
In making a comparison between AGN and star-forming galaxy SMG fits, we first acknowledge that Dudzevičiūtė et al. (2020) has shown that, with enough assumed model components, it is certainly possible to get good 2 fits to their ≈ 700 SMGs with their star-forming galaxy templates. da Cunha et al. (2015) list their model template parameters as including stellar populations' age, SFR and metallicity plus stochastic SF bursts. The dust reddening model includes lifetime of stellar birth clouds, and the optical depths seen by stars younger and older than the clouds. They also allow four dust emission components -a Polycyclic Aromatic Hydrocarbon (PAH) template, an MIR hot dust continuum plus warm and cold dust in thermal equilibrium. Since our intent here is to test if two, simple, reddened AGN templates can fit our optical/MIR data, we shall also restrict ourselves to using two basic star-forming galaxy templates with the same, simple, dust reddening model to act as reference points. Therefore, we next describe our AGN and star-forming galaxy (SFG) templates and our dust reddening model.

AGN model SED's
Single Power-Law AGN Template. We first show the SED's of the X-ray quasars WHDFCH017 at = 0.40 and WHDFCH099 at = 0.82 from the lists of Vallbe Mumbru (2004) and Bielby et al. (2012). Both have accurate Chandra X-ray positions which matches to a UVX quasar. These quasars were chosen because they have a flat optical/IR spectrum in ( ) typical of about half the bright, broad-lined quasars in the WHDF. WHDFCH017, -099 have no submm detection. The single power-law model fitted to their suitably normalised optical-MIR SED's is: as shown in Fig. 5. Here, is the rest wavelength in microns.

'1.4 m Dip' AGN Template.
A further quasar template was fitted when it was realised that there were other WHDF quasars for which a power-law with a 'dip' at ≈ 1 m was a much better fit to unabsorbed X-ray QSO data. This can be seen in Fig. 5 where four WHDF QSOs, WHDFCH005,-016, -090, -109 SED's are shown, after suitable rescaling in the vertical direction. This ≈ 1 m feature, here actually fitted at 1.44 m, is interpreted as the break between the UV bump due to the accretion disc and the longer wavelength hot ( ≈ 300−1000 ) dust black-body components in QSO spectra (e.g. Richards et al. 2003;Landt et al. 2011). It is not known why other QSOs such as WHDFCH17/WHDFCH099 do not show this feature. This '1.4 m Dip' AGN template is represented here by power-law fits in the ranges shown: Both AGN models simply take a fixed 25% of the flux above 0.1216 m as representing the effect of the Lyman forest on the SED below that wavelength.

Star-forming Galaxy model SED's
LAB-06 Starforming Galaxy Template. Although this LABOCA source has no ALMA data, it is such a bright ( = 16.05 mag) spiral galaxy ( = 0.046) that it is the unambiguous counterpart of the sub-mm source. The position of the galaxy is 5. 0 away from  the LABOCA position, well within the the 11. 3 tolerance listed in Table 1 of Bielby et al. (2012). It is therefore a typical Sab spiral at the knee of the galaxy luminosity function, * . The fitted SED is shown in Fig. 6. In Fig. 8 we then see that this galaxy is detected in Herschel and VLA and in Chandra X-ray at the optical position. The SED is fitted by a quadratic plus a power law: To this we applied the dust reddening formula described in Section 4.3. As noted above, Dudzevičiūtė et al. (2020) found that with sufficient parameters it was possible to get very good fits to their data. There are also possible flaws to our approach in that we have only allowed dust absorption to be applied to the median template   and so the unabsorbed template represents the bluest model that we can fit. However, our only aim is to see how close the AGN models can get to the quality of fit of the star-forming models and this justifies our approach of minimising the number of model parameters for both AGN and SFG templates. So in cases where the AGN models give poor fits, the SFG templates can still give useful reference points to see how well these basic models do in comparison.

Dust Reddening Law
We shall now proceed to apply a simplified dust absorption/reddening law. The reddening law is a fit to the average Milky Way reddening curve data ( = 3.1) taken from Fig. 10 of Gordon et al. (2003), following Cardelli et al. (1989) in the range 0.3 < < 11.0 where = 1/ with wavelength, , measured in microns. The fit consists of two polynomials in the two wavelength sections given in eqns. 11 and 12. This allows us to include the 2200Å dust absorption feature as found in the Milky Way. Other authors have found that including this feature is helpful in fitting high-redshift galaxy and AGN data (e.g. da Cunha et al. 2015). We extrapolate this fit for < 0.3 (i.e. = 3.33 m) with eqn. 10 i.e. we assume a simple 1/ law for infrared wavelengths longer than 3.33 m, beyond the range of Cardelli et al. (1989) but assuming a slope in / ( ) similar to that found by these authors between the and bands. Thus, in the fits shown below, is the absorption in magnitudes at wavelength = 1/ and is the absorption in magnitudes in the band at 0.55 m. The reddening law fits are therefore:

Sub-mm source SED fitting
We now discuss the likely counterparts to each of our 12 sub-mm sources and then the conclusions from the SED fits of the two AGN and two star-forming galaxy templates. The main SED fitting results can be found in Figs. 7,8,9,10 and Table 2, with a graphical summary shown in Fig. 11. Fig. 1 and Table A2) we see that LAB-01 shows weak X-ray emission at (1.2−2 ) = 5.84 +13.5 −4.18 ×10 −17 erg cm −2 s −1 and

LAB-01 In
(2 − 7 ) = 7.42 +10.1 −4.58 × 10 −16 erg cm −2 s −1 that appears to be absorbed with a column estimated as ≈ 1 × 10 22 cm −2 . Strong FIR emission from HeLMS is seen (see Table A4) similar to LAB-05 and LAB-11 although no radio emission is detected. There is a WHDF detection at = 25.4, whdf5449, only 0. 15 offset from the ALMA position and also detected at and . There is a nearby (0. 15) HST i detection at = 26.36 ± 0.04mag which may be slightly extended but only at the ≈ 0. 2 level. The HST detection is difficult to see in Fig. 1. There is also a SPIES detection at [3.6] + [4.5] m at 0. 25 from the ALMA source. It is classified as a galaxy in both SPIES bands with − − ℎ1 = 0.002 and − − ℎ2 = 0.32. Therefore we take the WHDF/HST/SPIES sources to be the ALMA counterpart.
In Fig. 7 we see that the weak X-ray emission may be absorbed with a neutral H column estimated as ≈ 1 × 10 22 cm −2 . The comparison with the best fit 1.4 m dip AGN model gives a dust reddening of = 1.75 ± 0.25mag and a redshift of = 2.6 ± 0.15. The fit to the starforming galaxy is formally worse at least at the Δ 2 = 9.54, 4 level for all values than the AGN fits. Nevertheless, there is a suggestion that the 1.6 m feature in the SF6 template may fit better. In the SPIES data, the 3.6 m flux corresponds to [3.6] = 17.88 (auto,Vega) with [3.6] − [4.5] = 0.56 for aperture 1 with a 1. 44 radius, consistent with an AGN and therefore suggesting that the possible 1.6 m feature is compatible with what is seen in QSO spectra. Conclusion: The X-ray detection suggests it is a QSO. Fig. 1 and Table A2 we see that LAB-02 shows no X-ray emission. Strong FIR emission is seen as well as 8.4 GHz radio emission (see Table A4), although the radio source lies at 2. 9 from the ALMA position. The optical position (whdf9271) is also 1. 65 away and faint at = 25.8. The WHDF list classifies it as 10, signifying a multiple source. But it is clearly detected on the HST band image as a point source (≈ 0. 2 FWHM) 0. 96 offset from whdf9271. It is also 0. 96 from the ALMA source and we consider this WHDF/HST source as the ALMA counterpart. A faint, 2.77 × 10 −3 mJy, SPIES 4.5 m source is detected within 1. 54 of the optical position and 2. 18 from the ALMA position. The source has − − ℎ2 = 0.46, midway between point source and extended. But we judged 2. 18 to be too far away to be the ALMA counterpart and so there are only SPIES [3.6], [4.5] m upper limits assumed for this ALMA source.

LAB-02 In
In Fig. 7 the comparison with the best fit 1 power-law AGN model implies a dust absorption of = 0.25 ± 0.38mag, a redshift = 3.1 ± 0.25 and ≈ 39 . The best fit to a starforming galaxy is AS2UDS with = 0.5 ± 0.75 and = 0.0 ± 0.15 with a low fitted dust temperature of < 10 . The star-forming fit is marginally worse than the 1-power-law AGN model at the Δ 2 = 1.0 level but this rises to Δ 2 > 9.5 for any > 0.5 whatever the . The FIR/radio ratio also suggests a high redshift object, with the caveat about the ALMA/radio offset. Conclusion: probable QSO. Fig. 1 and Table A2 we see that LAB-03 shows some evidence of X-ray emission in the two harder bands (1.2−2 ) = 1.77 +2.5 −1.1 ×10 −16 erg cm −2 s −1 and (2−7 ) = 6.29 +4.8 −1.0 ×10 −17 erg cm −2 s −1 within 0. 17 of the ALMA position. We are reasonably satisfied that the WHDF source whdf9547 at = 24.15 is identified with the double galaxy shown on the HST (see Fig. 1) image which is offset by 1. 82 from the ALMA position. A SPIES 3.6 m source close to the detection limit is seen at 1. 57 offset from ALMA and 1. 24 from whdf1234. It is classified as a probable galaxy in the [3.6] m SPIES band with − − ℎ1 = 0.48. This source may possibly be associated with a fainter object detected in HST , offset 1. 24 NW of the double galaxy. Generally, there is significant doubt about whether any of these optical/NIR detections are directly associated with the ALMA sub-mm source which is significantly offset from the WHDF (+HST) galaxy at a separation of ≈ 1. 54 and from the SPIES source at 1. 57 (see Fig. 7). We note that there is a faint object detected only in the H band which may be the actual counterpart as shown in Fig. 1 at the 'H band' coordinate listed in Table A2.

LAB-03 In
We have therefore fitted the SED (see Fig. 7) assuming the whdf1234, HST and SPIES sources are from the double galaxy but this object is unlikely to be the direct counterpart of the sub-mm sources and more likely to be a companion. The SED best fit is the 1.4 m dip AGN model with = 2.7 ± 0.35 and = 0.25 ± 0.25, < 10 but the AS2UDS star-forming fit with = 0.2, = 0.0, < 10 is only negligibly worse (Δ 2 = 0.1). In the SPIES data, [3.6] = 19.49 (automag Vega) and it is undetected in the [4.5] band. The upper limit on the [4.5] flux gives [3.6] − [4.5] < 0.31 for aperture 1. Here, because of the uncertainty of the optical/NIR counterpart we weight the detection of the weak X-ray source at the exact ALMA position more highly and conclude that LAB-03 is an obscured quasar possibly associated indirectly with the object at ≈ 2.7, again bearing in mind the caveats about the uncertain optical/NIR counterpart. Conclusion: QSO. LAB-04 This is the archetypal SMG in the WHDF with no detections and only detections at , [3.6] and [4.5]. However, the and SPIES detections are relatively strong and are both within the 0. 25 − 0. 5 range. There is also a hint of X-ray detection in the two softer bands at  (2004)). This is confirmed with the X-ray source being only offset from the ALMA position by 0. 38. Strong FIR emission is seen as well as 8.4 GHz radio emission, although the radio source EVLA-8 is offset by 1. 40 from the ALMA position. The closest WHDF counterpart is whdf6483, offset from ALMA by 0. 56 (see Fig. 1 and Table A2) and is classified as a galaxy in the WHDF -band. This object is UVX and has spectroscopic confirmation as a = 2.12 narrow-lined QSO, WHDFCH008 from Bielby et al. (2012). Now the offset between whdf6483 and the X-ray position is 0. 65 but we take these to be the same object and the counterpart to the LAB-05 ALMA source. There is also a SPIES [3.6], [4.5] detection at 0. 31 offset from the ALMA source (see Fig. 1). It is also classified as a galaxy in both SPIES bands with − − ℎ1 = 0.23 and − − ℎ2 = 0.07. The SED comparison with the best-fit single power-law AGN model in Fig. 8 gives a dust absorption of = 1.0 ± 0.25mag. The comparison with the best fit 1-power law AGN model gives a dust absorption of ≈ 1.25 ± 0.1mag. Both give = 2.3 ± 0.15, consistent with the actual redshift of = 2.12. We note that the reduced 2 of the overall best fit 1.4 m dip AGN model is 4.04 mainly due to a large residual on the -band data at rest wavelength of 0.1 m. We decided against any increase of the empirical error to provide a smaller 2 so we shall bear in mind that the AGN models are not perfect fits to this known QSO. The fit to the starforming galaxy is very significantly worse for all values (see Table 2 and Fig. 11). We further note that the AGN absorption of = 1.25 can be compared to ≈ 45 mag implied by the X-ray absorption suggesting that the X-ray absorption is located at closer line-of-sight distance to the QSO where dust may be destroyed, with the dust that we measure via the SED lying further away. In the SPIES data, [3.6] = 17.15 (Vega) with [3.6] − [4.5] = 0.96 for aperture-1. Conclusion: = 2.12 QSO. LAB-06 Although this LABOCA source has no ALMA data, it is such a bright ( = 16.07 mag) spiral galaxy ( = 0.046) that it is the unambiguous counterpart of the sub-mm sources. The position of the galaxy (whdf3406) is 5. 0 away from the LABOCA position, well within the the 11. 3 tolerance listed in Table 1 of Bielby et al. (2012). It is therefore a typical Sab spiral at the knee of the galaxy luminosity function, * . In Fig. 8 we then see that this galaxy is detected in Herschel, VLA and Chandra X-ray, the latter at a faint flux of (1.2−2 ) ≈ 6.8×10 −17 erg cm −2 s −1 at the optical position. We have already noted our use of this sub-mm galaxy as one of our two templates for a dusty star-forming galaxy. Conclusion: = 0.046 spiral galaxy. LAB-07 Here we have LABOCA data but no ALMA data. The uncertainty on the position is Δ = 11. 6 according to Bielby et al. (2012). There are 3 possible optical sources associated with 3 SPIES sources at 8. 0 (LAB-07-1), 4. 5 (LAB-07-2) and 3. 0 (LAB-07-3) offsets (see Fig. 2). The faintest optical/SPIES source at the largest offset is also a very faint (≈ 1 ) X-ray source in the two harder bands. But since this is below our X-ray significance threshold and since the brightest optical/SPIES source (LAB-07-3) is also the closest to the LABOCA position and also has a low-significance X-ray detection, we consider this source (whdfext3652) as the most likely counterpart. This source is classified morphologically as a galaxy in SPIES and in WHDF. LAB-07 is also close to a strong Herschel source at 250, 350 and 500 m (see Table A4).
In terms of SED fitting, both AGN fits give = 3.1 ± 0.1, = 0.0 ± 0.1 and = 48 and are significantly better than either of the star-forming galaxy fits with SF6 giving the best fit with = 0.1, = 0.0 and = 13 . Moreover, the AS2UDS SED fits both strongly reject redshifts > 0.5. Also, the SPIES data give [3.6]=18.69 with [3.6] − [4.5] = 0.49 for aperture-1. Again this seems not to fit with a low redshift galaxy. Although there is uncertainty in the counterpart, the better AGN fit, low significance X-ray detection and red SPIES colour suggest a QSO. Conclusion: Probable QSO LAB-08 Again we have LABOCA but no ALMA data. The uncertainty on the LABOCA position is Δ = 12. 6 according to Bielby et al. (2012). No X-rays nor radio emission are detected. The optical source whdfext3250 is faint at = 25.6 and lies at 4 .2 E, 0. 8 N from the LABOCA coordinate (see Fig. 2). Two very low S/N SPIES 3.6 m sources and one similarly low S/N 4.5 m source are detected but all at slightly larger distances (4. 7, 5. 8, 7. 6) from the LABOCA position than whdfext3250. However, a second faint 4.5 m source is detected at higher S/N closer to the whd-fext3250 position (2. 8 E, 2. 07 N). We therefore take whdfext3250 as the counterpart 4. 3 from the LABOCA position as this is the closest candidate, together with this [4.5] m source, despite these larger than usual offsets between the optical and the [4.5] m positions. Morphologically, whdfext3250 is identified as a galaxy in the band and the 4.5 m band. Although not detected at 3.6 m, whdfext3250 is strongly detected in the band and is formally UVX at − = −0.67 ± 0.2. LAB-08 is also close to a strong Herschel HeLMS source at 250, 350 and 500 m.
The AGN SED fits are both much better than the star-forming galaxy fits with the best 1-power law AGN model with = 4.0 ± 0.2, = 0.75 ± 0.5 nd > 50 having Δ 2 = 16.02 over the best AS2UDS fit with ≈ 0.0, ≈ 0.0 and > 50 . However, it has to be said that both best fits are unconvincing in Fig. 9 and both give = 0.0 (see Table 2). The lack of a detection in 3.6 m band gives a lower limit of [3.6] − [4.5] > 0.80 which is again consistent with a QSO. This and its UVX property suggest a QSO but there is still uncertainty over whether it is the counterpart. Conclusion: Probable QSO.
LAB-09 Again we have LABOCA but no ALMA data. Neither VLA radio emission nor Herschel FIR emission is detected. Only a weak X-ray source in the softest and hardest bands may be detected at the LABOCA position but these are not even jointly significant at 1 . A faint optical/IR source (whdfext5230) with = 25.6 and = 21.05 is detected within 2 of the LABOCA position. whdfext5230 is coincident with a source detected in SPIES at 3.6 and 4.5 ms (see Fig. 2 and Table A3). The [3.6]-[4.5]=0.44 colour is above the 0.4 mag threshold for a QSO. With class-star-ch1=0.407 and class-star-ch2=0.117, both correspond to galaxies and similarly for the -band morphology.
The best overall SED fit is given by the AS2UDS star-forming galaxy model with = 0.8 ± 0.35, = 1.0 ± 0.75 and formally < 10 but with 3 upper limits from HeLMS there is essentially no constraint on the dust temperature. However, the Δ 2 = 0.43 is only a marginal advantage for the AS2UDS template over the single powerlaw AGN template which also gives a low redshift ( = 0.5 ± 0.35). However, a ≈ 0.5 QSO is more consistent with the SPIES colour than a ≈ 0.8 galaxy. Although the counterpart is also uncertain, we therefore conclude that this source is a probable QSO. Conclusion: Probable QSO.

LAB-10
This source has ALMA data as well as LABOCA data. We note that it lies in the outskirts of a nearby early-type galaxy and this makes detection more difficult in the optical bands. Neither radio nor X-ray emission is detected. Herschel FIR emission is detected at 250 and 350 m. An optical source, whdf428 is detected at = 23.97 and = 25.62, offset by 1. 68 from the ALMA position (see Fig. 1 and Table A3). A point-like source is also detected on the HST frame, 1. 2 West of the ALMA source at = 25.85 ± 0.05 and mid-way to the WHDF source with a further 1. 2 offset and is probably the counterpart to whdf428. A source is also detected quite strongly at 3.6 and 4.5 m in SPIES at 1. 9 offset from the ALMA source. This SPIES source is probably the HST diffuse source to the SW of the HST point source. Although the HST point source could be the counterpart of whdf428 and the SPIES source, we regard the 1. 2 offset of the HST point source from the ALMA source as too far for it to be its counterpart. Although the offsets for optical and SPIES sources are > 1 .0 we treat these as the detected components of a single object, given the possible astrometric errors. We therefore treat whdf428 as a companion to the ALMA source rather than its direct counterpart. In SED fitting, we quickly found that the HST = 25.85 mag was too faint for continuity with the brighter whdf428 and SPIES magnitudes so this was eliminated from the analysis, implying that it may only be a second, closer, companion to the ALMA source. Thus for the other whdf428+SPIES companion, we find that in both SPIES bands, whdf428 is classed as a galaxy (class-star-1,-2=0.0) and similarly in (SG=5). The SPIES colour is [3.6] − [4.5] = 0.92, well into the QSO locus.
The best SED fit for whdf428 (see Fig. 10) is given by the AGN 1.4 m 'Dip' model with = 0.9, = 1.25 and = 21 with Δ 2 = 4.8 compared to the best fit AS2UDS star-forming model (see Fig. 11 and Table 2). We conclude that although the SPIES colour suggests whdf428 is a QSO, its 2. 3 offset from the ALMA source makes it unlikely to be the counterpart. The = 25.85 mag rest wavelength (microns) Figure 7. Comparison of LABOCA sub-mm sources with best fitting quasar and star-forming galaxy templates. Note that for LAB-03 the optical/MIR detections are for a close companion since the direct counterpart is undetected in these bands. Also with only HeLMS FIR upper limits, the dust temperature (and mass) for LAB-03 are unknown and the best fit shown is therefore only nominal. rest wavelength (microns) Figure 8. Comparison of LABOCA sub-mm sources with best fitting quasar and star-forming galaxy templates. Note that with only HeLMS FIR upper limits, the dust temperature (and mass) for LAB-04 are unknown and the best fit shown is therefore only nominal. Also, for LAB-05 the fits are shown for the best SED fitted redshifts, whereas its spectroscopic redshift is = 2.12. The spectroscopy also identifies LAB-05 as a QSO (Bielby et al. 2012). Similarly, LAB-06 has been spectroscopically identified as a = 0.046 spiral galaxy and has been used here as the basis for the star-forming galaxy template, SF6. rest wavelength (microns) Figure 9. Comparison of LABOCA sub-mm sources with best fitting quasar and star-forming galaxy templates. Note that none of these three LABOCA sources have been observed by ALMA and so their sub-mm positions and hence identification of counterparts are less certain than for the other sources. Also, with only HeLMS FIR upper limits, the dust temperature (and mass) for LAB-09 are unknown and the best fit shown is therefore only nominal. rest wavelength (microns) Figure 10. Comparison of LABOCA sub-mm sources with best fitting quasar and star-forming galaxy templates. Note that for LAB-10 the optical/MIR detections are for a close companion since the direct counterpart is undetected in these bands. Also, for LAB-11 the fits are shown for the best SED fitted redshifts, whereas its spectroscopic redshift is = 1.32. The spectroscopy also identifies LAB-11 as a QSO (Bielby et al. 2012). Finally, with only HeLMS FIR upper limits, the dust temperature (and mass) for LAB-12 are unknown and the best fit shown is therefore only nominal. Figure 11. Δ 2 comparison of the best fitting star-forming galaxy (SFG) and AGN models from the results in Table 2. LAB-03,-10 are shown in brackets since they are believed to be companions rather than counterparts. LAB-07,-08,-09 are shown in square brackets since these counterparts are less certain due to only having LABOCA source positions.
The SED fit for the 1.4 m dip AGN model (see Fig. 10) gives = 1.5 ± 0.1mag and = 1.6 ± 0.1, and = 32 ± 5K. The fit to the AGN 1-power-law model is worse although giving similar parameter values. The fits to the starforming galaxies are very significantly worse for all values. Conclusion: = 1.32 QSO. LAB-12 This object was picked up in the same ALMA observation as for LAB-11. It is ≈ 2× fainter at 870 m than LAB-11 and lying 10. 6 SE. It is in the direction of a second 8.4GHz radio peak detected in EVLA-6 (see Fig. 2 of Heywood et al. (2013)), now called EVLA-6-2, but EVLA-6-2 is a further 4. 05 ± 0. 75 E and 4. 91 ± 1. 91 S of LAB-12 (see Table A4), suggesting EVLA-6-2 is not a radio counterpart of LAB-12. No X-rays were detected from this sub-mm source. There is also no WHDF optical detection but a faint source is detected in the HST band at 0. 43 offset from the ALMA source with = 25.38 ± 0.04. It is also strongly detected in the , bands at 0. 32 offset with = 21.04 ± 0.02 and = 19.87 ± 0.02. In SPIES the nearest and brightest source was first thought to be detected only in the 4.5 m band at 0. 24 from the ALMA source with the nearest 3.6 m source 1. 68 away. However, inspection of the 3.6 m image indicates that the source detected there should have the same coordinates as the 4.5 m sources. We then find [3.6] = 17.69 (Vega auto) and [3.6] − [4.5] = 1.43 (ap1 Vega). Again this is well into the QSO locus.
The best SED fit is given by the AGN 1.4 m dip model with Δ 2 = 2.07 over the AS2UDS star-forming template. Both models fit reasonably well with 2 = 19.27 for the AGN model and 2 = 21.34 for the AS2UDS template with 7df. Conclusion: Probable QSO

SED fitting results summary
We have seen that the AGN models fit the SMG SED's at least as well as the star-forming galaxy templates where the counterparts can be identified (see Fig. 11). The main exception is the nearby spiral galaxy LAB-06. Of course, with a larger selection of starforming templates arbitrarily good fits to most SMG SED's can be obtained as shown by Dudzevičiūtė et al. (2020); clearly with enough model components increasingly good fits can be expected. Here, we have therefore only fitted two simple star-forming galaxy templates, one based on LAB-06 and one based on the median SMG fit of Dudzevičiūtė et al. (2020), to make a fair comparison to the two simple AGN templates we have employed, while keeping the number of model components low. We also caution that the counterparts to LAB-03,-10 are unknown despite having accurate ALMA positions and are thus bracketted in Fig. 11 due to close companions having had their SED's fitted in these two cases. Similarly, the counterparts to LAB-07,-08,-09 are enclosed in square brackets in Fig. 11 due to the uncertainty in the identity of their counterparts due to their only having LABOCA source positions.
One possible issue is that we have not allowed lower dust absorption than set by the median star-forming template so in cases where the best star-forming fit has = 0.0, ie LAB-03, -05, -07, -08, -11 this might bias the AGN-SF comparison. But LAB-05,-11 are previously identified X-ray QSOs and LAB-03 also shows weak Xray emission. So only the LABOCA sources LAB-07,-08 are left as being possibly subject to this bias and none of the ALMA targets. Even LAB-07, -08 are fitted at ≈ 0, which is unlikely for luminous sub-mm sources. The star-forming fits also put LAB-02 and LAB-03 at implausibly low redshifts.
A summary of the best AGN and star-forming galaxy template fits for each sub-mm source is given in Table 2, listing the best-fit values for the redshift, dust temperature, , dust mass, , and visual absorption, . The 11 AGN redshifts (excluding the star-forming galaxy LAB-06) range from 0 < < 4.5 with an average = 2.43 ± 0.31 and the absorptions range from 0 < < 2.5 mag with an average of = 1.25 ± 0.25 mag. With many SFG fits being skewed to = 0 we do not quote averages for these. We also do not quote average absorption for the SFG fits because recall they do not include the extra absorption in the original templates. For the AGN FIR fits that have more than one FIR data point and again excluding LAB-06 we find that the dust mass ranges between 1.1 < < 4.9 × 10 8 with an average of = 1.77±0.46×10 8 . The dust temperatures for these 7 (including the LAB-08 lower limit of 50K) range from 21 < < 50K with an average = 39.3 ± 3.6K. The ranges of for the SFG fits are much wider and if necessary can be obtained from Table 2. These ranges and averages for redshift, absorption, dust temperature and dust mass are quite consistent with those found in other sub-mm source studies where more quasar spectroscopic redshifts are available.  Table 2. SED Fits with parameters and errors based on maximum likelihood estimates. 2 values were calculated assuming these maximum likelihood parameters. Templ column indicates the best fitting AGN and star-forming galaxy template. In last column, indicates the number of data points included in fit. For a given source, first row refers to fit in optical/NIR/MIR and second refers to the fit now also including FIR detections. Temperatures and dust masses are marked n/a when they would be based only on one detected sub-mm flux with no other FIR fluxes except upper limits. Dust mass, , is measured in solar masses assuming Ω = 0.3, Ω Λ = 0.7 and Hubble parameter, ℎ = 1. X-ray and radio data are excluded from fits.

DISCUSSION
We have compared SED fits of AGN and star-forming templates to a complete sample of twelve sub-mm sources in the WHDF over the optical-MIR and FIR wavelengths. Chandra X-ray data was also available for several sources but not fitted. Eight of the twelve sources originally identified by LABOCA have high resolution, high S/N ALMA data. Of the two AGN templates we used, we find about half are better fitted by a single power-law model and the other half by a model with a minimum or 'dip' at 1.4 m. This 'dip' represents the split between the 'blue bump' from the accretion disc at shorter wavelengths and hot dust components at longer wavelengths. For the star-forming templates we used an empirical template from the = 0.046 spiral galaxy, LAB-06, that is one of our 12 sub-mm sources. We also used a template fitted from the median best fit SMG SED fitted by Dudzevičiūtė et al. (2020) to ≈ 700 AS2UDS sub-mm sources. Here we found that the AS2UDS template was the better star-forming fit to 10/12 WHDF sub-mm sources.
In the comparison between the best AGN and star-forming template fits, we found that the AGN template fitted better in 5 cases , the star-forming template in 1 case (LAB-06), there was no significant difference at 2 in 4 cases  and the optical/NIR/MIR counterpart was unidentified in 2 cases (LAB-03, -10). The main fitted parameters were the dust extinction in the optical-NIR, the dust temperature in the FIR and the redshift jointly between the two. We re-iterate that there is increased uncertainty about the counterparts of the LABOCA only sources, LAB-07,-08,-09, given the lower precision in their sub-mm source positions.
The X-ray data provided further important constraints. Two submm sources, LAB-5 and LAB-11, had already been identified as absorbed X-ray quasars by Bielby et al. (2012) from the 3 X-ray catalogue of Vallbe Mumbru (2004). With the help of the ALMA data, a re-inspection of the X-ray data found traces of low S/N X-rays in the case of three further sub-mm sources, LAB-01, -03 and -04. For LAB-01 and LAB-04 the fitted redshifts place their X-ray luminosity at > 10 42 erg s −1 implying that they are quasars. The detection of X-rays in the sub-mm source LAB-03 increases the probability that it is a quasar although we note that the doubt about its counterpart leaves its redshift uncertain. The X-ray identifications of LAB-01, LAB-03, LAB-04 as quasars leaves seven sub-mm sources identified as quasars  with no preference between AGN and star-forming template at 2 , one low redshift star-forming spiral (LAB-06) and two with no optical/IR/X-ray counterpart identified (LAB-10).
We conclude that AGN make at least as good fits to 10/12 or 83 ± 26% of sub-mm sources with only 1 source (≈ 8%) where a star-forming galaxy was clearly the better fit, the = 0.046 spiral galaxy, LAB-06. We have also noted that the majority of these 10 sources have 1 − 2 > 0.4 consistent with them being quasars. We acknowledge that other authors have also found excellent fits to SMG SEDs with pure star-forming templates and, given our results, we expect that models with a mixture of AGN and star-forming tem-plates should also provide good fits (e.g. Wang et al. in preparation). We again emphasise that the minimum AGN fraction of the 8 with ALMA positions comprises those with X-ray detections i.e. LAB-01, LAB-03, LAB-04, LAB-05, LAB-11 ie 5/8 or 62.5%. One further caveat to be made is that we have little data at 8-100 m between the SPIES and Herschel/LABOCA/ALMA wavelengths. It has been previously suggested that hot dust at observed wavelengths of 5-24 m differentiates quasars from other SMGs, although they are indistinguishable in the 250, 350, 500 m band colours (e.g. Fig. 1 of Hatziminaoglou et al. 2010). We have argued that the 3.6, 4.5, 5.5 and 8 m colours of SMGs showing the same colours as quasars in Fig. 2(c) of Dudzevičiūtė et al. (2020) sample of ≈ 700 SMGs implies that differences in the hottest dust component may not be significant between the two populations. Hill & Shanks (2011a) argued that X-ray absorbed quasars may be more likely to show FIR emission based on LAB-05, LAB-11. They built a model where more X-ray absorbed quasars had more dust emission, that could explain ≈ 50% of the sub-mm background with a further 50% arising from faint star-forming galaxies. However, this model is not unified -in the case of the simplest models, face-on nuclei with little HI column might be expected to show similar amounts of FIR dust emission as edge-on oriented quasar discs showing significantly larger HI column. But the Hill & Shanks model would imply more dust emission in the latter case. Also, such a model may not explain the Hatziminaoglou et al. (2010) results unless there were distinct AGN populations with either hot or cold dust components.
We therefore now consider such an adjustment to the Hill & Shanks model where intrinsically brighter quasars show more hot dust emission than fainter AGN. This is supported by our finding that our X-ray quasar sample is, on the average, ≈ 10× brighter at 3.6-4.5 m than our LABOCA/ALMA sub-mm sample (see Figs. 3). Certainly, the small amounts of dust extinction ( < 2.5mag) seen in our SED fits are not enough to account for the sub-luminous 3.6-4.5 m emission of SMGs. An anti-correlation between MIR and FIR luminosities where dust is heated and/or destroyed in the environment of the brightest quasars could easily explain the Hatziminaoglou et al. (2010) result. Such a correlation has also been seen in other X-ray selected AGN by Ricci et al. (2017), at least in the form of X-ray quasars with high Eddington ratios having lower X-ray absorption columns. This result can be interpreted as, for a fixed , higher luminosity quasars have less dusty gas due to heating by quasar outflows.
The sub-mm counts at > 1mJy can then be explained by intrinsically fainter, X-ray absorbed quasars at * , while the sub-mJy counts would still be explained by modestly star-forming galaxies like the spiral LAB-06. In the * quasar population both hot ≈ 300 − 1000K dust at a few parsecs radius from the accretion disc and cooler ≈ 35K dust at ≈ 1kpc would be found. At this latter distance, PAH features could survive the X-rays from the quasar nucleus and so the presence of these features would no longer present a difficulty for a model with AGN heating (e.g. Veilleux et al. 2009). This revised model would still retain the main feature of the Hill & Shanks (2011a) model i.e. that AGN are, in the main, responsible for both the sub-mm and X-ray backgrounds.
The fainter MIR luminosities of SMGs could still be consistent with dust heating being more due to star-formation if their low MIR luminosity simply indicated they were more like galaxies than AGN. However, the SMG bolometric luminosity still reaches the quasar level when the cold dust component is included so it seems more natural if they were AGN dominated.
We shall see in Paper II that the size of the ALMA cold dust sources here are ≈ 1kpc, consistent with the prediction from the AGN heated model. Also, at these small sizes we shall find that the SMGs are closer to the SFR surface brightness Eddington ratio compared to the AGN Eddington ratio.

CONCLUSIONS
We have investigated the SED's of 12 sub-mm sources in the WHDF, using multi-wavelength data ranging from the X-ray to the radio. Our approach has been to focus on a small but complete sample of sub-mm sources observed with data of the highest quality. This is particularly true in the sub-mm where our ALMA exposures on seven targets have 0. 095 resolution combined with individual ≈ 0.5 hr exposures. We find that: 1) From an AGN versus star-forming galaxy SED fitting comparison and/or from the presence of an X-ray detection, 7/12 sub-mm sources are identified as quasars, 1/12 is identified as a low redshift spiral galaxy, 3/12 show no preference between AGN and star-forming templates, leaving 1/12 with no optical/IR/X-ray counterpart identified. Note that 2 of the 7 quasar sub-mm sources have previous optical spectra that identify them as quasars that also show absorbed X-ray spectra (Vallbe Mumbru 2004;Bielby et al. 2012) and that a further 3 of the 7 sources show X-ray detections at fainter levels, now positively identifying 5 out of these 7 as quasars. We conclude that most of our SMG SEDs can be as easily fitted by an obscured AGN as an obscured star-forming galaxy with about half now positively identified by X-rays as obscured quasars. We re-iterate that, as shown by e.g. Dudzevičiūtė et al. (2020), good star-forming fits can likely be found for these SMGs. Our only suggestion is that AGN models are frequently found to be as good fits in simple model comparisons.
2) 10 out of 12 sub-mm sources show MIR colours that satisfy the [3.6] − [4.5] > 0.4 quasar selection criteria of Stern et al. (2012), confirming the result of Dudzevičiūtė et al. (2020). However, since > 2 galaxies can also occupy these MIR regions this should again only be regarded as a consistency check rather than a proof that they are AGN.
3) The SED fits for the sub-mm sources identified as AGN imply the ranges 0.5 < < 4.5 for redshifts, 0 < < 2.5 mag for dust absorption, and 10 < < 50K for the dust temperatures. We note that the dust absorption implied for the two quasars with wellmeasured X-ray absorption is an order of magnitude higher based on their HI column, assuming Galactic gas-dust ratios than indicated by SED fitting. This suggests that the dust absorbing the optical light either does not have Galactic gas-dust ratios or is not co-located with the neutral hydrogen gas. Dust masses obtained from the SED fits are in the range 1 − 5 × 10 8 M . 4) We find that the MIR brightness of sub-mm sources are typically a factor of ≈ 10 below those of X-ray quasars although the bolometric luminosities of both populations are similar with the increased sub-mm emission compensating for decreased X-ray and optical emission. One explanation is that brighter quasars have less cold dust and more hot dust.
In future papers we shall study the physical size of these sub-mm sources, including whether their sub-mm surface brightnesses are more likely to be explained by AGN or star-forming galaxies. We shall also compare these results to those for luminous quasars at high redshift ( > 6).
(representing its member states), NSF (USA) and NINS (Japan), together with NRC (Canada), MOST and ASIAA (Taiwan), and KASI (Republic of Korea), in cooperation with the Republic of Chile. The Joint ALMA Observatory is operated by ESO, AUI/NRAO and NAOJ. We thank an anonymous referee for their very useful comments that have improved the quality of this paper.

DATA AVAILABILITY
The catalogue data underlying this article are available in the article and Appendix A. The imaging data underlying this article will be shared on reasonable request to the corresponding author.

APPENDIX A: WHDF FLUX ERRORS, COORDINATES AND MAGNITUDES
Here we present further details of the WHDF data as used in the article. Table A1 supplies the WHDF flux errors appropriate for the fluxes already presented in Table 1 in the main body of the text. Tables A2 and A3 contains the RA and Declination coordinates for each ALMA counterpart or close companion (if any). Optical data from WHDF and HST are given along with Chandra X-ray and Spitzer 3.6, 4.5 m fluxes. Table A3 presents the equivalent data for the sources with only LABOCA data. Finally, Table A4 presents HeLMS FIR and VLA 8.4GHz radio data for all sources detected in these bands. This paper has been typeset from a T E X/L A T E X file prepared by the author.

Name
RA(J2000) Dec r Type u-r b-r r-i r-z r-h r-k 3.6 m 4.  (2) gives coordinates of any X-ray source detected in this paper and then the fluxes in the respective 0.5-1.2 keV, 1.2-2.0 keV and 2.0-7.0 keV bands in ergs cm −2 s −1 . Brackets mean the X-ray detection includes zero at 90% confidence. Row (3) gives the WHDF band total magnitude and aperture colours where available and as indicated at the top line of the table. WHDF coordinates are shown after the addition of the +0. 49 and −0. 35 offsets required to correct them to the SDSS/ALMA/HST/VLA coordinate system. Row (4) provides the WHDF band coordinate if object detected at . Coordinates are shown after +0. 10 and −0. 38 corrections to SDSS/ALMA/HST/VLA system. Row (5) indicates the detection of an HST band source, either the sub-mm counterpart or companion as indicated. Row (6) gives the SPIES [3.6] and [4.5] m coordinates and fluxes in mJy when available. All magnitudes are in the Vega system.

Name
RA(J2000) Dec Note/ X/ r X/Type X/ u-r b-r r-i r-z r-h r-k 3.6 m 4.  (2) gives coordinates of any X-ray source detected in this paper and then the fluxes in the respective 0.5-1.2 keV, 1.2-2.0 keV and 2.0-7.0 keV bands in ergs cm −2 s −1 . Brackets mean the X-ray detection includes zero at 90% confidence. Row (3) gives the WHDF band magnitude and aperture colours where available and as indicated at the top line of the table. WHDF coordinates that apply to both sources and images are shown after the addition of the +0. 49 and −0. 35 offsets required to correct them to the SDSS/ALMA/HST/VLA coordinate system. Row (4) provides the WHDF band coordinate corrected by +0. 15 in RA and −0. 37 in Dec to the SDSS/ALMA/HST/VLA system, if object detected at . Row (5) gives the SPIES [3.6] and [4.5] m coordinates and fluxes in mJy when available. All magnitudes are in the Vega system. For LAB-07 three possible counterparts are given with our preferred candidate being LAB-07-3.  Table A4. ALMA/LABOCA source coordinates and HeLMS+VLA positions and fluxes. Note that EVLA-6-2 is regarded as a companion to LAB-12 rather than a counterpart.