{'fraction_non_alphanumeric': 0.03428938814873022, 'fraction_numerical': 0.026002786012787084, 'mean_word_length': 4.3830994039607765, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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}}
Luminosity functions of LMXBs in different stellar environments

Based on the archival data from the Chandra observations of nearby galaxies, we study different sub populations of low-mass X-ray binaries (LMXBs) - dynamically formed systems in globular clusters (GCs) and in the nucleus of M31 and (presumably primordial) X-ray binaries in the fields of galaxies. Our aim is to produce accurate luminosity distributions of X-ray binaries in different environments, suitable for quantitative comparison with each other and with the output of population synthesis calculations. Our sample includes seven nearby galaxies (M31, Maffei 1, Centaurus A,M81, NGC 3379, NGC 4697, and NGC 4278) and the Milky Way, which together provide relatively uniform coverage down to the luminosity limit of E35 erg/s. In total we have detected 185 LMXBs associated with GCs, 35 X-ray sources in the nucleus of M31, and 998 field sources of which ~ 365 are expected to be background AGN. We combine these data, taking special care to accurately account for X-ray and optical incompleteness corrections and the removal of the contamination from the cosmic X-ray background sources, to produce luminosity distributions of X-ray binaries in different environments to far greater accuracy than has been obtained previously. We found that luminosity distributions of GC and field LMXBs differ throughout the entire luminosity range, the fraction of faint (log(Lx)<37) sources among the former being ~ 4 times less than in the field population. The X-ray luminosity function (XLF) of sources in the nucleus of M31 is similar to that of GC sources at the faint end but differs at the bright end, with the M31 nucleus hosting significantly fewer bright sources. We discuss the possible origin and potential implications of these results.


Introduction
It has long been known that there are many more low-mass Xray binaries (LMXBs 1 ) per unit stellar mass in Galactic globular clusters (GCs) than in the field (Clark 1975). This fact is conventionally explained as a result of dynamical formation of LMXBs in the high stellar density environment of GCs where the probability of two-body interactions, which scales as ρ 2 * , is high (Fabian et al. 1975). In the Chandra era this picture received further support from the high specific frequency of LMXBs in GCs observed in nearby external galaxies (e.g., Angelini et al. 2001;Sarazin et al. 2003;Minniti et al. 2004;Jordán et al. 2007b). Also, a significant "surplus" of LMXBs was detected in the nucleus of M31, with the spatial distribution of compact X-ray sources following the "ρ 2 * " law (Voss & Gilfanov 2007a). The stellar density is low outside of GCs and the nuclear region of galaxies, with a correspondingly lower probability of stellar interaction, therefore primordial formation is thought to be the main formation process for LMXBs in the main bodies of galaxies. Their volume densities follow the distribution of stellar mass (Gilfanov 2004). 1 Throughout this paper we refer to objects that have been actively accreting in recent times (i.e. log(L X ) > ∼ 35) as X-ray binaries.
Although the above picture is attractive in its simplicity, there is a plausible alternative scenario: The entire population of LMXBs in galaxies, including those in the field may have been produced dynamically in GCs and later expelled into the field. Although the debate is still going on (White et al. 2002;Kundu et al. 2002Kundu et al. , 2007Irwin 2005;Juett 2005;Humphrey & Buote 2008), several strong arguments have been presented which suggest a (significant) fraction of field LMXBs formed in situ via primordial binary formation. These include the difference in spatial distributions of field LMXBs and GCs (e.g. Kundu et al. 2007) and the lack of correlation between the specific frequency of field LMXBs and that of GCs (e.g. Juett 2005). At the same time, Humphrey & Buote (2008) came to the opposite conclusion. The recently found evidence that the X-ray luminosity function (XLF) of GC-LMXBs may differ from that of field LMXBs (Voss & Gilfanov 2007a;Voss et al. 2009;Woodley et al. 2008;Kim et al. 2009) adds to this debate. Although some caveats are in order, differences in the luminosity distributions of the GC and field binaries suggest that the two sub populations of LMXBs may have different formation and/or evolution histories (Voss et al. 2009).
Differences in the luminosity distributions of LMXBs in GCs and in the field may be most obvious in the low-luminosity (1) -Galaxy name. For M31, the first line is for the bulge region, the second line is for the region in the disk.
(3) -Distance and its uncertainty (when available). References and methods are: M31 -luminosity function of red clump stars (Stanek & Garnavich 1998); Centaurus A -Cepheids (Ferrarese et al. 2007); M81 -Cepheids (Freedman et al. 1994); Maffei 1 -galaxy fundamental plane (Fingerhut et al. 2003); NGC 3379 -luminosity function of GCs (Kundu & Whitmore 2001); NGC 4697, NGC 4278 -surface brightness fluctuation (Tonry et al. 2001). (4) -Galactic column density (Dickey & Lockman 1990). (5) -The region used to study XLFs. When three numbers are given, they refer to major, minor axis and position angle. (6) -K-band mass-to-light ratios derived from Bell & de Jong (2001), with B − V colors from the RC3 catalog (de Vaucouleurs et al. 1991) except for Maffei 1, which is from Buta & McCall (1983). (7) -Stellar mass in the study field, as calculated from the K-band magnitudes derived from 2MASS Large Galaxy Atlas (Jarrett et al. 2003). For M31 we used the IRAC/Spitzer data, and the 3.6 µm flux was converted to K-band following Bogdán & Gilfanov (2010). (8)  (log(L X ) < ∼ 37) domain. Thus the reliable detection and quantitative study of any possible differences in the XLF demands special care in the treatment of incompleteness effects and the removal of the cosmic X-ray background sources (CXB). Another difficulty, of a more fundamental nature, is the statistical noise caused by the small numbers of sources. Although the majority of previous investigations seem to converge in their conclusions, with a few exceptions (e.g., Voss et al. 2009) most of these studies have marginal statistical significance. However it is difficult to achieve higher quality statistics by studying individual galaxies that host a limited number of sources. Massive ellipticals with their large GC populations could avoid this difficulty. But the long distances to the best candidates require deep X-ray observations, in the Msec range, to reach the required depth. Such data sets are not available in the Chandra archive. However, the potential impact of accurately determining the luminosity distributions of X-ray binaries located in different environments on our understanding of the formation and evolution of LMXBs is high. This motivated us to attempt to produce the most accurate LF of GC-LMXBs to date by combining Chandra data for multiple galaxies. To this end we undertook a systematic survey of nearby galaxies with sufficient numbers of LMXBs and GCs. The results of this study are reported below. The paper is structured as follows. We describe our selection criteria and resulting sample in section 2 and the data preparation and analysis in section 3. In section 4 we describe the procedure used to combine XLFs. Results are presented and analyzed in section 5 and discussed in section 6. Section 7 lists the conclusions.

