{'fraction_non_alphanumeric': 0.03345968800116635, 'fraction_numerical': 0.015089663216212275, 'mean_word_length': 4.751991614255765, 'pattern_counts': {'":': 0, '<': 20, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Building an Optimal Census of the Solar Neighborhood with Pan-STARRS Data

We estimate the fidelity of solar neighborhood (D<100 pc) catalogs soon to be derived from Pan-STARRS astrometric data. We explore two quantities used to measure catalog quality: completeness, the fraction of desired sources included in a catalog; and reliability, the fraction of entries corresponding to desired sources. We show that the main challenge in identifying nearby objects with Pan-STARRS will be reliably distinguishing these objects from distant stars, which are vastly more numerous. We explore how joint cuts on proper motion and parallax will impact catalog reliability and completeness. Using synthesized astrometry catalogs, we derive optimum parallax and proper motion cuts to build a census of the solar neighborhood with the Pan-STARRS 3 Pi Survey. Depending on the Galactic latitude, a parallax cut pi / sigma pi>5 combined with a proper motion cut ranging from mu / sigma mu>1-8 achieves 99% reliability and 60% completeness.


INTRODUCTION
The next generation of synoptic sky surveys (Panstarrs, Kaiser 2004;lsst, Tyson 2002) will have the necessary astrometric precision and time cadence to measure parallax for sources in the solar neighborhood (D 100 pc). These parallax measurements will be among the most useful signals in building a census of the local stellar environment. Other popular methods for identifying nearby objects (e.g., selection based on proper motion or color-magnitude constraints) do not unambiguously constrain distance, and require follow-up spectroscopic and/or astrometric observations. Furthermore, such selection criteria are ineffective at discovering sources with extreme properties. For example, a bright L dwarf within 10 pc was only recently discovered in the Sloan Digital Sky Survey; it was not found in previous color-based searches because of its unusually blue spectral energy distribution (SED) (Schmidt et al. 2010;Bowler et al. 2010). Deep, all-sky parallax surveys promise to identify nearby objects, regardless of any unusual photometric properties, without follow-up telescope investment.
Currently, the Hipparcos and Tycho catalogs are the only all-sky parallax databases (Perryman et al. 1997). While these catalogs are precise, they are also shallow (m v 12) and hence biased towards bright, high mass objects. The Pan-starrs 3π Survey (Magnier et al. 2008) is a deep, ground-based synoptic survey that will significantly extend the Hipparcos catalogs. The 3π Survey will observe 3/4 of the sky 60 times over the course of 3 years, and will provide 5-band (grizy) photometry for objects in the range 15.3 < m r < 22.8 1 . The survey has an astrometric error floor of 10 milliarcseconds (mas) per exposure, resulting in a stacked parallax sensitivity of σ π ∼ 2 mas per source.
This survey will yield a much more complete census of beaumont@ifa.hawaii.edu, eugene@ifa.hawaii.edu 1 Expected detection limits in the gizy filters are 23.4, 22.2, 21.6, and 20.1, respectively the low mass objects in the solar neighborhood. The first Pan-starrs telescope (PS1 2 ) saw first light in 2007, and the PS1 science mission began on May 1, 2010.
The 3π Survey will be deeper but less astrometrically precise than the Hipparcos catalogs. This poses a unique challenge for identifying nearby objects in Pan-starrs data. Distant objects are far more numerous than nearby ones and, because of astrometric measurement errors, will occasionally display false parallax signals. Thus interlopers -distant objects with spuriously large parallax measurements -will outnumber accurate but small parallax measurements. The focus of this paper is to quantify this effect, and explore how additional proper motion cuts can break the ambiguity between interlopers and legitimate solar neighbors.
Interloper confusion is a manifestation of the Lutz-Kelker bias (Lutz & Kelker 1973), so we begin with a review of that phenomenon in §2. A preliminary analysis of the Lutz-Kelker bias suggests that sources more distant than 80 pc will be difficult to reliably extract from Pan-starrs data using parallax alone; this is a stricter limit than the 100 pc horizon assumed in previous estimates of Pan-starrs' solar neighborhood performance (Magnier et al. 2008;Dupuy & Liu 2009). Thus, in §3 we simulate to what extent additional proper-motion cuts can suppress interlopers, and what effect these selection criteria have on catalog completeness.
We find that cuts based on proper motion and parallax are more effective than cuts based on parallax alone. We estimate that high reliability (99%) catalogs derived from Pan-starrs data will be approximately 60% complete, and that catalogs with 50% reliability will be 85% complete. Trumpler & Weaver (1953) first noted that parallax The bars show a hypothetical parallax histogram for two classes of objects, the more distant of which is also more numerous. When the parallax of each source is observed in the presence of noise, the resulting histograms spread out into the gaussian curves shown in the figure. The group of objects measured to have parallaxes of π ′ (the dotted line) consists mostly of the more-numerous (red) sources. Thus, on average, π ′ is an overestimate for sources measured to have this parallax. measurements tend to systematically underestimate true distances. This effect was subsequently analyzed in detail by Lutz & Kelker (1973), and has become known as the Lutz-Kelker bias (hereafter LK). The LK bias is a consequence of the fact that distant stars are more numerous than nearby ones. To understand this on an intuitive level, consider the illustration in Figure 1. The red and blue bars denote parallax histograms for two classes of objects: a large group of distant objects (red bar), and a smaller group of nearby objects (blue bar). The curves show how these histograms change when the parallax is measured in the presence of noise -objects scatter away from their true values. Now consider the parallax value π ′ located midway between each bar (the dotted line). There are more objects from the red group at this position than from the blue group. Thus, objects with measured parallaxes of π ′ have, on average, actual parallaxes smaller than π ′ . This illustration can immediately be generalized to continuous distributions of stellar distances; when the distribution of stars increases with distance, measured parallaxes underestimate true distances.

THE LUTZ-KELKER BIAS
To quantify this effect, we follow Haywood's (1987) approach and use Bayes' theorem to express the probability distribution of an object's distance, constrained both by a parallax measurement and a-priori knowledge of how objects are distributed in space: P (D|π) ∝ P (π|D)P (D) = N (π; D −1 , σ π )P (D) (1) P (D|π) is the posterior probability, or the probability distribution of an object's true distance, constrained by a parallax measurement of π. P (π|D) is the likelihood of measuring π, assuming the true distance is D. The likelihood is derived from measurement errors, which we assume to be Gaussian. In this case, the likelihood is given by N (π; D −1 , σ π ), the Normal Distribution with mean D −1 and standard deviation σ π , evaluated at π. The prior distribution P (D) is the intrinsic distribution of objects as a function of distance, or dN/dD. In an observation of solid angle Ω, this number is given (to -The behavior of the Bayesian estimator given by Equation 1, assuming a measurement error of σπ = 2 mas. The three curves trace different lines of sight; through the Galactic center (solid line), in the Galactic plane along ℓ = 90 o , and out of the Galactic plane. Top: the mean distance of objects measured to have a parallax of 1/π; this diverges from the value of 1/π as that number grows. Bottom: the probability that an object's distance is >150% the value implied by the parallax measurement.
within a normalization constant) by dN = ΩD 2 n(D)dD (2) Here, n(D) is the number density of objects as a function of D. Figure 2 shows the behavior of Equation 1, assuming that σ π = 2 milliarcseconds (mas); this is the estimated maximum precision of the Pan-starrs 3π Survey (see the Appendix). The top panel plots the mean value of Equation 1 for three different expressions for n(D). They correspond to three lines of sight: one towards the Galactic center, one out of the Galactic plane, and one away from the Galactic center. Equations for the stellar number density are derived from the Galactic parameters given in Bochanski et al. (2010). These three lines of sight bracket the behavior of n(D), which increases most rapidly towards the Galactic center, and decreases most rapidly out of the plane. Note that the mean distance of Equation 1 diverges from the parallax estimate when 1/π 70 pc.
The bottom panel plots a similar function: the probability that the true distance is more than 150% the value implied by the parallax. Again, this probability becomes substantial around 1/π 80 pc. Previous estimates of Pan-starrs yield (Magnier et al. 2008;Dupuy & Liu 2009) have assumed that parallax catalogs will be complete out to 100 pc: a volume twice as large as the 80 pc sphere at which interloper confusion becomes problematic.
The limitations of parallax-selected catalogs at moderate distances raises the question of whether other quantities might help to increase catalog reliability, without excessively compromising completeness. Two promising quantities include source color (since the solar neighborhood is dominated by red, low mass stars) and proper motion. In the present work, we estimate the quality of solar neighborhood catalogs derived from the Panstarrs 3π Survey, when both parallax and proper motion are used to identify nearby objects.
3. PROPER MOTION CUTS The Bayesian formalism above can, in principle, be extended to study how proper motions further constrain distance. However, doing so requires defining a prior function that realistically models the joint distribution of stellar distances and proper motions (that is, P (D) is replaced by P (D, µ) in Equation 1). Furthermore, we wish to employ a realistic astrometric error model, which depends on source flux. In total, a fully analytic Bayesian treatment would require defining a 8-dimensional prior distribution (distance, proper motion in two dimensions, and flux in 5 Pan-starrs filters), and marginalizing over 7 of them. We opt instead of a more straightforward numerical approach using simulated Pan-starrs source catalogs. This is more tractable, and allows us to utilize existing research into synthesized models of the Galaxy.
Our approach is as follows. First, we generate catalogs of intrinsic source properties (luminosity, color, velocity, and distance). We then assign astrometric uncertainties and calculate, given a certain set of parallax and proper motion selection criteria, the probability that each source would be measured to satisfy these cuts. By summing these probabilities, we arrive at the expected number of sources included in the solar neighborhood catalog. Finally, we can compare this number to the actual number of nearby objects in the catalogs to measure the performance of the classification strategy.
Our synthesized catalogs have been generated from the Besançon model of the Galaxy (Robin et al. 2003) 3 . This model accurately represents our current knowledge of how stars are distributed in space, velocity, mass, and age. Table 1 summarizes the parameters we have used when querying the Besançon model service. We have generated catalogs for three different positions on the sky: (l,b) = (90, 0), (180, 0), and (0, 90). We avoid analyzing lines of sight near Galactic center for three reasons: the very high density of sources makes the analysis cumbersome; the Pan-starrs survey will be confusionlimited towards this region and hence difficult to analyze statistically; and the region is compact on the sky, and hence not a significant source of nearby objects.
For each entry in these catalogs, we calculate the (noise-free) parallax, proper motion, and magnitudes in the Pan-starrs (g,r,i,z,y) filter system. We also determine the estimated error on each of these quantities. The details of this process are covered in the Appendix.
We next calculate the probability that any object would be selected by some cut on parallax and proper motion, when those sources are measured in the pres-3 http://model.obs-besancon.fr/ ence of realistic noise. We assume that all measurement errors are Gaussian, so that the probability of measuring a parallax greater than some threshold π t is obtained directly from the Gaussian cumulative distribution function. We also consider the probability that the proper motion (that is, µ ≡ µ 2 x + µ 2 y ) exceeds some threshold µ t . When µ x and µ y are measured with uncertainty σ µ , this probability is given by where χ 2 (x, ν, λ) is the non-central chi-square distribution, with ν degrees of freedom and non-centrality parameter λ, evaluated at x (Patnaik 1949).

Defining Completeness and Reliability
The task at hand is to choose some combination of selection criteria on π, µ, and the errors on these quantities, to optimize the solar neighborhood catalog. To do so, we define the quantities reliability and completeness to describe catalog fidelity. These are application-dependent concepts, and different definitions lead to different "optimal" selection criteria. We wish is to assess the utility of Pan-starrs data in identifying objects within the solar neighborhood, so we use the following operational definitions for completeness and reliability: The completeness of the Pan-starrs solar neighborhood catalog is defined to be the fraction of observable objects within 100 pc that are included in the catalog. An object is said to be observable if it is detected but not saturated in at least one filter at each epoch. The value of 100 pc is chosen for consistency with previous studies (Dupuy & Liu 2009), and represents a ∼ 5σ parallax detection for bright sources (see the Appendix). The reliability is defined as the fraction of the catalog occupied by sources with true distances less than 200 pc. Note the "buffer" from 100-200 pc; this is designed so that only sources substantially more distant than 100 pc degrade the reliability. Including a source within 200 pc does not compromise a catalog's census of nearby objects. However, a source beyond 200 pc displays a parallax signal measured at < 2.5σ significance, and hence would not be considered a "detection" by most criteria.
In summary, the completeness gives the probability that a nearby source is in the catalog (provided it was detected photometrically); the reliability gives the probability that a random catalog object is indeed in the solar neighborhood.
We have subjected the catalogs described in the previous section to several filtering strategies, and measured the completeness and reliability for each strategy. Each strategy combines three different cuts: an absolute parallax cut (1/π < 200 pc, or π > 5 mas), and a cut in relative parallax and proper motion (π/σ π > x, µ/σ µ > y). We sampled a grid of strategies, ranging from 0 < x < 7 in steps of 1 and 0 < y < 30 in steps of 5. We also sampled a sub-region 2.5 < x < 5 in steps of 0.2 and 0 < y < 9 in steps of 0.5. In each simulation, any object meeting all criteria (absolute parallax, relative parallax, and relative proper motion) is labeled as a nearby source. Figure 3 plots the completeness (greyscale) and reliability (red contours) for different selection criteria and fields. Consider first the completeness for each field. As expected, completeness decreases monotonically for increasing cut strength. Note that the b = 90 o field is less sensitive to proper motion cuts. This is because proper motion measurements for lines of sight at high latitudes trace motion parallel to the plane, while measurements at low latitudes are more sensitive to vertical motions. Because velocities in the plane are faster than those out of the plane (both in absolute terms and relative to the solar motion), objects towards b = 90 o display higher proper motions, and proper motion cuts have less of an effect on completeness in this field.

RESULTS
The reliability varies more substantially between the three fields. As was seen in Section 2, lines of sight closer to the Galactic center display lower reliability for a given selection strategy; this is due to increased contamination from distant objects. Especially in the range π/σ π > x, 2 < x < 5, more aggressive proper motion cuts increase reliability. Furthermore for µ/σ µ > y, y < 10, these cuts have little impact on completeness. Figure 3 presents an opportunity to identify optimal filter strategies, by maximizing completeness along contours of constant reliability (or vice-versa). Figure 4 displays the results of this optimization. It shows the maximum completeness obtainable for any given reliability. Also shown in dotted lines are the optimal strategies without proper motion cuts. For most values of reliability, proper motion cuts increase the completeness by 5 − 10%. Because non-optimal strategies fall below these curves -and because the curves are monotonic -Figure 4 also displays the maximum reliability for a given completeness. Especially for high completeness values, stronger proper motion cuts improve reliability by >10%.
Proper motion provides the greatest benefit to lines of sight in the Galactic plane. This is where interloper confusion is most severe, and where additional constraints help to resolve the confusion. Conversely, proper motion filtering has little impact on lines-of-sight out of the plane. Table 2 lists the specific strategies that lead to the curves in Figure 4. In general, high reliability strategies combine 5σ parallax cuts with 1-8 σ proper motion cuts, depending on Galactic latitude. The completeness (greyscale) and reliability (red contours) for different selection criteria and lines-of-sight. Proper motion cuts have the greatest benefit for π/σπ > x, µ/σµ > y in the range 2 < x < 5 and y < 10. In this region, more aggressive proper motion cuts improve reliability, and has little impact on completeness.   Figure 4 demonstrates that parallax and proper motion cuts lead to more complete and reliable solar neighborhood catalogs than strategies based on parallax cuts alone. This is true mainly because proper motion selection is effective at identifying the false parallax signals discussed in Section 2. While parallax provides the best quantitative constraint on distance, proper motion is effective at discriminating between distant sources and those in the solar neighborhood.
The main disadvantage of proper motion selection is that, unlike parallax, there is not a one-to-one relationship between proper motion and distance. Because of this, proper motion selection necessarily introduces biases into the extracted catalog. For example, interlopers in a proper-motion selected catalog will be biased towards population II stars, on higher-velocity orbits through the Galactic potential. In addition, nearby sources on orbits similar to the sun's will be culled.
An alternative strategy would incorporate color cuts to suppress interloper confusion. This would affect the resulting catalog in a different way; color cuts would bias against unusually red or blue sources. Depending on the science application, this bias might be less desirable than the bias introduced by proper motion cuts; extreme colors imply unusual and potentially interesting physical conditions in the (sub)stellar atmosphere.
Finally, we note that while the above simulations illustrate how to design complete and reliable source catalogs, the quantitative performance of each strategy depends on the specific error properties of the data. We have assumed sensible noise parameters describing the Panstarrs 3π Survey, but these parameters are likely to evolve as the survey matures. In addition, different scientific motivations will lead to different operational definitions for completeness and reliability. Both of these factors will change the detailed performance of each strategy. Thus, we recommend repeating simulations like these when deriving the final solar neighborhood catalogs from Pan-starrs data.
6. CONCLUSION In this report we have investigated to what extent the Pan-starrs 3π Survey will be able to reliably identify nearby objects (D <100 pc). We have argued that identifying such objects by parallax alone is not optimal; such a strategy is substantially contaminated by interlopers, due to the fact that nearby sources are so heavily outnumbered by distant ones. Because of these interlopers, Pan-starrs parallax measurements will be ineffective at identifying nearby objects more distant than 80 pc (assuming σ π = 2 mas; Section 2). Additional proper motion cuts are able to further discriminate between nearby and distant objects. We have derived a set of optimal strategies incorporating both parallax and proper motion cuts, which maximize completeness for a given level of reliability (and vice-versa). We estimate that 99% reliable catalogs will be 60% complete, while catalogs at 50% reliability will be 85% complete.
Compared to other possible cuts (e.g. selection on color) we suspect that proper motion cuts are less susceptible to biasing against finding as-yet unidentified classes of objects in the solar neighborhood; these putative objects may well have unusual colors, but would mostly display typical proper motions.
We thank T. Dupuy for helpful discussions about Panstarrs sensitivity calculations, and A. Robin for discussions about the Besançon model.  Magnier et al. 2008 andOnaka et al. 2008. b Epochs per filter. Due to gaps in the focal plane array, the average object will be detected in 80% of the epochs. c Specific to the 3π Survey

SYNTHESIZING PAN-STARRS MEASUREMENTS FROM THE BESANÇ ON CATALOGS
The Besançon model generates realistic synthesized catalogs of sources one might observe at a given location on the sky. Because we are interested in the specific performance of the PS1 3π Survey, we determine apparent magnitudes in the Pan-starrs (g,r,i,z,y) system and, from these quantities, the corresponding astrometric errors. Relevant parameters describing the Pan-starrs PS1 telescope, Gigapixel Camera, and 3π Survey are provided in Tables 3 and 4 (Onaka et al. 2008;Magnier et al. 2008;Dupuy & Liu 2009).
The Besançon catalogs return magnitudes in the CFHT Megacam photometric system. The Pan-starrs and Megacam g filters are similar, so we accept the g magnitude included in the catalog by default. To determine fluxes in the other bands, we derive colors for each star by convolving a representative stellar spectrum with the Pan-starrs filter throughput profiles. We follow the same process discussed in Dupuy & Liu (2009), and the spectra we use come from Pickles (1998). We approximate the white dwarfs in the Besançon catalogs as blackbodies, and AGB stars as class I M5 giants. We manually model interstellar reddening via an extinction rate of 0.7 mag A V kpc −1 , and an extinction curve from Cardelli et al. (1989). Lines of sight are only reddened while they are within 300 pc of the Galactic plane, since this is where most Galactic dust is confined. Note that the photometric quantities themselves are not directly used in our analysis; they are used merely to derive astrometry errors, and to determine detection and saturation limits.
To determine the Poisson noise associated with each source, we convert apparent magnitudes to photo-electron counts given the parameters in Tables 3 and 4. We assume photometry is performed via PSF fitting, such that all photo-electrons from the source are used when estimating the Poisson source noise.
We include two additional sources of noise: Poisson noise from the sky, and read noise. For PSF-fitting photometry, the effective area of sky sampled for noise estimates is 4πσ 2 psf (Mighell 2003). The total number of sky photoelectrons measured with each source is given in Table 4. By adding the source-, sky-, and read-noise terms in quadrature, we arrive at the photometric signal-to-noise ratio for each measurement.
We model two sources of astrometric error. The first is due to the broadened point spread function (PSF) induced by the atmosphere, which we take to be Gaussian. The ability to determine the center of this Gaussian is given approximately by (Mighell 2003) σ where σ psf is the width of the PSF and SNR is the signal-to-noise ratio derived above.
The second astrometric noise source reflects the fact that the PSF centers are randomly displaced from their true centers because of turbulent atmospheric refraction (Christou et al. 2003). Most of this refraction is correlated among nearby stars, and can be corrected for during data reduction. However, the differential refraction between nearby sources (known as tilt isoplanatism) is not correctable. This adds a random offset to each stellar position, and sets an error floor (σ 2 ) for each exposure; this error dominates σ 1 for bright sources. The Pan-starrs error floor is approximately 10 mas per exposure (Magnier et al. 2008). Assuming that this is also Gaussian distributed and statistically uncorrelated with σ 1 , the net astrometric error per epoch is given by Equation A2 gives the positional error for a single observation, in a single filter. We are mainly interested in the parallax and proper motion uncertainty, given several position measurements with uncertainty σ. From the Central Limit Theorem, for sufficiently large N we expect where N is the number of observations, σ is given in equation A2, and t baseline is the time baseline of the observations in years (since proper motion is reported in units of angular displacement per year). As Table 3 indicates, each field will be observed 12 times in each of 5 filters, over a period of 3.5 years. Because gaps fill 20% of the focal plane array, the average source within this field will be observed 9.6 times.
We determine the constants of proportionality for Equation A3 in a Monte Carlo fashion, by fitting parallax and proper motion to many collections of synthetic observations. While σ π varies somewhat with position on the sky, the two constants of proportionality are given approximately by 1.3 for σ π and 3.5 for σ µ . The proper motion error corresponds to the uncertainty along each direction.
To summarize, then, equation A3, combined with the constants of proportionality given above, give the per-filter, stacked error in parallax and proper motion. These errors can be further reduced by stacking the signal from each filter. We thus compute the standard error of the weighted mean of the five per-filter parallax estimates. This number finally gives the parallax and proper motion uncertainty for each object in the catalog.
As an example, consider a bright source ( σ psf SN R ≪ 1 for every filter). Then, from equation A2, σ = σ 2 = 10 mas, per filter, per exposure. Using equation A3, the net per-filter parallax uncertainty is σ π = 1.3 × 10/ √ 9.6 = 4.2 mas. Since each filter has the same uncertainty in this case, the standard error on the weighted mean of the five per-filter measurements is σ π = 4.2/ √ 5 = 1.88 mas. Note that, in general, the five per-filter uncertainties need not be the same -SNR often varies across filters.