{'fraction_non_alphanumeric': 0.038871552517181045, 'fraction_numerical': 0.021861866195277694, 'mean_word_length': 4.402982165480947, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
On the Recovery of the Star Formation History of the LMC from the VISTA Survey of the Magellanic System

The VISTA near infrared survey of the Magellanic System (VMC) will provide deep YJKs photometry reaching stars in the oldest turn-off point all over the Magellanic Clouds (MCs). As part of the preparation for the survey, we aim to access the accuracy in the Star Formation History (SFH) that can be expected from VMC data, in particular for the LMC. To this aim, we first simulate VMC images containing not only the LMC stellar populations but also the foreground MW stars and background galaxies. We perform aperture photometry over these simulated images, access the expected levels of photometric errors and incompleteness, and apply the classical technique of SFH-recovery based on the reconstruction of colour-magnitude diagrams (CMD) via the minimization of a chi-squared-like statistics. We then evaluate the expected errors in the recovered star formation rate as a function of stellar age, SFR(t), starting from models with a known Age--Metallicity Relation (AMR). It turns out that, for a given sky area, the random errors for ages older than ~0.4 Gyr seem to be independent of the crowding. For a spatial resolution of ~0.1 sqdeg, the random errors in SFR(t) will be below 20% for this wide range of ages. On the other hand, due to the smaller stellar statistics for stars younger than ~0.4 Gyr, the outer LMC regions will require larger areas to achieve the same level of accuracy in the SFR(t). If we consider the AMR as unknown, the SFH-recovery algorithm is able to accurately recover the input AMR, at the price of an increase of random errors in the SFR(t) by a factor of about 2.5. Experiments of SFH-recovery performed for varying distance modulus and reddening indicate that the propagation of the errors in these parameters in the SFR(t) implies systematic errors below 30%.


Introduction
Determining the star formation histories (SFH) of the Magellanic Clouds (MC) is one of the most obvious goals in the study of nearby galaxies, for a series of reasons. First, this SFH does likely keep record of the past interactions between both Clouds and the Milky Way (Olsen 1999;Holtzman et al. 1999;Smecker-Hane et al. 2002;, which are still to be properly unveiled (Kallivayalil et al. 2006b,a;Besla et al. 2007; Piatek et al. 2008). Detailed SFH studies may also provide unvaluable hints on how star formation is trig-the complex SFH, and also partially hidden by the presence of variable and patchy extinction across the MCs. Unveiling this complex SFH may help in calibrating stellar propertieslike luminosities, lifetimes, periods, chemical types, etc. -as a function of age and metallicity.
In the last two decades, many authors demonstrated that recovering the SFH of the MC from optical photometry is indeed feasible and well worth of the effort. Such works are, usually, based either on deep Hubble Space Telescope (HST) photometry reaching the oldest main sequence turn-off for small MC areas (e.g. Gallagher et al. 1996;Holtzman et al. 1999;Olsen 1999;Elson et al. 1997;Smecker-Hane et al. 2002;Ardeberg et al. 1997;Dolphin et al. 2001;Javiel et al. 2005), or on relatively shallow ground-based photometry covering larger areas over the MCs (Stappers et al. 1997;Gardiner & Hatzidimitriou 1992;Harris & Zaritsky 2001, 2004. Only in very few cases (e.g. Gallart et al. 2004;Noël et al. 2007) have the ground-based optical photometry been deep enough to reach the oldest main sequence turn-offs.
The VISTA Survey of the Magellanic System 1 (VMC, see Cioni et al. 2007, Cioni et al., in preparation) is an ESO public survey project which will provide, in the next 5 years, critical near-infrared data aimed -among other goals -to improve upon present-day SFH determinations. This will hopefully open the way to a more complete understanding of how star formation relates to the dynamical processes under way in the system, and to a more accurate calibration of stellar models and primary standard candles. Regarding the SFH, the key contributions of the VMC survey will be: (1) It will provide photometry reaching as deep as the oldest main sequence turnoff over the bulk of the MC system, as opposed to the tiny regions sampled by HST, and the limited area covered by most of the dedicated ground-based observations. (2) VMC will use the near-infrared Y JK s passbands, hopefully reducing the errors in the SFH-recovery due to variable extinction across the MCs.
On the other hand, the use of near-infrared instead of optical filters will bring along some complicating factors, like an higher degree of contamination of the MC photometry by foreground stars and background galaxies, and the extremely high noise contributed by the sky, especially in the K s band.
Indeed, VMC will be the first near-infrared wide-area survey to provide data suitable for the classical methods of SFHrecovery 2 . With the new space-based near-infrared cameras (the HST/WFC3 IR channel, and JWST) and ground-based adaptive optics facilities, observations similar to VMC ones will likely be available for many nearby galaxies. VMC may become the precursor of detailed SFH-recovery in the opening window of near-infrared wavelengths. Demonstrating the feasibility of VMC goals, therefore, is of more general interest. 1 See http://www.vista.ac.uk and http://www.star.herts.ac.uk/∼mcioni/vmc/ for further information. 2 The previous attempts of Cioni et al. (2006a,b) based on I JK s data, were based on the shallow observations from DENIS and 2MASS, which are limited to the upper RGB and above. Consequently, they could access the general trends in the mean age and metallicity across the MCs, but not the detailed age-resolved SFH.
Another particularity of the VMC survey is that, once started, its data flow will be so huge that algorithms of analysis have better to be prepared in advance, in the form of semiautomated pipelines. Similar approaches have been/are being followed by some ambitious nearly-all-sky (SDSS, 2MASS), micro-lensing (MACHO, OGLE, EROS), and space astrometry (e.g. Hipparcos, GAIA) surveys.
In this paper, we describe part of the preparatory work for the derivation of the SFH from VMC data, which can be summarised in the following way: First we simulate the VMC images for the LMC (Sect. 2), where we later perform the photometry and artificial stars tests (Sect. 3) that allow us to access the expected levels of photometric errors, completeness, and crowding, and the contamination by foreground stars and background galaxies. We then proceed with many experiments of SFH-recovery (Sect. 4), evaluating the uncertainties in the derivation of the SFH as a function of basic quantities such as the stellar density over the LMC, the area included in the analysis, and the adopted values for the distance and reddening. Doing this, we are able to present the expected random and systematic errors in the space-resolved SFH. Such information may be useful to plan complementary observations and surveys of the LMC in the next few years. Further papers will present the perspectives for the Small Magellanic Cloud (SMC), as well as better explore the effect in the recovered SFH due to the uncertainties associated with the MC geometry, differential reddening, initial mass function, fraction of binaries, etc.

Simulating VMC data
Our initial goal is to obtain realistic simulations of VMC images, containing all of the objects that are known to be present towards the MCs and likely to be detectable within the survey depth limits. These objects are essentially stars belonging to the MW and the MCs, and background galaxies. Moreover, an essential component of the images is the high signal from the infrared sky. Each one of these components will be detailed below. Diffuse objects such as emission nebulae and star clusters will, for the moment, be ignored.

VISTA and VMC specifications
VMC will be performed with the VIRCAM camera mounted at the 4m VISTA telescope at ESO's Paranal Observatory in Chile. VIRCAM has 16 2048×2048 detectors which, with the image scale of 0.339 ′′ per pixel on average, cover a sky area of 0.037 deg 2 each. The basic mode of the observations will be to perform 6 exposures (paw-prints) with the subsequent construction of 1.0 × 1.5 deg 2 tiles. In the following, we will adopt the area of each detector (i.e. 0.037 deg 2 ) as the basic unit of our simulations.
The specifications of the VMC survey will be detailed in another paper (Cioni et al., in preparation). For our aims, suffice it to mention the following: Despite for the crowded fields, it is expected that the observations will be sky-noise dominated. The mean sky brightness at Cerro Paranal is of 17.2, 16.0, 13.0 mag arcsec −2 in Y JK s , respectively. The required seeing is of 1.0 ′′ (FWHM) in the Y band, being the most crowded regions observed in nights with seeing better than 0.8 ′′ . The targetted signal-to-noise ratio (SNR) is equal to 10 at magnitudes of 21.9, 21.4, 20.3 mag respectively. The photometric zero-points in our simulations were fixed via the VISTA exposure time calculator, so as to be consistent with these values. Considering these survey limits, in our simulations we include all objects brighter than K s = 22.5, which at the LMC distance correspond to a stellar mass of ∼ 0.8 M ⊙ in the main sequence turn-off.
VMC tiles will cover most of the Magellanic System, summing to a total area of 184 deg 2 (see Cioni et al. 2007, Cioni et al., in preparation, for details). Fig. 1 shows a histogram of the total area to be observed as a function of the density of upper RGB stars, N RGB , which is defined as the number of 2MASS stars inside a box in the K s vs. J − K s CMD (0.60 ≤ J − K s ≤ 1.20 and 12.00 ≤ K s ≤ 14.00 for the LMC and 12.30 ≤ K s ≤ 14.30 for the SMC), for each unit area of 0.05 deg 2 . Notice the higher mean and maximum stellar densities of the LMC, as compared to the SMC. The stellar densities vary over an interval of about 2.5 dex.

Stars in the UKIDSS photometric system
Since VISTA is still being commissioned at the time of this writing, the throughputs of VISTA filters, camera, and telescope are still not available. It is however clear that the VISTA photometric system will be very similar to the UKIDSS one, with the differences being mainly in the higher performance of VISTA, and in the fact that VISTA will use a K-short filter (K s ) similar to the 2MASS one. Marigo et al. (2008) isochrones in the UKIDSS photometric system. The figure shows the absolute (M K , Y −K) CMD as well as the apparent (K, Y −K) one for a typical distance to the LMC. Stellar masses and isochrone ages and metallicities are also indicated in the figure.

Fig. 2. A series of
Given the present situation, we have so far used the UKIDSS system as a surrogate of the future VISTA one. Tests using the preliminary VISTA filter curves (Jim Emerson, private communication) indicate very small differences in the synthetic photometry, typically smaller than 0.02 mag, between VISTA and UKIDSS. 3 Stellar isochrones in the UKIDSS system have been recently provided by Marigo et al. (2008) 4 . The conversion to the UKIDSS system takes into account not only the photospheric emission from stars, but also the reprocessing of their radiation by dusty shells in mass-losing stars, as described in Marigo et al. (2008). The filter transmission curves and zeropoint definitions come from Hewett et al. (2006). The stellar models in use are composed of Girardi et al. (2000) tracks for low-and intermediate-mass stars, replacing the thermally pulsing asymptotic giant branch (AGB) evolution with the Marigo & Girardi (2007) ones. In this paper, these models are further complemented with white and brown dwarfs as described in Girardi et al. (2005, also Zabot et al., in preparation), and with the Bertelli et al. (1994) isochrones for masses higher than 7 M ⊙ . Fig. 2 presents some of the Marigo et al. (2008) isochrones in the M K vs. Y −K diagram, for a wide range in age and metallicity. As can be readily noticed, the 4 Kerber et al.: SFH Recovery of the LMC from VMC Survey isochrones contain the vast majority of the single objects that can be prominent in the near-infrared observations of the LMC, going from the lower Main-Sequence (MS) stars, up to the brightest AGB stars and red supergiants. The stellar masses in the MS and the apparent magnitude for a typical LMC distance, (m− M) 0 = 18.50 (Clementini et al. 2003;Alves 2004;Schaefer 2008) are also indicated in this figure. We recall that our models contain, in addition, the very-low mass stars, brown dwarfs and white dwarfs, which are important in the description of the foreground MW population (Marigo et al. 2003).
The interstellar extinction coefficients adopted in this work do also follow from Marigo et al. (2008): They have been derived from synthetic photometry applied to a G2V star extincted with Cardelli et al. (1989) extinction curve. Although the approach is not the most accurate one (see Girardi et al. 2008), it is appropriate to the conditions of moderate reddening (E B−V < ∼ 0.2 mag) typical of the Magellanic Clouds.
The simulation of the input photometric catalogues and the generation of artificial images are described in the next subsections. In brief, the input catalogues for the LMC (Sect. 2.3) and the foreground MW stars (Sect. 2.4) come from the predictions made with the TRILEGAL code (Girardi et al. 2005), that simulates the photometry of resolved stellar populations following a given distribution of initial masses, ages, metallicities, reddenings and distances. The catalogues of background galaxies (Sect. 2.5) are randomly drawn from UKIDSS (Lawrence et al. 2007). The simulation of images is performed with the DAOPHOT and ARTDATA packages in IRAF 5 (Sect. 2.6), always respecting the photometric calibration and expected image quality required by the VMC survey.

The LMC stars
The stellar populations for the LMC are simulated as an "additional object" inside the TRILEGAL code (Girardi et al. 2005), where the input parameters for a field are: -the star formation rate as a function of stellar age, SFR(t); -the stellar AMR, Z(t) or [M/H](t); -the total stellar mass, M tot,LMC ; -the distance modulus, (m− M) 0 ; -the reddening, E B−V = 3.1 A V ; -the Initial Mass Function (IMF), ψ(M i ); -the fraction of detached unresolved binaries, f bin .
As commented before, for convenience we are simulating an area of 0.037 deg 2 , equivalent to a 2048 × 2048 VIRCAM detector. The value of M tot,LMC is suitably chosen such as to generate the total number of RGB stars observed by 2MASS, N RGB , inside this same area.
In the LMC simulations presented in this paper, we adopt an input AMR consistent with the one given by stellar clusters (Olszewski et al. 1991;Mackey & Gilmore 2003;Grocholski et al. 2006;Kerber et al. 2007) and field stars (Cole et al. 2005;Carrera et al. 2008), together with a constant SFR(t). Since the SFR(t) in the LMC is clearly spatial dependent (Holtzman et al. 1999;Smecker-Hane et al. 2002;Javiel et al. 2005), the assumption of a constant SFR(t) shall be considered as just a way to ensure a uniform treatment for all stellar populations over the LMC.
In terms of distance we are initially using the canonical value of (m− M) 0 = 18.50 (Clementini et al. 2003;Alves 2004;Schaefer 2008) also adopted by the HST Key Project to measure the Hubble constant (Freedman et al. 2001), whereas for the reddening we are assuming a value of E B−V = 0.07, typical for the extinction maps from Schlegel et al. (1998). For real VMC images, these two parameters are expected to be free parameters, since the LMC presents disk-like geometries with a significant inclination (∼ 30-40 deg) (van der Marel & Cioni 2001;van der Marel et al. 2002;Nikolaev et al. 2004) and nonuniform extinction Subramaniam 2005;Imara & Blitz 2007).
Finally the assumed values for the remaining inputs are: the Chabrier (2001) lognormal IMF 6 , and f bin = 30 % with a constant mass ratio distribution for m 2 /m 1 > 0.7 7 . There are no strong reasons to expect significant deviations for these choices, especially for the IMF since we are dealing with stars with masses approximately between 0.8 and 12.0 M ⊙ where the IMF slope seems to be universal and similar to the Salpeter one (Kroupa 2001(Kroupa , 2002. Concerning the fraction of binaries, our choice is consistent with the values found for the stellar clusters in the LMC (Elson et al. 1998;Hu et al. 2008). For the moment, these will be considered as fixed inputs. Further papers will use simulations in order to quantify the systematic errors in the recovered SFH introduced by the uncertainties related to these choices.

The Milky Way foreground
The MW foreground stars are simulated using the TRILEGAL code as described in Girardi et al. (2005). Towards the MCs, the simulated stars are located both in a disk which scale-height increasing with age, and in a oblate halo component. Diffuse interstellar reddening within 100 pc of the Galactic Plane is also considered, although it affects little the near-infrared photometry.
In Girardi et al. (2005), it has been shown that for offplane line-of-sights, TRILEGAL predicts star counts accurate to within about 15% over a wide range of magnitudes and down to J ≃ 20.5 and K ≃ 18.5. This accuracy is confirmed by the K < ∼ 20.5 observations of Gullieuszik et al. (2008) for a field next to the Leo II dwarf spheroidal galaxy. Moreover, Marigo et al. (2003) shows that TRILEGAL describes very well the position of the three "vertical fingers" observed in 2MASS K vs. J − K s diagrams. Similarly-comforting compar-isons with UKIDSS data (including the Y band) are presented in Sect. 3.2 below.
Although predicting star counts with an accuracy of about 15% may be good enough for our initial purposes, we are working to further improve this accuracy: In short, we are applying the minimisation algorithm described in Vanhollebeke et al. (2008) -which was successfully applied to the derivation of Bulge parameters using data for inner MW regions -to recalibrate the TRILEGAL disk and halo models. It is likely that before VMC starts, foreground star counts will be predicted with accuracies of the order of 5%.

The background galaxies
In order to simulate the population of galaxies background to the MCs, we make use of the large catalogues of real galaxies obtained by the UKIDSS Ultra-Deep (UDS; Foucaud et al. 2007) and Large Area Surveys (LAS; Warren et al. 2007), from their Data Release 3 (December 2007). The LAS includes data for an area of 4000 deg 2 down to K = 18.4, for Y JK filters, whereas the UDS includes an area of 0.77 deg 2 observed down to K ∼ 23, but only for JHK passbands.
In our input catalogue for each simulation, we include the number of UKIDSS galaxies expected for our total simulated area. More precisely, we randomly pick up from the UDS catalogue, a fraction of galaxies given by the ratio between the areas covered by UDS and by our image simulation. From the catalogue, we extract their J and K magnitudes, and morphological parameters (position angle, size, and axial ratio). In this way, our simulations respect the observed K-band luminosity function of galaxies, and their J−K colour distribution, down to faint magnitudes. The Y-band magnitudes, instead, have been assigned in the following way: we take the J − K colour of each galaxy in the UDS, and then randomly select a galaxy from the LAS which has the most similar J − K (within 0.2 mag), and take its Y − J. This means that the Y − J vs. J − K relation from LAS is being extrapolated down to deeper magnitudes 8 .

Simulating images
Once defined the input catalogues for stars and galaxies we simulated the images inside IRAF, in accordance with the VISTA and VMC specifications (see Sect.2.1). The basic sequence of steps (and the IRAF task) performed for a given filter is the following: 1. Definition of the image size (rtextimage) and introduction of the sky brightness and noise (mknoise); 2. simulation of a Gaussian stellar profile (gauss) respecting the expected seeing for an image of a photometric calibrated (using the VISTA ETC v1.3) delta function with a known number of electrons; 3. addition of the LMC and MW stars in the sky images (addstars) following the previous calibrated Gaussian stel-

Fig.
3. An image simulation for the area next to the star cluster NGC1805 (α = 5.03 h, δ = −66.07 • ), for a single 2048 × 2048 array detector of VIRCAM. This is a falsecolor image where blue-green-red colours were associated to the Y JK filters, respectively. The location corresponds to a log N RGB ∼ 2.00 in Fig. 1. The detector area corresponds to 0.0372 deg 2 (11.6 × 11.6 arcmin) in the sky, which is about 1/40 of a single VIRCAM tile, and 1/5000 of the total VMC survey area. The two small panels at the bottom present details of the simulated stars, stellar clusters and galaxies for 2.9 × 2.9 arcmin and 0.7 × 0.7 arcmin areas. At the LMC distance the top panel corresponds approximately to a box of 175 × 175 pc, whereas the bottom panels correspond to 44×44 pc and 11×11 pc, respectively (1 ′′ ∼ 0.25 pc).
lar profile with random poissonian errors in the number of electrons; 4. addition of galaxies (mkobject) in the previous image respecting all information concerning the morphological type, position angle, size and axial ratio.
To assure a uniform distribution of the objects in the image, stars and galaxies are always added at random positions. Fig. 3 shows an example of image simulation for a typical field in the LMC disk. The false-colour plot evidences the colour and morphologic differences between stars and background galaxies -with the latter being significantly redder than the former. In the same image, we have inserted two populous stellar clusters typical for the LMC with different ages, masses and concentration of stars (following a King's profile), just to illustrate our capacity to simulate also this kind of stellar object.

Aperture and PSF photometry
The IRAF DAOPHOT package was used to detect and to perform aperture photometry in our simulated images. Candidate stars were detected using daofind, with a peak intensity threshold for detection set to 4 σ sky , where σ sky corresponds to the rms fluctuation in the sky counts. The aperture photometry was carried out running the task phot for an aperture radius of 3 pix (∼ 1.0 ′′ ).
The photometric errors and completeness curves that come from this aperture photometry in our simulated LMC images can be seen in Fig. 4. The photometric errors in this case are estimated using the differences between the input and output magnitudes; more specifically, for each small magnitude bin we compute the half-width of the error distribution, with respect to the median, that comprises 70% of the recovered stars. The completeness instead is simply defined as the ratio between total number of input stars, and those recovered by the photometry package. Fig. 4 presents the results for different simulations covering a wide range of density of field stars in the LMC, from the outer disk regions to the centre regions in the bar (see Fig.1). Notice that in these simulations we are following the requirement that the most central and crowded regions (log N RGB ≥ 2.50) will be observed under excellent seeing conditions only.
It can be noticed that the VMC expected magnitudes at SNR=10 for isolated stars (Y = 21.9, J = 21.4, K = 20.3) is well recovered in the simulations for the lowest density regions, attesting the correct photometric calibration of our simulated images. For these regions the 50% completeness level is reached at Y ∼ 22.5, J ∼ 22.2 and K ∼ 21.8.
Crowding significantly affects in the quality of the aperture photometry, making the stars measured in central LMC regions to appear significantly brighter, and with larger photometric errors, than in the outermost LMC regions. As shown in Fig. 4, crowding clearly starts to dominate the noise for fields with log N RGB > ∼ 2.00 that correspond to about 20% (7%) of the total area covered in the LMC (SMC) (see Fig. 1). Therefore, PSF photometry is expected to be performed whenever crowding will prevent a good aperture photometry over VMC images. The significant improvements that can be reach by a PSF photometry are also illustrated by the thick black lines in Fig. 4. These results correspond to a PSF photometry applied to the LMC centre (log N RGB = 2.90), where the PSF fitting and the photometry were done using the IRAF tasks psf and allstar. Figure 5 shows an example of CMD obtained from the aperture photometry in a simulated field with an intermediate level of density in the LMC. This figure reveals the expected CMD features -and the wealth of information -that will become available thanks to the VMC survey: well evi-

Fig. 5.
Example of (K, Y −K) CMD from aperture photometry in a simulated image for the VMC survey. The choices in the parameters represent a field of ∼ 0.1 deg 2 with ∼ 10 5 stars (log(N RGB ) = 2.00) following a constant SFR(t) and a AMR typical for the LMC clusters (see details in the text). The colours represent the density of points in a logarithmic scale. The information about approximated stellar masses, ages and metallicities can be obtained from Fig. 2. dent are the AGB, red supergiants, RGB, red clump (RC), Sub-Giant Branch (SGB) as well as the MS, from the brightest and youngest stars down to the oldest turn-off point. In comparison, the present-day near-infrared surveys of the MCs are complete only for the most evolved stars -excluding those in the most crowded regions, and those highly extincted by circumstellar dust. DENIS and 2MASS, for instance, are limited to K s < ∼ 14, revealing the red supergiants, AGB and upper RGB, and including just a tiny fraction of the upper MS (Nikolaev & Weinberg 2000;Cioni et al. 2007). IRSF (Kato et al. 2007) extends this range down to K s < ∼ 16.6, which is deep enough to sample the RC and RGB bump, but not the SGB and the low-mass MS.

Comparison with UKIDSS data
Since the present work depends on simulations, it is important to check if they reproduce the basic characteristics of real data already obtained under similar conditions. UKIDSS represents the most similar data to VMC to be available for the moment. Therefore, in the following we will compare a simulated UKIDSS field with the real one.
For this exercise, we take the 0.21 deg 2 field towards Galactic coordinates ℓ = −220 • , b = 40 • , which due to its similar distance from the Galactic Plane as the MCs, offers a good opportunity to test the expected levels of Milky Way foreground, and the galaxy background.
We have taken the original image from the UKIDSS archive, and performed aperture photometry with both DAOPHOT (Stetson 1987) ad SExtractor (Bertin & Arnouts 1996). A image for the same area has been simulated using UKIDSS specifications (pixel scale, SNR, etc.) and submitted to the same kind of catalogue extraction. Fig. 6 shows the results, comparing the K vs. Y −K diagrams for the UKIDSS observed (left panel) and simulated (right panel) fields, for both stars (blue points) and galaxies (red points). Stars and galaxies were separated using the SExtractor Stellarity parameter st. We adopted st > 0.85 for stars, and st ≤ 0.85 for galaxies.
Both DAOPHOT ad SExtractor aperture photometries turned out to be remarkably consistent with the ones provided by the Cambridge Astronomical Survey Unit (CASU) data reduction pipeline. This is very comforting since the CASU will adopt the same data reduction pipeline to the future VISTA data. The histograms at the right and top of the CMD panels show the object number count distribution in both colour and magnitude. As can be appreciated, our simulated objects distribute very similarly in colour and magnitude as the observed ones. The discrepancies are limited to a few aspects of the simulations, for instance the peak in the colour distribution at Y −K ∼ 1.3 is clearly narrower in the models than in the simulations. This peak is caused by thin disk dwarfs less massive than 0.4 M ⊙ (Marigo et al. 2003), and its narrowness in the models could be indicating that TRILEGAL underestimates the colour spread of these very-low mass stars.
The most important point of the model-data comparison of Fig. 6, however, is that the simulations reasonably reproduce the numbers (with errors limited to ∼ 20%), magnitudes and colours of the observed objects. This gives us confidence that our MC simulations contain the correct contribution from foreground Milky Way stars and background galaxies.

Basics
The basic assumption behind any method to recover the SFH from a composite stellar population (CSP) is that it can be considered as a simply sum of its constituent parts, which are ultimately simple stellar populations (SSPs) or combinations of them. Therefore determining the SFH of any CSPlike the field stars in a galaxy -means to recover the relative weight of each SSP. The modern stellar population analysis in the late 80's Ferraro et al. 1989) and in the early 90's (Tosi et al. 1991;Bertelli et al. 1992) -marked by the advent of the first CCD detectors -was done assuming parameterized SFH, which revealed the main trends in the SFH but was still limited by a small number of possible solutions. The techniques to recover the SFH from a resolved stellar population started to become more sophisticated with the works of Gallart et al. (1996b,a), but they were significantly improved by Aparicio et al. (1997) and Dolphin (1997), who developed for the first time statistical methods to recover nonparameterized SFH from the CMD of a CSP. In practice these Fig. 6. A comparison between the aperture photometry from UKIDSS image data (left) and the corresponding simulation (right), for a 0.21 deg 2 area towards ℓ = −220 • , b = 40 • . The photometry was performed using both DAOPHOT and SExtractor. The main panels show the CMD obtained combining DAOPHOT photometry with SExtractor star/galaxy classification (blue/red dots, respectively). The histograms show the total colour and magnitude distributions of stars and galaxies (blue and red lines, respectively). two works were the first to deal with a finite number of free independent components, obtained by adding the properties of SSPs inside small, but finite, age and metallicity bins. These "partial models" (Aparicio et al. 1997) are so computed for age and metallicity bins that should be small enough so that the SSP properties change just little inside them, and large enough so that the limited number of bins ensures reasonable CPU times for the SFH-recovery. Furthermore, being the partial models computed for the same and constant star formation rate inside each age bin, implied that they needed to be generated only once, saving a large amount of computational resources (Dolphin 2002).
Considering that a CMD is a distribution of points in a plane divided into N box boxes, these ideas can be expressed (Dolphin 2002) by where m i is the number of stars in the full model CMD for an CSP in the i th box, r j is the SFR for the j th partial model, and c i, j is the number of stars in the CMD for the j th partial model in the i th CMD box. Notice that the above equation is in fact written in terms of Hess diagrams since we are dealing with the number of stars in CMDs. So it means that the "observed" Hess diagram for a CSP can be described as a sum of independent synthetic Hess diagrams of partial models, being the coefficients r j the SFRs to be determined. Fig. 7, to be commented later, illustrate the generation of such synthetic Hess diagrams for the partial models of the LMC.
The classical approach to determine the set of r j s is to compute the differences in the number of stars in each CMD box between data and model, searching for a minimisation of a chi-squared-like statistics. This kind of approach was applied for the first time to recover the SFH of a real galaxy by Aparicio et al. (1997), and has been successfully used in the analysis of the field stars in the dwarf galaxies in the Local Group (Gallart et al. 1999;Dolphin 2002;Dolphin et al. 2003;Skillman et al. 2003;Cole et al. 2007;Yuk & Lee 2007), including the MCs (Olsen 1999;Holtzman et al. 1999;Harris & Zaritsky 2001;Smecker-Hane et al. 2002;Javiel et al. 2005;Chiosi & Vallenari 2007;Noël et al. 2007). Although these works have in common the same basic idea of how to recover the SFH, there are clear variations in terms of the adopted statistics and strategy to divide the CMD in boxes (Gallart et al. 2005).
An interesting alternative to recover the SFH from the analysis of CMDs is offered by the maximum likelihood technique using a Bayesian approach (Tolstoy & Saha 1996;Hernandez et al. 1999Hernandez et al. , 2000Vergely et al. 2002). In this approach the basic idea is to establish for each observed star a probability to belong to a SSP (based on the expected number of stars from this SSP in the position of the observed star in the CMD). Doing it for all observed stars, one can recover the SFRs that maximises the likelihood between data and model. It is interesting to note that in the recent years there is an increasing number of papers applying this kind of technique for a wide range of problems, which include the determination of physical parameters of stellar Panel (c) is the Hess diagram for the sum of all partial models. Panels (d) and (e) show the input SFR(t) and AMR, respectively, the latter in comparison with LMC clusters (squares -data from Mackey & Gilmore 2003;Kerber et al. 2007;Grocholski et al. 2006Grocholski et al. , 2007. To avoid an extremely large size for this figure only 5% of all stars typically used (∼ 10 7 ) to build the partial models are shown in the top panels.
It is beyond the scope of the present work to discuss in depth the particularity of each aforementioned approach, but there are no strong reasons to believe that one can intrinsically recover a more reliable SFH than the other (Dolphin 2002;Gallart et al. 2005). So for a question of simplicity and coherence with the majority of the works devoted to the MCs, we adopted the classical minimisation of a chi-squared-like statistics technique to determine the expected errors in the SFH for the VMC data, using the framework of the StarFISH code (Harris & Zaritsky 2001, 2004, the χ 2 -like statistics defined by Dolphin (2002) assuming that stars into CMD boxes follow a Poisson-distributed data, and a uniform grid of boxes in the CMD.

StarFISH and TRILEGAL working together
The StarFISH code 9 has been developed by Harris & Zaritsky (2001) and successfully applied by    Harris (2007b) to recover SFHs for the MCs inside the context of the Magellanic Clouds Photometric Survey (Zaritsky et al. 1997, MCPS) 10 . This code, originally designed to analyse CMDs built with U BVI data from the MCPS, and using Padova isochrones (Girardi et al. 2000(Girardi et al. , 2002, offers the possibility of different choices for generating synthetic Hess diagrams (set of partial models, CMD binning and masks, combination of more than one CMD, etc.) and χ 2 -like statistics, being also sufficiently generic to be implemented for new stellar evolutionary models, photometric systems, etc.
As illustrated in Fig. 7, the TRILEGAL code can also simulate the synthetic Hess diagram for a set of partial models, with the advantage of easily generating them in the UKIDSS photometric system, allowing also a greater control of all input parameters involved (see Sect. 2.3). Therefore we decide to directly provide these Hess diagrams to StarFISH, using it as a platform to determine the SFRs for our VMC simulated data by means of a χ 2 -like statistics minimisation. The search of the best solution is done internally in StarFISH by the amoeba algorithm that uses a downhill strategy to find the minimum χ 2 -like statistics value.
An extra possibility offered by TRILEGAL is the construction of an additional partial model for the MW foreground 11 . Indeed, this is done by simulating the MW population towards the galactic coordinates under examination, for the same total observed area but averaging over many simulations so as to reduce the Poisson noise. This partial model is provided to StarFISH and used in the χ 2 -like statistics minimization together with those used to describe the MC population. With this procedure, the presence of the MW foreground is taken into account in the SFH determination, without appealing to the (often risky) procedures of statistical decontamination based on the observation of external control fields. To our knowledgement, this is the first time that such a procedure is adopted in SFHrecovery work. Notice that, once the MW foreground model is well calibrated, its corresponding r j could be set to a fixed value, instead of being included into the χ 2 -like statistics minimization. Figure 7 illustrates the generation of a complete set of partial models, covering ages from log(t/yr) = 8.00 to 10.15 (t from 0.10 to 14.13 Gyr) divided into 11 elements with a width of ∆ log t = 0.20 each, and following an AMR consistent with the LMC clusters (see the panel d, and Sect. 2.3). In this figure we have grouped the partial models in just 6 age ranges (plus the MW foreground one) just for a question of clarity. What is remarkable in the figure is the high degree of superposition of the different partial models over the RGB region of the CMD -except of course for the partial model corresponding to the MW foreground. The MS region of the CMD, instead, allows a good visual separation of the different populations over the entire age range, even after considering the effects of photometric errors and incompleteness. Fig. 9. Errors in the recovered SFR(t) in terms of the mean SFR(t) (top panel) and input SFR(t) (bottom panel). The input simulations correspond to a typical LMC disk region (log N RGB = 2.00) inside a single VIRCAM detector (∼ 0.037 deg 2 ). The central solid line corresponds to the median solution found over 100 realizations of the same simulation, whereas the error bars correspond to a confidence level of 70%.

Results: Input vs. output SFR(t)
An example of SFH-recovery is presented in the Hess diagrams of Fig. 8. The input simulation (left panel) was generated for a constant SFR(t), for an area equivalent to 1 VIRCAM detector (0.037 deg 2 ) inside a region with a stellar density typical for the LMC disk (log N RGB = 2.00, that produces a total number of stars of N stars ∼ 5 × 10 4 ). For this simulation, StarFISH fits the solution represented in the middle panel. Not surprisingly, the data-model χ 2 -like statistics residuals (right panel) are remarkably evenly distributed across the Hess diagram. Figure 9 presents the median of recovered SFR(t), and its error, obtained after performing 100 realizations of the same simulation. As expected, the median SFR(t) over this 100 realizations reproduces remarkably well the input one, with no indication of systematic errors in the process of SFH-recovery 12 . The error bars correspond to a confidence level of 70%, which means that 70% of all individual realizations are confined within these error bars. Error bars are almost symmetrical with respect to the expected SFR(t). Furthermore, errors are typically below 0.4 in units of mean SFR(t) (top panel), which means uncertainties below 40% (bottom panel) for almost all ages. The only exception is the youngest age bin which presents errors in the SFR that are about two times larger than those for the intermediate-age stellar populations. There are a many factors that can affect the accuracy of a recovered SFR(t). Among them, the most important are: 1. the quality of the data in terms of stellar statistics and photometry, that depends in principle (for the same photometric conditions of seeing, exposure times, calibration, etc.) on the density of the field and its covered area in the sky; 2. the uncertainties in the models themselves, that come from the possible errors in the adopted input parameters (distance, reddening, IMF, f bin , AMR, etc.), in the stellar evolutionary models, and in the imperfect reproduction of photometric errors and completeness; 3. the incorrect representation of the contamination from other sources, like foreground MW stars, stars from LMC star clusters, and background galaxies; 4. the non-uniform properties of the analysed field, like differential reddening or depth in distance.
Notice that the first factor affects the generation of observed Hess diagrams, while the synthetic Hess diagrams may become unrealistic due to the other factors. Furthermore, they produce different types of errors: whereas the first preferentially rules the random errors, the second is the main source of the systematic errors. A discussion on errors is addressed below.

Random errors for a known AMR
In order to estimate the expected random errors in the SFR(t) for the LMC we performed controlled experiments similar to the one shown in Fig. 9, but covering a wide range of conditions in regard to the stellar statistics and crowding. Fig. 10 presents the results for four different levels of density, from the outer LMC disk (top-left panel) to the LMC centre (bottomright panel), for a number of stars (or area) varying by a factor of 8. As can be seen, these two factors dramatically change the level of accuracy than can be achieved in the recovered SFR(t): an increase in the number of stars reduces the errors whereas an increase in crowding for a fixed number of stars acts in the opposite way. . The thick black solid line corresponds to the median solution found using 4 × 10 5 stars, whereas the error bars correspond to a confidence level of 70%. The thin red lines outline the same confidence level for a decreasing number of stars: 2 × 10 5 , 10 5 , 5 × 10 4 stars.
The errors in the recovered SFR(t) as a function of the covered area, for all simulated density levels, are shown in Fig. 11 for partial models of four different ages, from young (top-left panel) to old ones (bottom-right panel). Here, a very interesting result can be seen: for stars older than log(t/yr) ∼ 8.60 (t ∼ 0.4 Gyr) the curves for different levels of density are almost superposed, revealing that for a fixed area the accuracy in the recovered SFR(t) is roughly independent of the level of Fig. 11. Errors in the recovered SFR(t) as a function of covered area and density of stars (different lines) for 4 partial models of different ages (different panels).
crowding. It can be understood as a counterbalanced effect between the loss of stars due to a decrease in completeness, and the gain of stars due to an increase in density. Therefore, it seems that the SFR(t) for this wide range in age can be determined with random errors below 20% if an area of 0.10 deg 2 is used. Increasing the area by a factor of four means that the level of uncertainty drops to below 10%.
On the other hand, for partial models younger than log(t/yr) ∼ 8.60 (t ∼ 0.4 Gyr) a fixed area does not imply a constant level of accuracy in the SFR(t), being the errors significantly greater in the less dense regions. Since stars in this small age range are mainly identified in the upper main sequence at 18 < ∼ K < ∼ 20, and in the core-helium burning phases at 14 < ∼ K < ∼ 18 (see Fig. 7), this effect can be understood by the fact that for these brighter stars the increase in stellar density is not followed by a significant decrease in completeness. Indeed, Fig. 4 indicates the completeness is in general higher than 60% and 90%, for 18 < ∼ K < ∼ 20 and 14 < ∼ K < ∼ 18 stars, respectively, for the entire range of stellar densities of the LMC. In this situation, what determines the accuracy for a fixed area is simply the number of observed stars, which is proportional to the density. In particular, our simulations reveal the lack of stellar statistics in the outermost and less dense LMC regions, which require great areas to reach a statistically significant number of young stars. For instance, a level of uncertainty 20 % in the recovered young SFR(t) is obtained for an area ∼ 10 times larger (∼ 1 deg 2 ) in the periphery of the LMC than in more central regions.
The errors in the SFR(t) were also compared with those expected by the Poisson statistics in the number of observed stars for each partial model, as presented by Fig. 12. This figure reveals that the errors in the SFR(t) can be roughly understood as a propagation of the Poisson errors by a factor ∼ 10. This explains why errors are smaller for the older ages, despite the fact that the different partial models are -due to the adoption of a logarithmic age scale -roughly uniformly separated in the CMD.

Random errors for an unknown AMR
In our previous discussion we have naively assumed that the AMR of the LMC is well known, by using a set of partial models which strictly follows the AMR used in the simulations. The real situation is much more complicated. Not only the AMR is not well established, but also it may present significant spreads (for a single age), and vary from place to place over the LMC disk. In order to face this situation, it is advisable to allow a more flexible approach for the SFH-recovery, in which for every age bin we have different partial models covering a significant range in metallicity.
We adopt the scheme illustrated in the top panel of Fig. 13, that is: for every age bin, we build partial models of 5 different metallicities, centered at the [M/H] value given by the reference AMR, and separated by steps of 0.2 dex. This gives a total of 56 partial models, and drastically increases the CPU time (by a factor of ∼ 100) needed by StarFISH to converge towards the χ 2 -like statistics minimum. Once the minimum is found, for each age bin we compute the r j (t)-added SFR(t) and the r j (t)weighted average [M/H](t) over the five partial models with Fig. 14. Errors in the recovered SFR(t) in terms of the mean SFR(t) (top panels) and input SFR(t) (bottom panels), for a typical LMC disk region inside the area of 8 VIRCAM detector (0.25 deg 2 ). The left panel correspond to a SFH-recovery that uses partial models distributed over a single AMR, whereas the right one uses 5 partial models for each age bin. The central solid line corresponds to the median solution found over 100 realizations of the same simulation, whereas the error bars correspond to a confidence level of 70%. different levels of metallicity. After doing the same for 100 realizations of the input simulation, we derive the median and the confidence level of 70% (assumed as the error bar) for the output SFR(t) and [M/H](t). Figs. 13 and 14 illustrate the results for the case of a constant input SFR(t) and log N RGB = 2.00.
In the top panel of Fig. 13, the dots with error bars show the output AMR, which falls remarkably close to the input one (continuous line). The error bars are smaller than 0.1 dex at all ages. The bottom panel plots the relative errors in the derived [M/H](t), showing that they are slightly larger for populations of age log(t/yr) < 9.2. Anyway, the main result here is that the errors in [M/H](t) are always smaller than the 0.2 dex separation between the different partial models. Figure 14 instead compares, for the same simulation, the errors in the SFR(t) that result either considering (right panel) or not (left panel) the partial models with metallicity different from the reference AMR one. In other words, the left panel shows the SFR(t) that would be recovered if the AMR were exactly known in advance, whereas the right panel shows the SFR(t) for the cases in which the AMR is unknown -or, alternatively, affected by significant observational errors. It can be easily noticed that the SFR(t) is correctly recovered in both cases, although errors in the second case (right panel) are about 2 or 3 times larger than in the first case. Needless to say, the second situation is the more realistic one, and will likely be the one applied in the analysis of VMC data.

Systematic errors related to distance and reddening
Accessing all the systematic errors in the derived SFR(t) is beyond the scope of this paper. However, the errors associated with the variations in the distance and reddening are of particular interest here, since both quantities are expected to vary sensibly across the LMC, hence having the potential to affect the patterns in the spacially-resolved SFH. Fortunately, these errors are very easily accessed with our method, since we know exactly the (m− M) 0 and A V values of the simulations, as well as those assumed during the SFH-recovery.
The propagation of the uncertainties in the assumed distance modulus and reddening in the recovered SFR(t) was explored in a series of control experiments, in which a simulation performed with the canonical (m− M) 0 = 18.50 and E B−V = 0.07 was submitted to a series of SFH-recovery analyses covering a range of (m− M) 0 and E B−V . More specifically, (m− M) 0 was varied from 18.40 to 18.60, and E B−V from 0.04 to 0.1. The results of these tests can be seen in Fig. 15, which presents the effect of wrong choices in these parameters not only in the recovered SFR(t) (bottom panel) but also in the minimum value for the χ 2 -like statistics (top panels).
As expected, the absolute minimum value for the χ 2 -like statistics was found for the synthetic Hess diagrams with the right distance modulus and reddening. Based on the χ 2 -like statistics dispersion for 100 simulations we estimated that the errors in these parameters are about ∆(m− M) 0 = ±0.02 mag and ∆E B−V = ±0.01 mag. These errors also imply systematic Fig. 13. The top panel shows the distribution of metallicities of the partial models adopted in this work: The central solid line is the AMR adopted as a reference, and is used in all of our SFH-recovery experiments. At every age (or age bin), 4 additional partial models (along the dotted lines) can be defined and inserted in the SFH-recovery, then allowing us to access the AMR and its uncertainty (see text for details). The bottom panel shows the difference between the input and output AMRs for the case in which 5 partial models were adopted for each age bin. errors in the recovered SFR(t) of up to ∼ 30% (Fig. 15, bottom panel).
The above experiments clearly suggest us that the mean distance and reddening should be considered as free parameters in the analysis, and varied by a few 0.01 mag so that we can identify the best-fitting values of (m− M) 0 and E B−V together with the best-fitting SFH. This kind of procedure has been adopted by e.g. Holtzman et al. (1997) and Olsen (1999) in their study of small regions over the LMC, and it is also implemented in the MATCH SFH-recovery package by Dolphin (2002). Occasionally, one could also consider small spreads in both (m− M) 0 and E B−V and test whether they further improve the χ 2 -like statistics minimization. Once applied to the entire VMC area, the final result of this procedure will be independent maps of the geometry and reddening across the MC system, that can complement those obtained with other methods.

Concluding remarks
In this paper we have performed detailed simulations of the LMC images expected from the VMC survey, and analysed them in terms of the expected accuracy in determining the space-resolved SFH. Our main conclusions so far are the following: Fig. 15. The top panels show the minimum χ 2 -like statistics value as a function of distance modulus (blue) and reddening (green) adopted to build the synthetic Hess diagrams. The bottom panel illustrate the systematic variations that the errors in these two parameters cause in the recovered SFR(t) (continuous lines for an overestimation of (m − M) 0 and E B−V , dashed lines for an underestimation).
1. For a typical 0.10 deg 2 LMC field of median stellar density, the random errors in the recovered SFR(t) will be typically smaller than 20% for 0.2 dex-wide age bins. 2. For all ages larger than 0.4 Gyr, at increasing stellar densities the better statistics largely compensates the effects of increased photometric errors and decreased completeness, so that good-quality SFR(t) can be determined even for the most crowded regions in the LMC bar. The SFR(t) errors decrease roughly in proportion with the square of the total number of stars. The exception to this rule regards the youngest stars, which because of their brightness are less affected by incompleteness. In this latter case, however, the stellar statistics is intrinsically small and large areas are necessary to reach the same SFR(t) accuracy as for the intermediate-age and old LMC stars. 3. Although the AMR [M/H](t) can be recovered with accuracies better than 0.2 dex, the uncertainties in the AMR can significantly affect the quality of the derived SFR(t), increasing their errors by a factor of about 2.5. 4. The minimisation algorithms allow to identify the bestfitting reddening and distance with accuracies of the order of 0.02 mag in distance modulus, and 0.01 mag in E B−V .
All of the above trends were derived from analysis of small LMC areas, that we have considered to be homogeneous in all of their properties (AMR, distance and reddening). The errors were derived by varying each one of these parameters separately. The real situation will be, of course, much more complicated, with significant spatial variations of all of these quantities across the LMC. This consideration may lead us to suppose that errors here derived are underestimated. However, the above-mentioned parameters can be further constrained by simply taking into consideration additional data -for instance the available reddening maps, the limits on the relative distances provided by other independent distance indicators, the metallicity distributions of field stars, etc. -in our analysis. Moreover, our work indicates clearly how the random errors are reduced when we increase the area to be analysed. It is natural that, once the systematic errors are fully assessed, we will increase the area selected for the analysis, so that random errors become at least smaller than the systematic ones.
It is also worth mentioning that our present results were obtained using the Y −K colour only. VMC will also provide CMDs involving the J passband, and their use in the SFH analysis can only reduce the final errors.
Another factor to be considered, in the final analysis, is that for old ages the SFR(t) is expected to vary very smoothly across the LMC, as indicated for instance by Cioni et al. (2000) and Nikolaev & Weinberg (2000). This large-scale correlation in the old SFR(t) may be used as an additional constraint during the SFH-recovery, and may help to reduce the errors in the SFR(t) at all ages.
A forthcoming paper will discuss in more detail the expected accuracy over the complete VMC area, including the SMC, and how this accuracy depends on other variables and constraints which were not discussed in this work (binaries, depth in distance, reddening variations, IMF, etc.). Anyway, the present work already illustrates the excellent accuracy in the measurements of the space-resolved SFH, that will be made possible by VMC data. Moreover, it demonstrates that detailed SFH-recovery using deep near-infrared photometry is also feasible, as much it has always been for the case of visual observations.