The sample
In constructing the sample our goal is to provide uniform coverage over as wide a range in luminosity as possible. We aim to study sources as faint as 10 35 erg/s. On the other hand, our goal is to have good enough statistics at the bright end where the specific frequencies of sources (per GC or per unit stellar mass) is low. Therefore our strategy is to include all galaxies with the best sensitivities achieved by Chandra so far and complement this with several sufficiently massive galaxies with somewhat low sensitivity in order to properly sample the high-luminosity domain. We based our selection on the list of normal galaxies available in the public Chandra archive. We did not exclude late-type galaxies, but in constructing the XLF of the field sources we considered only their bulges (to exclude possible contamination by HMXBs). The main selection criterion used was a detection sensitivity better than log(L X ) ∼ 36.5−37. This translates into a joint constraint on the distance to the galaxy and the exposure time of the Chandra observation. We also decided to exclude galaxies with stellar mass less than 10 10 M ⊙ because of their smaller LMXB populations and the consequently higher contamination by resolved CXB sources. Finally, we required the availability of extensive GC data in order to reliably separate GC and field sources. Our final sample includes seven nearby galaxies (Table  1). In addition we also include the GC sources in the Milky Way.
M31 is the only nearby galaxy with Chandra sensitivity better than 10 35 erg s −1 . Voss & Gilfanov (2007a) analysed 160 ksec of Chandra data available at the time and found 12 LMXBs in confirmed GCs in the bulge. Since this study, an additional ∼ 140 ksec of data has been collected by Chandra (which brings the total exposure time of the bulge to over 300 ksec), and more accurate GC data have been published (Peacock et al. 2010). We also analysed an additional 160 ks observation of a region in the disk. Centaurus A was the target of a recent Chandra VLP program. With a total Chandra exposure time of ∼800 ks, a detection sensitivity of 6×10 35 erg s −1 has been reached in this galaxy. Voss et al. (2009) find 47 GC-LMXBs in this galaxy, so we use their source lists in our analysis. A similar detection sensitivity was reached in M81 with an exposure time of ∼240 ks. The four other external galaxies in our sample have detection sensitivities of a few × 10 36 erg s −1 and are included to increase the statistics of luminous sources. One of them, Maffei 1, is relatively small and marginally passed our mass threshold. However, it appears to be particularly rich in X-ray sources. The X-ray populations in NGC 3379, NGC 4697 and NGC 4278  (2) is the disk region. The observations marked by "*" were used as the reference when combining the data.
have been studied previously (e.g., Kundu et al. 2007;Kim et al. 2009;Brassington et al. 2009). For these galaxies we redid the data analysis and found it to be in overall agreement with the above authors. The Milky Way hosts 150 GCs (Harris 1996), of which 12 are known to host bright LMXBs. As all the Milky Way GCs have been surveyed in the X-rays multiple times by various instruments, we assume that our sample of GC-LMXBs is complete. We used the data from the All-Sky Monitor aboard RXTE to measure the luminosities of these sources. The advantages and shortcomings of such an approach are discussed in section 3.4.

Source detection
The details of the Chandra observations of external galaxies used here are listed in Table 2. These observations were reduced following the standard CIAO threads (CIAO version 3.4; CALDB version 3.4.1). Time intervals when background flares happen were not excluded, since the benefit of the increased exposure time outweighs the increased background. The energy range was limited to 0.5-8.0 keV. We have only used sources located in the regions where Chandra data overlaps with the GC data to construct the XLFs. The sizes of these "study fields" are listed in Table 1, and the regions are overlaid on the X-ray images shown in Fig. 1.
In order to detect sources we used "wavdetect" with the same parameters as Voss & Gilfanov (2006. Thresholds were set to be 10 −6 for all galaxies, yielding an average of 1 false source per 10 6 0.492×0.492 arcsec 2 ACIS pixels. In order to prevent distortion of point sources due to attitude reconstruction errors in the course of combining images, we used the brightest sources detected within a 4 ′ radius of the telescope axis in each observation and corrected offsets between observations using the method described in Voss & Gilfanov (2007a). For the disk region of M31, the observations are distributed in too wide an area to make this correction possible. For M81 and NGC 4697, the offsets between observations were insignificant thus this step was skipped. For NGC 3379, we used offsets from Brassington et al. (2008). The observations were then shifted to match the coordinate system of the reference (marked with an asterisk in Table 2) and thereafter combined together and reanalyzed.
The next step is to apply an absolute astrometry correction to the combined image. We used the 2MASS All-Sky Point Source catalog (Skrutskie et al. 2006) and correlated it with the brightest X-ray point sources. X-ray images were shifted to give the shortest rms-distances between the X-ray sources and their 2MASS counterparts. These corrections are listed in Table 1, where dx refers to correction in the west and dy is the correction to the north. In the case of three galaxies: NGC 3379, NGC 4697, and NGC 4278, this step was skipped because we did not find enough matches.
The statistics of the detected sources are summarized in Tables 3 and 4. To estimate the count rates we followed the method described in Voss & Gilfanov (2007a). The luminosities of point sources were calculated assuming a power-law spectrum with Γ=1.7. Count rates in 0.5-8.0 keV band were converted into absorption corrected fluxes assuming Galactic absorption. We list the conversion factors in Table 1.
To estimate the expected numbers of CXB sources among detected X-ray sources, we used the results of the CXB log(N)log(S ) determination by Moretti et al. (2003). We used their equation (2) for the soft band counts and converted the flux to the 0.5-8.0 keV band, assuming a power-law spectrum with a photon index of 1.4. The predicted numbers of CXB sources account for the incompleteness are described in section 4.1. The computed numbers of CXB sources are listed in Table 3. In the closest galaxies, background AGN account for a large fraction of detected X-ray sources, especially in M31 where nearly half of the X-ray sources are CXBs. Maffei 1 is a small galaxy that is abundant in LMXBs, and the contamination by CXB sources is minimal. In NGC 3379 and NGC 4278 HST the WFPC2 fieldof-views (FOVs) are located in the very central region, where the CXB fraction is less than 10%. In NGC 4697 the CXB fraction is about 15% in the D25 region.
The CXB estimates based on the average source counts are subject to uncertainties caused by angular fluctuations of the density of background AGN. These are likely to be reduced in our analysis as it covers a rather large solid angle composed of non contiguous fields. Nevertheless, for each individual galaxy we verified that the observed density of compact sources outside its main body is consistent, within the statistical errors, with the predicted density of CXB sources. This was possible to do directly for Maffei 1, NGC 3379, NGC 4697, and NGC 4278, thanks to their relatively small angular size. For M31 and Centaurus A whose angular extent exceeds or is comparable to the Chandra FOV, we used the results of Voss & Gilfanov (2007b) and Voss et al. (2009). In Centaurus A the CXB source density was found to exceed the average source count by a factor of ∼ 1.5, which that was accounted for in our calculations.

Identification of GC sources
We correlated the lists of detected X-ray point sources with the GC lists available for M31, M81, Maffei 1, NGC 3379, NGC 4697, and NGC 4278. For Centaurus A we used the results of Voss et al. (2009).
For M31, the most recent and complete GC catalog is a systematic survey using WFCAM on the United Kingdom Infrared Telescope and SDSS by Peacock et al. (2010). In total there are 416 confirmed GCs, with 121 located in the two Chandra fields in our study. GCs in M81 are from Perelmuter et al. (1995), Chandar et al. (2001), and Schroder et al. (2002). Chandar's study is based on deep HST observations that cover 25% of our Chandra field. We took the 59 GCs from Chandar et al. (2001)   Columns are: (1) -Galaxy name.
(2) -Total number of resolved X-ray point sources in the study fields.   Columns are: (1) -Galaxy name. Columns (2)-(4) and (6)-(8) -Number of GC-LMXBs (N GC−X ) and field LMXBs (N F−X ) in different luminosity ranges (1, 2 and 3 refer to log(L X ) ranges of 35-36, 36-37 and >37) with incompleteness higher than 0.5. The source numbers are not corrected for incompleteness, and the CXB contribution is not subtracted. Columns (5) and (9) -The specific number of GC-LMXB (per GC) and field LMXBs (per 10 10 M ⊙ ) in the highest luminosity bin log(L X ) > 37. The numbers are corrected for incompleteness of X-ray source lists, the contribution of CXB is subtracted. Note that the specific numbers of GC-LMXB are not corrected for incompleteness of the GC lists and are given here as a characterization of our sample, rather than of the properties of GC systems in different galaxies.). and the others from the other two catalogs, which resulted in 77 confirmed GCs in the Chandra field. For Maffei 1, there are 20 GCs from HST observation by Buta & McCall (2003). For NGC 3379, we took the 61 GCs from Kundu & Whitmore (2001), which are based on deep HST observations. The GC list for NGC 4697 is taken from Jordán et al. (2011). And the GCs in NGC 4278 are from Kundu & Whitmore (2001) and Brassington et al. (2009).
The search radius R used in cross-correlating the X-ray source lists and GC catalogs was chosen for each galaxy individually based on the following considerations. The number of random matches is N r = πR 2 × N XRS × N GC /A, where N XRS is the number of X-ray point sources, N GC the number of GCs, and A the area of our study field. Because of the rather high source density, the number of random matches may be non-negligible for high values of the search radius R. On the other hand, the search radius has to be broad enough to account for position errors and, for the closest galaxies, the finite angular sizes of GCs. We therefore devised a procedure in which we varied R from 0 to 5 ′′ (Fig. 2). For each value of R we computed the number of true matches as the number of total detected matches minus the predicted number of false matches calculated from the above formula. This number increases with R and saturates at some value of R that depends on the typical positional error and angular extent of GCs. This value of R may be chosen as the optimal match radius. In some cases, however, it results in too high a fraction of false matches in the sample. We therefore set an additional requirement that the predicted number of false matches does not exceed 5% of the total number of matches. This procedure is a simplified version of the method used in Shtykovskiy & Gilfanov (2005). The optimal search radius used for the program galaxies are listed in Table 3. As expected, there is a general trend that nearby galaxies require larger search radii.
The numbers of X-ray sources associated with GCs are listed in Table 3 along with the predicted numbers of false matches.

Incompleteness of GC lists
Although the availability of the high quality GC optical data was one of the criteria in selecting our galaxy sample, the GC lists are not 100% complete for all of them. The incompleteness of these lists can result in incompleteness of the GC-LMXB lists and can compromise the shape and (less importantly) the normalization of the GC XLF. Examples of the determination of the optimal search radius for cross-correlation of X-ray source lists with GC catalogs for two galaxies -M31 (solid lines) and NGC 4278 (dashed lines). Upper panel: the number of true matches (N true , computed as the difference between the number of total matches N total the number of expected random matches N r ) as a function of the search radius R. Lower panel: the ratio of the number of random matches to the number of total matches. The dash-dotted line is the 5% level. The vertical lines in the upper panel show our choice of the search radii for these two galaxies.
In order to estimate the completeness fraction of the GC lists we used the fact that optical luminosity function of GCs (GCLF) can be described to good accuracy by log-normal distribution in the form where M is the absolute magnitude of GC, µ the turnover luminosity, and σ the dispersion. The turnover luminosity is remarkably constant in different galaxies. We used the following values for different bands: Jordán et al. 2007a). The reddening corrected photometry data of GCs for each galaxy (see references in section 3.2) was fit by this model using maximum likelihood method. The fitting was performed using only GCs above the completeness limit of the optical data for each galaxy. The width of the distribution σ and normalizations were free parameters of the fit. The data along with the best-fit model are shown for six galaxies from our sample in Fig. 3. The completeness fraction of the GC lists K GC opt was then determined as a ratio of the total number of detected GCs (of all magnitudes) to the total number predicted by integrating the best-fit model. The results are listed in Table 3. Given the completeness limits of M31 and Maffei 1 data, their GC lists are complete. The list of GCs in the Milky Way is also believed to be reasonably complete (Harris 2001). In agreement with this, the best-fit values obtained for these three galaxies are consistent, within errors, with 1. We The observed luminosity functions of GCs for six galaxies in our sample and their best-fit models. The turnover luminosity of the model in different bands was fixed at the values determined elsewhere (see text), the width σ was a free parameter of the fit. therefore set the completeness fraction for these three galaxies equal to unity.
The second factor, required to correctly computing GC XLF is K GC,X opt -the completeness fraction of the GC-LMXB identifications, caused by the incompleteness of the overall GC lists. If the probability of finding an LMXB in a globular was independent of its optical luminosity, the two quantities would coincide: K GC,X opt = K GC opt would hold. However, it has been shown that X-ray sources tend to be associated with brighter GCs (e.g., Sivakoff et al. 2007). This is illustrated by the Fig. 4 where we plot the combined LF of all GCs and all the GCs hosting an Xray source in the three galaxies which GC lists are complete -MW, M31 and Maffei 1. To determine K GC,X opt we assume that LF of GCs hosting an X-ray source is the same in all galaxies. Using the combined LFs in Fig.4 as the template, we then use the ratio of the numbers of GCs hosting X-ray sources above and below the threshold magnitude of V = −7 (V = −8 for Cen A) to estimate the number of missed X-ray sources in GCs in each galaxy. The threshold magnitude was chosen so that the GC lists are complete above its value. The results of this calculation, along with their uncertainties are listed in Table 3.

The Milky Way sources
The luminosities of the Milky Way sources were calculated from the light curves measured by the All-Sky Monitor aboard RXTE. The light curves were averaged over the period from January 1996 to June 2009. The count rates were transformed to the 0.5-8.0 keV band fluxes with the conversion factor obtained using PIMMS: 1 count s −1 = 4.3×10 −10 erg cm −2 s −1 . A power-law with Γ=1.7 was assumed. To compute source luminosities we used distances to the GCs from Harris (1996).
The following comments regarding the determination of the luminosities of the Milky Way sources are in order. The ASM fluxes are averaged over a significantly longer time scale than the Chandra data for external galaxies. Although both the ASM (∼ years) and Chandra (∼ 1 − 10 days of total integration time, ∼ years time span of observations) integration time scales are much longer than the characteristic time scales of the accretion disk in these sources the variability of the X-ray light curves could in principle result in "clipping" of the XLF i.e. smoothing out the extrema of long term variability. The effect of averaging ASM light curves on the XLF was studied by Postnov & Kuranov (2005), who came to the conclusion that flux probability distribution functions for persistent galactic Xray binaries are such that light curve averaging does not modify the shape of the power-law luminosity distribution. To verify this further we considered variations in the XLF obtained by averaging ASM light curves over shorter intervals, comparable to the duration of Chandra observations of external galaxies. The results of this analysis are presented in section 6. However, the effect of such time averaging may be more significant for transients that, for long averaging times, will "accumulate" in the low-luminosity bins and will lead to a steepening of the XLF (Voss & Gilfanov 2007a). It is also an issue for M31, which was observed in several short observations distributed over the time span of a few years, and to a lesser extent for M81. This can potentially lead to significant distortions of the XLF, depending on the average time and light curve properties of transients. However, as discussed in section 6.2, it is not a significant factor in our particular case.
It is also known that one of the Galactic GCs, M15, contains two bright X-ray binaries (White & Angelini 2001). Transients have been detected in two other GCs, NGC 6440 (Heinke et al. 2010) and Terzan 5 (Bordas et al. 2010). The net effect of source blending on the XLF of GCs was considered and shown to be negligible in Voss & Gilfanov (2007a). It is also discussed in section 6.

Combined XLFs of GC and field LMXBs
In combining the data from individual galaxies two effects need to be considered: correction for the incompleteness and removal of the contamination by background AGN. The former has to compensate for the fact that different sensitivities have been achieved for different galaxies, as well as for variations in the source detection sensitivity across the FOV in individual observations. On the other hand, estimation of the contribution of CXB sources in the XLF has to take into account the effects of incompleteness that affect the detection of CXB sources as well.
There are a few different weighting schemes for combining the XLFs; here, we have used the one that produces the best signal-to-noise ratio under the assumption that XLFs of different galaxies have the same shape (Eqs. (2) and (6) below). Obviously this assumption can only be verified to the accuracy allowed by the statistical quality of the individual XLFs, which is by a factor of a few less than the accuracy of the combined XLF. Indirectly, this assumption is supported by not seeing large variations in the specific frequency of GC and field sources between galaxies (Table 4, but see also section 6.2).

X-ray incompleteness correction
We calculated the X-ray incompleteness function K X (L) following the method of Voss & Gilfanov (2006). For each pixel in the study area the point source detection sensitivity was calculated by inverting the detection method and using the actual local PSF and background (Voss & Gilfanov 2007a). K X (L) is computed as the fraction of pixels, weighted by the assumed spatial distribution of sources, in which a source with the given or higher luminosity would be detected. This computed quantity is the detection efficiency as a function of source luminosity. Because it depends on the spatial distribution of sources, we compute it separately for different source populations. For CXB sources we assume a flat spatial distribution. Field LMXBs are assumed to follow the K-band light, as reported in the 2MASS Large Galaxy Atlas (Jarrett et al. 2003). For GC-LMXBs no weighting was applied, but only pixels containing GCs were used in the calculation. The incompleteness function for GC and field sources in individual galaxies are shown in the two upper panels in Fig.5.
The bottom panel in Fig.5 shows the combined incompleteness functions for GC and field sources computed by summing individual incompleteness functions weighted by the number of GC and stellar mass inside the study area of each galaxy. Since the distributions of GCs and stellar mass do not differ strongly, one may expect these two functions to be nearly identical. This is in fact the case throughout most of the luminosity range. The two curves diverge near ∼ 5 × 10 36 erg s −1 because of the different areas used to study GC and field sources in Centaurus A (see Voss et al. 2009, for details). The difference below ∼ 10 35 erg s −1 is caused by only using GC sources for the Milky Way.

LF of GC-LMXBs
There are 185 GC-LMXBs in total in our sample. To avoid uncertainties from the highly incomplete low-luminosity end, we adopted a completeness threshold of 0.5 and used the curves shown in the upper panel of Fig.5 for each galaxy to determine the corresponding luminosity limit. Sources below these limits were excluded from the XLF construction. This procedure excluded source numbers 13, 39, 98, 107, 108, and 109 from Table  6. The XLF value in the j-th luminosity bin centered at L j and having a width of ∆ log(L j ) was computed according to the equation: where N GC e f f is the effective number of GCs involved in the calculation of the XLF at the given luminosity L X , corrected for optical and X-ray incompleteness. It depends on X-ray luminosity because it accounts for the X-ray incompleteness, where N GC k is the number of observed GCs in the study field of the k−th galaxy, K GC X,k (L) is the X-ray incompleteness function for GC sources in the k−th galaxy, the K GC,X opt,k and K GC opt,k are optical completeness factors, described in section 3.3 and listed in Table  3. The thus computed XLF is normalized per GC.
The effective X-ray incompleteness of the GC data can be defined as This is the quantity plotted in Fig.5 (individual K(L) not clipped at the incompleteness level of 0.5 when plotting the figure). The factor K GC,X opt /K GC opt in eq.(3) accounts for the incompleteness of the optical GC data. The denominator in this expression, K GC,X opt , is rather poorly constrained by our data (Table 3) and is consistent with K GC,X opt = K GC opt within the measurement uncertainties. In fact, given the amplitude of the uncertainties, using the best-fit values would introduce additional noise into the obtained XLF. We therefore assumed that K GC,X opt = K GC opt in the further calculations. With this assumption the incompleteness of the optical data cancels out (see the discussion in the beginning of the last paragraph in section 3.3). The impact of this assumption on the final LF of GC-LMXBs is investigated in section 6.2.
In the case of GC sources, the contamination by background AGN is insignificant so was ignored. Indeed, the predicted total number of random matches between resolved CXB sources and GC positions with the given search radii from Table 3 is ≈ 1.1. The final XLF of GC sources is shown in Fig.6. The incompleteness-corrected number of GC sources with luminosity exceeding 10 35 erg s −1 is ≈ 244.

LF of field LMXBs
We have only considered field sources in elliptical galaxies and the bulges of spiral galaxies, in order to minimize the contamination by HMXBs. M81 was not included due to the relatively small size of its bulge. Thus, the bulge regions of M31, Maffei 1, NGC 3379, NGC 4278, and NGC 4697 were combined with the Centaurus A observations. For the last, we excluded the jet and radio lobe regions that have small-scale structures in the diffuse emission (Voss et al. 2009). In M31 we excluded the sources located in the central 1 ′ of the galaxy since they have been demonstrated as very likely dynamically formed (Voss & Gilfanov 2007a). A separate XLF was constructed for these 36 sources, as discussed in the next section. In Maffei 1, NGC 3379, NGC 4278, and NGC 4697 the central 10 ′′ were excluded. These regions are affected by source confusion, which makes accurate luminosity estimates difficult. We then followed a procedure similar to the GC sources by applying a luminosity threshold corresponding to K(L) = 0.5 in each galaxy. With these selection criteria we obtained 496 sources above 10 35 erg s −1 , of which ∼177 are predicted to be CXB sources.
In order to correctly subtract CXB contribution one has to take into account the difference in the incompleteness functions for CXB sources and LMXBs: where D k is the distance to the k−th galaxy, K LMXB tot (L) the combined incompleteness function for LMXBs computed similar to eq.(4), and dN CXB /dS the log(N) − log(S ) distribution for Fig. 6. The combined XLFs of LMXBs in GC (filled circles) and in the field (open circles). L X is the unabsorbed X-ray luminosity in 0.5-8 keV. The contribution of CXB sources was subtracted and the incompleteness correction was applied. The field XLF is normalized to stellar mass of 10 10 M ⊙ . The GC XLF is normalized to have the same number of sources as the field XLF above 10 38 erg s −1 .
3.6 · 10 −4 (3.6σ) P(R C < R GC ) 8.3 · 10 −3 (2.6σ) 4.6 · 10 −3 (2.8σ) Note -R GC , R F , and R C are ratios of the number of faint sources (L min < L x < 10 37 erg s −1 ) to the number of bright sources (L x > 10 37 erg s −1 ) for GCs, field sources, and sources in the inner 1 ′ of M31. P is the probability that the luminosity distributions of corresponding populations are drawn from the same mean (see text for details). the CXB sources. In practice we implemented this by adding a large number (∼10 3 ) of fake sources with small negative weights to each galaxy's source list. This accounted for the CXB log(N) − log(S ) distribution and incompleteness function of the galaxy. The sum of these weights for each galaxy equals the predicted number of CXB sources in this galaxy. These "enhanced" source lists were used to produce the combined XLF according to eq.(2): The final XLF for field sources normalized to unit stellar mass is shown in Fig.6. The total stellar mass involved in this calculation is 1.82×10 11 M ⊙ . The specific frequency of LMXBs above 10 36 (10 37 ) erg s −1 is 25.7(9.6) per 10 10 M ⊙ , which is consistent with the average values from Gilfanov (2004) -33.9(14.3).

Results
The background-subtracted and incompleteness-corrected XLFs of the GC and field LMXBs are shown in Figs. 6 and 7. The XLF of field sources is normalized to a stellar mass of 10 10 M ⊙ . The XLF of GC sources is normalized to the same number of sources above 10 38 erg/s as the field XLF. It is obvious from the plot that the two luminosity distributions have different shapes. Although they differ across the entire luminosity range, the most evident difference is at lower luminosities, below log(L) ∼ 37. Both XLFs change their slope between log(L) ∼ 37 − 38. Due to their rather complicated shapes we did not attempt to do global fits with analytical functions. Instead, we perform power-law fits to the high-and low-luminosity ends. We did maximumlikelihood fits to the background-subtracted XLFs. To account for the incompleteness, we multiplied the model by the respective incompleteness function. In the log(L) ≥ 38 range, we obtained differential slopes of 1.70 +0.60 −0.58 and 2.06 +0.92 −0.75 for GC and field sources correspondingly. At the faint end, log(L) ≤ 37 the slopes are: 0.68 +0.21 −0.23 and 1.17 +0.13 −0.14 respectively. The slopes of the field sources are broadly consistent with the parameters of average LMXB XLFs from Gilfanov (2004).
Differences in the incompleteness curves and in the CXB contribution render direct application of the K-S test to compare these two XLFs impossible. We have therefore considered the ratio of the number of faint to bright sources in order to assess the statistical significance of the difference between the two XLFs, the same method as used in Voss et al. (2009). For each population we computed the ratio R = N faint /N bright , with the boundary between faint and bright set to 10 37 erg s −1 . We ran Monte-Carlo simulations to calculate statistical errors and the significance of our results. The details of these calculations are described in Voss et al. (2009). For each XLF we did 10 7 Monte-Carlo runs. The results are listed in Table 5. The lines marked "P" give the probability of obtaining the observed values of R due to statistical fluctuations, while their mean (true) values obey the relation given in parenthesis. These numbers can be interpreted as the probability that the corresponding luminosity distributions are drawn from the same mean. The upper limit of < 10 −7 in the left column means that no such realizations were detected in 10 7 Monte-Carlo runs.
These calculations show that the GC and field XLFs differ at a confidence level of < 10 −7 , which corresponds to a significance of > 5σ. To investigate the robustness of this conclusion we have also used a more restricted luminosity range of log(L X ) > 36, where the incompleteness functions vary less and different galaxies from our sample make more uniform contributions. In this case the confidence level decreases to 3.4 · 10 −4 (3.6σ), but the conclusion still holds.

Discussion
Our analysis has revealed a significant difference in the luminosity distributions of field and GC sources. A similar result was previously reported for a few nearby galaxies (Voss & Gilfanov 2007a;Voss et al. 2009;Kim et al. 2009), some of which are included in our sample. However, limited numbers of sources in these galaxies (even in Centaurus A) did not permit any detailed investigation of the luminosity distributions, but merely suggested a deficit of faint sources among dynamically formed LMXBs. Given the sensitivity expected in a typical Chandra observation and distances to the closest massive galaxies, the main limitation of these studies -insufficient number of sources cannot be lifted when investigating a single galaxy. This moti- Fig. 7. The combined XLFs of LMXBs in different environments plotted in the cumulative form. L X is the unabsorbed X-ray luminosity in 0.5-8 keV. The contribution of CXB sources was subtracted and the incompleteness correction was applied. The field XLF (solid) is normalized to the stellar mass of 10 10 M ⊙ . The normalizations of GC (dashed) and M31 nucleus (dash-dotted) XLFs are arbitrary. The shaded areas around the curves show 1σ statistical uncertainty. vated us to combine data for several nearby galaxies. Thus, we have produced average XLFs of different populations of LMXBs with far better statistical quality than achieved before. With these XLFs we confirm the general conclusion of previous studies that the fraction of faint sources in GCs is a factor of ∼ 4 smaller than sources in the field. Moreover, the overall behavior is more complex and cannot be described in terms of a simple roll-over of the XLF at low luminosities. Instead, luminosity distributions of GC and field sources differ throughout the entire luminosity range.
It has long been debated whether the entire population of LMXBs in galaxies, including those in the field, was formed dynamically in GCs (White et al. 2002;Kundu et al. 2002Kundu et al. , 2007Irwin 2005;Juett 2005;Humphrey & Buote 2008). In this scenario it is suggested that either field LMXBs are systems expelled from their GCs, or the host cluster itself was destroyed leaving the LMXB to join the field population. The significantly different luminosity distributions of LMXBs residing in GCs and in the field argues against this scenario. As is well known, the mass transfer rate in a Roche lobe-filling system is defined by its orbital period, mass ratio, and the evolutionary stage of the donor star. The distributions of these parameters are obviously different in the population of primordially formed binaries and in the dynamically formed systems in GCs. It is therefore not surprising that these populations have different mass transfer rates distributions and, correspondingly, different XLFs. 2 2 As a caveat, we mention that the cross-section for the dynamical interaction and, therefore, the probability for a binary to be ejected from a GC, is a strong function of the orbital period of the binary. Therefore, in the GC-scenario one may also expect different orbital period distribution of the binaries retained in GCs and those ejected into the field. This may lead to different XLFs of the two sub populations, if ejection of binaries is the main mechanism of populating the field LMXBs, rather than GC destruction. Detailed populations synthesis calculations are required in order to see if this may explain the observed XLFs. and of GC sources (filled circles). L X is the unabsorbed X-ray luminosity in 0.5-8 keV. The normalization of the GC XLF is arbitrary. No sources are detected in the three highest luminosity bins of the M31 XLF.

Sources in the nucleus of M31
Voss & Gilfanov (2007a) demonstrate that most sources in the inner ∼ 1 ′ of M31 are very likely to have formed dynamically, similar to the sources in GCs. In particular, they find that their spatial distribution follows the ρ 2 * law, in contrast to the X-ray sources outside this region, where the density is proportional to the stellar density. We updated the LMXB list in this region using an exposure approximately twice of the one presented in Voss & Gilfanov (2007a). We have detected three new sources, bringing the total number to 36 (The increase in the number of sources for a log(N) − log(S ) distribution with the slope of −1 would be ∼13). We excluded one source that coincided with a GC and computed the luminosity distribution of the detected sources, performing incompleteness correction and CXB subtraction as described before. The resulting XLF is shown in Fig.  8 along with the XLF of GC sources. It is obvious from the plot that the two distributions have similar shapes at log(L X ) < ∼ 37 but differ at the bright end, with the XLF of the sources in the M31 nucleus having a deficit of bright sources. To test the statistical significance of this conclusion we ran the same tests as we did to compare XLFs of GC and field LMXBs in Sec 5. We found that the LF of LMXBs in the M31 nucleus differs from the GC XLF with a significance ≈2.6-2.8σ (Table 5). In other words, one should expect 26 sources with log(L X ) > 37 in the nucleus of M31, assuming that both distributions have the same shape and using the number of faint sources for normalization. The observed number of bright sources is 11, which is ≈ 3σ less than expected. Both calculations give similar results, confirming the marginal significance of our conclusion.
Although both populations were formed dynamically, there is an important difference between stellar environments in GCs and galactic nuclei: stellar velocities in the latter are about ∼ 10 − 20 times higher. This leads to different formation channels in GCs and galactic nuclei (Voss & Gilfanov 2007b, and references therein). Calculations of Voss & Gilfanov (2007b) suggest that in the high-velocity environment of the M31 nucleus the main formation channel for X-ray binaries may be tidal captures of compact objects by low-mass stars, producing short orbital period binaries. In GCs, in contrast, LMXBs are predominantly formed in exchange reactions and collisions of neutron To emphasize the effect on the shape, rather than overall normalization, the XLF are normalized to the total number of detected GCs. See sections 3.3, 4.2. and 6.2 for details. stars with evolved stars. Obviously, this difference will affect the distributions of binary systems over the mass accretion rate. Detailed population synthesis calculations are required to understand what this effect may be and to interpret the observed luminosity distributions in a more quantitative and meaningful manner.

Caveats
Several caveats regarding possible systematic effects are in order. The distance uncertainties, in the limit of several galaxies, will smooth out the luminosity distributions. For a smaller sample (which is the case for the current study), there could be a non trivial effect on the computed XLFs. However, the distances to the galaxies in our sample are fairly well known, with an accuracy of ∼ 5 − 15% (Table 1). This translates to ∼ 10 − 30% uncertainty in the luminosity and ∼ 4 − 11% in its logarithm. This is a factor of ∼ 4 − 12 smaller that the bin width used in the XLF calculations. Thus it should not affect the measured XLFs in any significant way.
We used a rather inhomogeneous set of the GC lists, having varying degree of completeness. The procedure of correction for incompleteness of the optical data is described in section 3.3 and 4.2. Its accurate implementation, however, was hindered by the large statistical uncertainties of the completeness fraction of the GCs hosting an X-ray source, K GC,X opt . As results of section 3.3 were consistent with K GC,X opt = K GC opt (the latter much better constrained), we assumed that this relation holds for all galaxies. This could be the case, for example, if the probability of finding an LMXB did not depend on the optical luminosity of the GC. However, this is known not to be the case (e.g., Sivakoff et al. 2007) (see Fig. 4). As is obvious from Eq.(3), the optical incompleteness would have the strongest effect on the XLF if for all galaxies K GC,X opt = 1 (i.e. if all LMXBs were located in the brightest GCs and not subject to optical incompleteness at all, which is not true either). To illustrate its amplitude, we show in Fig.9 the XLFs computed in these two limiting cases. As is obvious from the plot, the XLF does not change by more than ∼ 20 − 30% in the two lowest luminosity bins. We emphasize that the example shown in the plot illustrates the maximum possible effect of the optical incompleteness, the real effect being smaller.
Combining XLFs necessarily involves an assumption regarding the similarity of their shapes in individual galaxies. Although we did not detect statistically significant differences between different galaxies, this assumption cannot be verified directly at the same level of accuracy as provided by the output average XLF. On the other hand, we do detect marginally significant variations in the specific frequency of X-ray sources in GCs between galaxies, although these may be related, at least in part, to the incompleteness of the GC lists in more distant galaxies. However, if they are real, they may be accompanied by variations in the XLF shapes. The effect of such variations may be further amplified by the fact that data for different luminosities come from different galaxies. The low-luminosity domain, log(L) < 36, is covered exclusively by the nearby M31 and Milky Way, whereas the bright end is dominated by sources located in more massive but more distant galaxies, such as Centaurus A and NGC 4697. This is another unavoidable limitation, as bright sources, although more easy to detect, are less frequent, and it takes a bigger galaxy to have them in large numbers. On the other hand, bigger galaxies are more distant and the sensitivity achieved in a typical Chandra observation is lower. Conversely the nearby galaxies, where fainter sources can be studied, tend to be less massive and contain fewer bright sources. Luckily, the 800 ksec Very Large Chandra program on Centaurus A and relatively good coverage of M31 allowed us to bridge faint, intermediate, and bright luminosity ranges.
About half of the GCs with X-ray sensitivity in the lowest luminosity domain, log(L) < ∼ 36 are located in the Milky Way. The flux determination of the latter, based on the averaging of the ASM light curves, may be subject to systematic effects. It is different from those affecting Chandra galaxies data as discussed in section 3.4. Primarily, this is due to the long integration times of ASM light curves. To investigate its effect on the XLF, we divided the ASM light curves into 100 sub intervals with a duration of 50 days each (comparable to the integration time of the longest Chandra observations) and recalculated the GC XLF 100 times, each time using the data from different sub intervals to compute ASM fluxes for the Milky Way sources. The range of obtained XLF values is shown by shaded area in Fig. 10. As is obvious from the plot, the long integration time of ASM data does not affect the GC XLF significantly.
If the time span of observations is longer than the typical time scale of transient sources, averaging of their luminosity can also modify the shape of the luminosity distribution, making it steeper (Voss & Gilfanov 2007a). The typical decay time scales of the Galactic transient sources are in the ∼weeksmonths range. Thus, for the Milky Way GCs, this issue is addressed by the above exercise with the ASM light curves, and Fig.10 demonstrates that averaging of transients does not result in significant modifications of XLF, given its statistical quality. This issue is also relevant for the multiple Chandra observations of M31 and, to a less extent, M81. Indeed, the Chandra image of the bulge of M31 was obtained by combining more than 40 short (∼5 ks) observations. As transients are bright only in a few observations and dim in many others, they will tend to accumulate in the low-luminosity bins, making the XLF steeper. In Voss & Gilfanov (2007a) 28 transients were reported, two of which (Src. 22 and Src. 35 in Table 6) are in our GC-LMXB source list and 21 are in the field source list. We recomputed the luminosity distributions excluding these sources and did not find any significant changes (Fig. 11). The results of the statistical Fig. 10. The combined XLF of GC-LMXBs. L X is the unabsorbed X-ray luminosity in 0.5-8 keV. The XLF uncertainty shown by the shaded regions is due to the variability of GC-LMXBs in the Milky Way. tests reported in Table 5 are not changed significantly either: the probability P(R F < R GC ) for the full luminosity range remains < 10 −7 (although this may be affected somewhat by the incompleteness of the transient list at the faint end) for sources with log(L X ) > 36 it changes from 3.6 · 10 −4 to 2 · 10 −3 (from 3.6σ to 3.1σ). This proves that the contamination by transient sources in M31 does not significantly bias our results. It is much less significant for other galaxies, as they were observed by Chandra in much fewer longer observations. Thus, averaging of persistent and transient sources does not lead to significant (as compared to statistical errors) distortions of the XLFs derived in this paper and does not affect our results in any significant way. This conclusion should not be taken out of the context though. In a more general case, the effects discussed above may be important and may need a more elaborate treatment.
Another factor that can modify the apparent XLF of GC LMXBs is the multiplicity of X-ray sources in GCs, which can affect both Milky Way data and Chandra data for external galax-ies. We use the Milky Way GCs to estimate its impact on XLF. One of the Milky Way GCs, M15, is known to contain two persistent LMXBs (X2127+119-1 and X2127+119-2) with instantaneous luminosities of 9.5×10 35 erg s −1 and 1.5×10 36 erg s −1 (converted to 0.5-8 keV band) (White & Angelini 2001). Obviously these two sources could not be resolved by ASM, which measured the long-term average luminosity of 4.05×10 36 erg s −1 . Similarly, they would not be resolved by Chandra in any of our external galaxies with the exception of M31, where it may be marginally possible. Two bright transients have been detected recently, in NGC 6440 (Heinke et al. 2010) and Terzan 5 (Bordas et al. 2010) with the luminosities in the ∼ 10 36 − 10 38 erg/s range. Their effect on the "snapshot" XLF would depend on their unknown duty cycle. Assuming a duty cycle of ∼ 0.5, which seems to be a very generous upper limit, the multiplicity fraction for the Milky Way GCs is ∼ 1/12 − 2/12 ≈ 8 − 16%. As demonstrated in Voss & Gilfanov (2007a), the multiplicity at the level of ∼ 10% does not modify the luminosity distribution in any significant way. We also checked to see how the GC XLF is affected if the ASM M15 source is replaced by two source with the luminosities determined by Chandra and the transient source in NGC 6440 at its brightest state is added to the sample. The overall effect on the XLF is insignificant and the R GC changed from 0.89 +0.18 −0.16 to 0.92 +0.17 −0.14 , which is also negligible. We conclude that unless the multiplicity is much higher in external galaxies, it does not affect our conclusions in any significant way.

Summary
The aim of this study was to produce accurate luminosity distributions of LMXBs in different environments -dynamically formed systems in GCs, in the nucleus of M31 and field sources of presumably primordial origin -in order to facilitate their quantitative comparison and to provide input for verifying population synthesis models. This goal required a broad luminosity coverage with a point source detection sensitivity reaching 10 35 erg/s and, on the other hand, good sampling of the highluminosity end, where the specific frequency of sources (per GC or per unit stellar mass) is low. As this combination of properties cannot be achieved with a single galaxy, we combined the data from a number of galaxies. To this end, we assembled a sample of galaxies from the public Chandra archive which is best suited to our study. It included seven nearby galaxies (M31, Maffei 1, Centaurus A, M81, NGC 3379, NGC 4697, and NGC 4278) and the Milky Way. We detected 185 X-ray sources in 1615 GCs, 36 sources in the nucleus of M31, and 998 sources in the fields of galaxies (of which ≈ 365 are expected to be background AGN). These sources were used to produce the average luminosity distributions of different populations. In doing so we took special care to accurately subtract resolved CXB sources and correct for incompleteness effects. As a result, we produced XLFs of LMXBs with a statistical accuracy that far exceeds what has been achieved in previous studies.
We demonstrate that, although the luminosity distributions of LMXBs in different environments are similar in a broad sense (e.g., when compared with XLF of HMXBs), their detailed shapes are different. Although the fraction of faint LMXBs (log(L X ) < 37) in GCs is ∼ 4 times smaller than in the field, in agreement with a suggested effect found in previous studies, the difference in their XLFs cannot be described merely in terms of a roll over of the XLF of GC sources. Rather, the luminosity distributions of these two populations of LMXBs appear to be different throughout the entire luminosity range. This may present a challenge for the models suggesting that the entire LMXB pop-ulation was formed dynamically in GCs and then expelled to the field due to kicks, dynamical interactions, or GC destruction.
We also compare luminosity distributions of LMXBs in the nucleus of M31 (its inner 1 ′ ) and in GCs. We find that although their shapes at the low-luminosity end are similar (and different from the field sources), the M31 nuclear population appears to have far fewer luminous sources than GCs (and field population). For example, the most luminous source in the nucleus of M31 has the luminosity of 4.7 × 10 37 erg/s. If the XLFs were drawn from the same parent distribution, we would expect to see 11 sources above this luminosity, whereas we found none. Different estimates of the statistical significance of the difference between the two XLFs give results in the ∼ 2.5 − 3σ range. The difference between the XLFs is likely caused by the factor of ∼ 10 − 20 difference in stellar velocities in GCs and galactic nuclei, which leads to different dynamical formation channels. However detailed population synthesis calculations are needed in order to understand the particular mechanisms responsible for forming the observed luminosity distributions.  (1) -the sequence number.