{'fraction_non_alphanumeric': 0.029037494763301214, 'fraction_numerical': 0.01597193129451194, 'mean_word_length': 4.557770663562282, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Non-Thermal emission from the photospheres of Gamma-Ray Burst outflows. I: High frequency tails

We study the spectrum of high frequency radiation emerging from mildly dissipative photospheres of long-duration gamma-ray burst outflows. Building on the results of recent numerical investigations, we assume that electrons are heated impulsively to mildly relativistic energies by either shocks or magnetic dissipation at Thomson optical depths of several and subsequently cool by inverse Compton, scattering off the thermal photons of the photosphere. We show that even in the absence of magnetic field and non-thermal leptons, inverse Compton scattering produces power-law tails that extend from the peak of the thermal radiation, at several hundred keV, to several tens of MeV, and possibly up to GeV energies. The slope of the high-frequency power-law is predicted to vary substantially during a single burst, and the model can easily account for the diversity of high-frequency spectra observed by BATSE. Our model works in baryonic as well as in magnetically dominated outflows, as long as the magnetic field component is not overwhelmingly dominant.


INTRODUCTION
Understanding the origin of the prompt emission of Gamma-Ray Bursts (GRBs) has been hampered by two major challenges that have proven formidable obstacles despite more than four decades of studies. Radiating photons from an ultra-relativistic jet requires first a mechanism to convert at least some of the bulk kinetic energy into thermal motion of electrons, second a mechanism to radiate the electrons' energy into photons. These two processes are known as the problem of the dissipation mechanism and of the radiation process.
The standard model that has been developed over the years assumes that internal shocks are responsible for the dissipation , while electrons gyrating in a shock-generated magnetic field produce the radiation via the synchrotron process Piran 1999;Lloyd & Petrosian 2000). Both mechanisms are fraught with numerous problems.
Internal shocks assume that the outflow is released by the central engine with fluctuations in the Lorentz factor, so that different parts of the flow collide with each other, producing shocks that dissipate energy. Unfortunately, the internal shock mechanism has very little predictive power, since any behavior of the light curve can be explained by a suitable choice of the ejection history of the central engine. Since the physics of the emission from the engine is largely unconstrained, it is very hard to disprove internal shocks based on any observation. The only robust prediction of internal shocks as a dissipation mechanism is the low efficiency of the process (Kobayashi et al. 1997;Lazzati et al. 1999;Spada et al. 2000), due to the fact that internal shocks can dissipate only the energy associated with differential motions and not the energy associated to the bulk motion, which is much larger. Observations, instead, show that at least for a fraction of bursts, the efficiency of the prompt phase is 50 per cent, if not higher (Zhang et al. 2007). An alternative model that is becoming increasingly popular is magnetic dissipation in a Poynting dominated outflow (e.g., Thompson 1994;Spruit et al. 2001;Giannios & Spruit 2005). Even though magnetic dissipation could in principle provide very high efficiencies, it is, again, a very uncertain process and as such provides very little predictive power to allow for meaningful comparisons with observations. Synchrotron radiation, with possible self-Compton components, has long been considered the best candidate to explain the prompt emission of GRBs. While synchrotron radiation can easily explain the non-thermal nature of the observed spectrum, more thorough scrutiny reveals several important problems. First, optically thin synchrotron emission has a very well defined limiting slope α ≥ −1/3 (where F(ν) ∝ ν −α ) due to the synchrotron radiation spectrum of a single electron (the so-called line of death of synchrotron emission). However, at least several cases of GRBs with α < −1/3 have been detected (Crider et al. 1997;Preece et al. 1998;Ghirlanda et al. 2002Ghirlanda et al. , 2003. Second, the typical slope of the lowfrequency part of the GRB spectrum is α = 0 (Kaneko et al. 2006), which is not a natural slope of synchrotron radiation from shock-accelerated electrons. Third, the high frequency spectrum has a highly variable slope β, not easily explained by synchrotron radiation from shock accelerated electrons that should produce a fairly standard spectrum with α ∼ 1 (as in the X-ray afterglows). Finally, for the prompt emission to be efficient, electrons are expected to cool fast , but the typical slope of cooling electrons (α = 1/2) is not observed in GRB spectra (Kaneko et al. 2006).
These well known difficulties of synchrotron emission have favored the study of various alternatives, including quasithermal Comptonization , jitter radiation (Medvedev & Loeb 1999;Medvedev 2000;Workman et al. 2007;Morsony et al. 2008), bulk Compton ; and photospheric emission (Mészáros & Rees 2000;Mészáros et al. 2002;Pe'er et al. 2005Pe'er et al. , 2006Giannios 2006;Giannios & Spruit 2007;Pe'er et al. 2007;Thompson et al. 2007;Ryde & Pe'er 2009). In this paper we expand the analysis of photospheric emission as a GRB prompt radiation mechanism, studying the conditions under which the photosphere can produce a high-frequency component with a non-thermal power-law shape up to tens of MeV. Photospheric radiation has two great advantages with respect to synchrotron emission: it does not require a dissipation mechanism and it naturally provides high efficiency. Photospheric radiation does not require a dissipation mechanism if the radiation is released before the full acceleration of the fireball and therefore at a stage when the fireball still contains a large fraction of internal energy. Numerical simulations have shown (Lazzati et al. 2009, hereafter LMB09) that this is indeed the case for long duration GRBs with a massive star progenitor. The photospheric efficiency of a typical GRB was found to be in good agreement with the observations (LMB09; Zhang et al. 2007). The obvious weakness of photospheric radiation is that it is customarily assumed to be thermal, therefore lacking the prominent non-thermal tails observed in GRBs.
The possibility of adding non-thermal tails to the photospheric spectrum has been investigated before. Pe'er et al. (2006) showed that continuous dissipation and/or internal shocks at moderate optical depths give rise to a Comptonized spectrum with a flat energy spectrum νF(ν) ∝ ν 0 . Giannios (2006, see also Giannios & Spruit 2007) performed a similar study and reached analogous conclusions, focusing on magnetic reconnection as the dissipation mechanism. Here we argue that a dissipation mechanism that manages to be so continuous as to keep the electron temperature at a constant equilibrium value under the intense cooling of IC scattering is very unlikely. A more realistic assumption is that subphotospheric electron heating takes place as a series of one or more episodes of impulsive acceleration and subsequent cooling. We show that in this case a non-thermal high-frequency tail is produced, characterized by a slope that is sensitive to a combination of various parameters and which is therefore expected to be highly variable during the prompt emission of GRBs.
This paper is organized as follows: in § 2 we discuss the origin of the non-thermal tails, in § 3 we discuss the propagation of the non-thermal spectrum in the optically thick subphotospheric plasma, and in § 4 we present Monte Carlo calculations of the model. We summarize and discuss our results in § 5.

FORMATION
If dissipation takes place in the highly optically thick phase of the GRB outflow, multiple scattering and absorptionemission processes are likely to thermalize the radiation and the baryons, producing a blackbody radiation spectrum at the same temperature of the baryons (e.g. Giannios & Spruit 2007). A more interesting case is the possibility of dissipation in the sub-photospheric zone, i.e. for optical depths of several. The sub-photospheric zone of a long-duration GRB is characterized by the domination of photons over baryons and leptons, a condition that, as we will see, is fundamental for producing power-law tails with variable slope. In a spherical or conical fireball expanding without dissipation (for which Γ = Γ 0 R/R 0 ), the comoving 4 baryon density below the satura-tion radius reads: whereṀ iso is the isotropic-equivalent mass loss rate of the central engine, R 0 is the nozzle radius, i.e., the radius at which Γ = 1, and R is the radius of the fireball. The photon density, assuming the spectrum is a pure blackbody at thermal equilibrium with the baryons, is given by: where L iso is the isotropic-equivalent luminosity of the central engine and a = 7.56 × 10 −15 erg cm −3 K −4 is the radiation density constant. The ratio of photon to baryon densities below the saturation radius is therefore independent of distance: where Γ ∞,3 is the asymptotic Lorentz factor of the fireball in units of 10 3 , R 0,7 is the nozzle radius in units of 10 7 cm, and L iso,52 is the isotropic-equivalent luminosity in units of 10 52 erg s −1 . Beyond the saturation radius, both the baryons and photons densities scale as R −2 (since the photon temperature scales as R −2/3 , e.g., Mészáros & Rees 2000) and the ratio is again constant out to the photosphere, where baryon and photons decouple. In any reasonable condition, the photon to baryon number density ratio of a GRB fireball is therefore in the hundreds of thousand. In the absence of pairs, this is also the ratio of photons to leptons. If pairs are present, the ratio can be altered, but the fact that there are more photons than leptons holds since only a fraction of all photons have enough energy to create an electron-positron pair (see below for more details). Numerical simulations of dissipative fireballs, where the dissipation is provided by the interaction of the outflow with the progenitor star, confirm this result. For example, LMB09 found a ratio of photons over electrons of ∼ 10 6 at the photosphere in their simulation of a typical GRB jet with a massive stellar progenitor. Under such conditions, a non-thermal spectrum can be generated by inverse Compton scattering of the thermal photons off mildly relativistic electrons. The mechanism of the formation of the non-thermal tail is the following. Consider a dissipation mechanism that produces a population of mildly relativistic electrons. For simplicity let us consider a population of thermal electrons with a typical Lorentz factor γ e . The mechanism can heat repeatedly the same electrons but it is not continuous, so that the electrons that are heated are allowed to cool before being re-heated. An example of such a mechanism is repeated shocking by weak shocks, such as those seen in LMB09. If the photons dominate over the electrons, the electron cooling is very fast and most of the photons never scatter off hot electrons, since by the time they scatter off an electron it has already been cooled through IC interactions with other photons. As a consequence, the peak frequency of the spectrum is not changed by the dissipation and subsequent IC process. However, a fraction ζ < 1 of the photons scatter off hot electrons and their energy is increased on average by a factor 4/3γ 2 e . An even smaller fraction of photons ζ 2 ≪ 1 is scattered twice by hot electrons and its energy is augmented by (4/3γ 2 e ) 2 . In this way, a non-thermal tail is built, connected to the peak of the original blackbody spectrum.
To compute the spectral index β of the high frequency tail 5 we proceed as follows. Let n γ be the comoving density of photons in the primary blackbody spectrum where the population of relativistic electrons is embedded. The peak of the F(ν) spectrum is proportional to n γ , since the total energy density in photons is ǫ ∼ n γ hν pk and the peak of the F(ν) spectrum is F pk (ν) ∼ ǫ/hν pk = n γ .
The number of photons scattered is proportional to the number of relativistic electrons times the number of scattering required to cool an electron. Since the energy extracted per scattering is on average 6 δE = 4/3γ 2 e hν, the number of scatterings required to cool an electron is Following the above reasoning it's easy to show that F(ν 1 ) ∝ n e n scatt where n e is the electron density and ν 1 is the frequency of the typical blackbody photons that have been scattered once ν 1 = 4/3γ 2 e ν pk . The power-law spectral slope is therefore given by: Figure 1 shows the value of the spectral index β as a function of the photon to electron ratio for a sample of combinations of the remaining two free parameters: the comoving peak of the blackbody spectrum hν pk and the typical Lorentz factor of the accelerated electrons. In all cases the spectral index grows logarithmically with the ratio of the photon to electron densities. Therefore, outflows very rich in the radiation component will have steeper power-law tails. A steepening of β is also observed for increasing comoving peak frequency. Finally, more energetic electrons give harder tails, at the price of carrying some bumpiness to the spectrum (see below). Figure 1 also shows that there is a limit to the photon to electron density ratio for which this mechanism is applicable. As we outlined above, the derivation is based on the assumption that the probability of a photon scattering off a hot electron is less than unity. Therefore, the condition of applicability reads: n γ /n e > n scatt or where ǫ γ and ǫ e are the energy densities in photons and electrons, respectively.

Repeated dissipation events
We have so far assumed that there is a single dissipation event that energizes the electrons that subsequently cool off the blackbody spectrum, producing a non-thermal highfrequency tail. It is however possible that the dissipation is intermittent, and the spectrum is processed by more than one population of hot electrons. For example, in the simulation of LMB09 at least 6 shocks are detected between the τ T = 4 region and the photosphere.
If all re-energizations are the same and the electrons always have the same typical Lorentz factor γ e , then the process repeats identically and repeated accelerations have the same effect as a lower photon to electron ratio. The spectral slope is therefore modified as: where n acc is the number of acceleration events.
If the different energization events produce electrons with different typical Lorentz factor γ e , and there is one energization that clearly dominates over the others, then the resulting spectrum is expected to be dominated by that energization. If, however, the energizations are similar but not identical to each other, is is hard to make any quantitative prediction. In § 4 we show with Monte Carlo calculations some examples of resulting spectra.

Magnetically dominated outflows
If the outflow is either unmagnetized or moderately magnetized so that the energy density of the magnetic field is lower than that of the radiation, the fact that the cooling is dominated by IC scattering is straightforward. Also in the case of U B > U rad , however, the cooling can be dominated by IC interactions if the peak of the synchrotron spectrum is selfabsorbed (Ghisellini et al. 1998;Giannios 2008). Let ǫ B be the ratio between the magnetic energy density and the radiation energy density ǫ B = U B /U rad . The intensity of the field is therefore where k is Boltzmann constant. The synchrotron selfabsorption coefficient for a thermal electron distribution is given by α ν = j ν c 2 /(2ν 2 kT ) (Rybicki & Lightman 1979), where the emission coefficient j ν at the synchrotron peak frequency is j νsyn = 0.03n e e 3 B/(m e c 2 ). At the synchrotron peak frequency ν syn = 0.07γ 2 e eB/(mc), the self-absorption coefficient reads: where kT = γ e m e c 2 has been used in the right hand term. Combining Eq. 9 with Eq. 8, we obtain: where ν 2 pk,keV is the peak of the thermal spectrum in units of keV. The optical depth for synchrotron self-absorption at the synchrotron peak frequency τ syn = α νsyn ∆R therefore reads: pk,keV = 10 6 where n e ∆R = σ −1 T at the photosphere. Equation 11 gives an optical depth much larger than unity for moderate values of γ e and for ǫ B not much larger than one, showing that our mechanism is applicable even to magnetically dominated outflows with ǫ B ∼ 100. High frequency power-law tails from synchrotron radiation are not expected given the absence of non-thermal electrons.
2.3. Outside the photosphere Even though we have derived the spectrum and applicability conditions for sub-photospheric dissipation, the unique requirement for this mechanism to work is that the electrons are cooled by IC scattering with only a fraction of the photons. This can naturally take place in the optically thin part of the spectrum. Outside the photosphere the number of IC scatterings per photon is < 1, however the number of IC scatterings per electron is still large. the condition for applicability of this derivation outside the photosphere reads: which, according to Eq. 3, can be a substantially small number. Therefore, the non thermal spectrum can be generated with this mechanism out to large radii, approximately 100 times bigger than the photosphere. This has important consequences for the extent of the spectrum at high frequencies.
If the episodic dissipation that we envisage here can take place at large radii, well outside the photosphere, the radiation up to GeV frequencies could be accounted for.

RADIATION TRANSFER IN THE COOLED ELECTRONS
The high frequency power-law tail is produced in a region of τ T ∼few. In a relativistically expanding medium, all photons undergo a number ∼ τ T of scattering off cold electrons before leaving the region (e.g., Pe'er et al. 2005). Since the change of energy of a photon scattering off a cold electron is on average δν/ν ∼ hν/m e c 2 , a cutoff in the spectrum at a comoving photon energy hν = 511/τ T keV is created. As long as the Thomson depth is not too high, the power-law tail is preserved up to several tens of keV, likely extending into the tens of MeV in the observer frame.
Another effect of photon propagation, once the non-thermal tail has been added to the blackbody spectrum, is the creation of electron-positron pairs via photon-photon collisions. If the pairs created in such a way do not outnumber the original electrons, the only effect of their creation is the absorption of all the photons above hν = 511 keV. This would introduce a cutoff at hν = 511 keV which is irrelevant since the downscattering off cold electrons discussed above introduces an even more severe cutoff in the spectrum. If, instead, the electronpositron pairs outnumber the original electrons, a pair photosphere is created at a larger radius (Pe'er & Waxman 2004; . Typically, the pair photosphere is located a factor 3-10 farther than the electron photosphere. The processes described in section 2 do not change if the opacity is provided by pairs rather than by electrons. The number of pairs, however, is not independent from the number of photons, since the pairs are created by photon collisions. The photon to pair density ratio can therefore be easily calculated: where β ′ is the slope of the spectrum that created the pairs and needs not be equal to β, the slope of the spectrum created once the pair photosphere has been established. The spectral slope β now reads: If, however, the cyclical process of creating the power-law tail, producing pairs from the photons above threshold, producing a new tail etc. takes place several or more times, it is likely that the spectrum will saturate such that β e + e − ∼ β ′ , resulting in a saturated slope:  Figure 2 shows the value of the spectral slope as a function of the peak frequency for a range of the electrons' Lorentz factor. Interestingly, in the vast majority of cases an episodically dissipative pair photosphere yields a spectral slope 1 < β sat < 1.5 in fairly good agreement with the observational results of BATSE (Kaneko et al. 2006).

MONTE CARLO SIMULATIONS
In the past two sections we have discussed the radiation properties in the comoving frame of the GRB outflow. In this section we move our reference frame to the observer and present Monte Carlo (MC) simulations of the radiation in the observer frame. In this frame, the spectrum depends on an additional free parameter: the bulk Lorentz factor of the fireball Γ. The MC code assumes that a blackbody spectrum of photons is embedded in a relativistically expanding slab of electrons with a certain Thomson opacity τ T . At the beginning of the simulation, the electrons are accelerated to a unique value of their random Lorentz factor γ e . The position of the photons, ten million per simulation, is initialized as a random location in the slab, and after each scattering it is updated according to the relevant distribution of traveled distances: where l is the distance traveled by a photon between scatterings and l 0 = τ −1 T is the mean free path of low frequency photons. The full Klein-Nishina cross section was used to compute l 0 as a function of the photon energy. At each scattering, the energy of the photon is modified in two possible ways. If the electron off which the scattering takes place is relativistic ((γ e − 1) > hν/m e c 2 ), the new photon energy is generated according to the IC energy spectrum for a single scattering reported, e.g., in Rybicki & Lightman (1979, Eq. 7.24). The Lorentz factor of the electron is also updated to take into account the energy given to the photon. If, on the other hand, the electron is non-relativistic, Compton scattering is assumed, and the new photon energy is computed from the Compton equation for a randomly generated scattering angle (e.g., Rybicki & Lightman 1979, Eq. 7.2). Also in this case the energy of the electron is updated accordingly to the energy loss of the photon.
Adiabatic energy losses are not included in the code because the cooling time scale of the electrons is much faster than the adiabatic time scale. The comoving cooling time scale of electrons is τ IC = 3(γ e − 1)m e c 2 4γ 2 e σ T caT 4 ∼ 4 × 10 −7 γ e − 1 γ 2 e T rad 10 7 K −4 s (17) while the comoving adiabatic time scale is of the order of seconds. Another effect that is not considered is the cooling of the photons as a consequence of the expansion of the electrons (adiabatic cooling of the photons).
Due to the small optical depths considered, this effect is also negligible. At each step the position of the photons is checked and all the photons that have reached the surface of the slab are collected in the output spectrum. The code is stopped when 1/3 of the photons are collected outside of the slab. The scattering is therefore computed well beyond the step at which all the electrons have cooled in order to properly take into account the radiation transfer into the cold electrons. The output spectrum is then processed to take into account the fact that the emission is produced on a spherically expanding surface. Figure 3 shows result of three MC runs for a GRB with observed peak frequency hν obs ∼ 500 keV and Lorentz factor Γ = 1000. The three runs are performed for dissipation at τ T = 2 and with different values of the photon to electron density ratio and typical electron Lorentz factor γ e . The figure shows that indeed a prominent power-law tail is added to the thermal spectrum. The tail extends to at least several tens of MeV in the observer frame, in good agreement with observations. The main difference with the predictions of § 2 is that the power-law slope is steeper by approximately 0.5. The predicted slopes are β = 1.23 (solid line), β = 1.53 (dashed line), and β = 1.98 (dotted line). However, the slopes measured in the figure are β = 1.72, β = 2, and β = 2.5, respectively. The reason for the discrepancy is that the equations of § 2 assume that the electrons remain at γ = γ e until they cool and disappear. In reality, photons that scatter more than once off a hot electron are likely to find the electron slightly cooled at the second scattering. This has the effect of producing a slightly steeper power-law slope. As we will see in the following, this can be cured by assuming that there are more soft photons (so that not all scattering extract the same energy from the hot electrons). Figure 4 shows instead a comparison between the solid line of Fig. 3 and two analogous simulations in which the dissipation is assumed to take place at a higher optical depth τ T = 8 and τ T = 16. As expected, the three spectra are virtually identical at low frequencies, but the τ T = 8 spectrum has a cutoff at ∼ 40 MeV and the τ T = 16 spectrum has a cutoff at ∼ 10 MeV due to direct Compton scattering. Figure 5 shows a comparison of spectra with analogous characteristics but with different observed peak frequencies and bulk Lorentz factors. The figure confirms that the mechanism can reproduce spectra with both low and high peak frequency. An interesting feature that can be seen in Fig. 5 is the bumpiness of the dotted spectrum. It turns out the spectrum looks bumpy for γ e ≥ 3, i.e., when the photon energy gain per scattering is larger than an order of magnitude.

Repeated dissipation events
If the spectrum is produced by multiple dissipation events with different characteristics (different value of γ e ), the analytic predictions do not work and only a numerical calculation can give the appearance of the final spectrum. Figure 6 shows the outcome of two possible situations, one in which there is a dissipation event which dominates and another in which the three dissipation events are comparable in strength (and, therefore, γ e ).
The solid line shows the results of a MC simulation in which three energization events are considered: a small one, yielding γ e =2; an intermediate one, yielding γ e = 5 and a final small one, yielding γ e = 2. As qualitatively predicted, in that case the spectrum is dominated by the strong event. The main effect of the smaller events is to pre-broaden the input photon population, allowing for a smoother power-law rather than a bumpy one (compare to the dashed line in the same Figure 6). The same conclusion holds even if the three energizing events are characterized by fairly similar energetics: the resulting spectrum matches fairly well the prediction for a single energization with the largest γ e .

Non-thermal input spectrum
We have so far considered the spectrum arising from the Comptonization of a primary thermal spectrum. However, observed GRBs not only have non-thermal high frequency tails, they also have non-thermal low-frequency tails, with a typical α = 0 (where, again, F(ν) ∝ ν −α ; Kaneko et al. 2006). Non-thermal low-frequency power-law tails require a decoupling of the photons from the electrons below the photosphere and studying the origin is beyond the scope of this paper. In any case, it is interesting to see what is the consequence of a non-thermal low-frequency spectrum on the Comptonized high-frequency tail.
To investigate this issue, we performed MC simulations with thermal spectra modified to have a ν 1 and ν 0 lowfrequency behavior. We find that broadening the input spectrum has two important consequences. First, the slope of the Comptonized spectrum obtained is in better agreement with the prediction of Eq. 7. As seen in Fig. 7, the ν 1 input spectrum already hardens the power-law tail, while the ν 0 input spectrum provides an very good agreement with the prediction (shown with a thin dashed line). Figure 8 shows that besides the better agreement with the theoretical slope, allowing for a flat low-frequency input spectrum removes the marked oscillations (or humps) seen in the high-frequency tails in situations where the energy gain per scattering is large, again improving the agreement between the spectra in the figure and the observations.

Non-thermal relativistic electrons
We have so far assumed that the energy dissipation produces a thermal population of relativistic electrons characterized by a unique Lorentz factor γ e . In some cases, however, dissipation can lead to the acceleration of non-thermal electrons, with typical energy spectra dn e /dγ ∝ γ −p , with p ≥ 2. Whether or not the presence of the non-thermal electrons affect the spectra discussed above depends on the slope of the electron distribution and on the fraction of electrons that are contained in the non-thermal tail. The strongest influence on the spectrum is observed if all the electrons are accelerated in the non-thermal tail with a hard typical slope (e.g., p ∼ 2.3). In that case, the photons that IC scatter off hot electrons produce a steep non-thermal spectrum with slope β = (p − 1)/2 ∼ 0.65, β = p/2 = 1.15 or β = 0.5, depending on the cooling regime. Since the majority of the electrons do not scatter off hot electrons but rather off already cooled electrons, the power-law tail does not connect smoothly with the primary spectrum. The results of MC simulations of this scenario are shown in Figure 9. If the primary spectrum is assumed to be a pure blackbody, the Comptonized one has a prominent power-law tail that does not connect smoothly to the primary photons, creating a hardening of the spectrum that is not usually observed in GRBs (e.g. Kaneko et al. 2006). Only if a very soft input photon spectrum is assumed is a Band-like spectrum obtained (Fig. 9). It is clear, however, that the mechanism described in this paper produces spectra in better agreement with observations if the electron acceleration events contain only a moderate amount of energy and do not produce a sizable non-thermal tail in the electron population.

DISCUSSION
We have presented a method by which a primary blackbody spectrum of a GRB outflow photosphere can be Comptonized into a non-thermal high-frequency power-law tail. In this scenario, the bulk of the GRB prompt emission is thermal photospheric and the non-thermal tail contains a relatively small fraction of the radiation energy. The majority of the energy of the radiation is therefore released before it is converted into bulk kinetic energy, solving the problem of identifying a dissipation mechanism with high efficiency (LMB09). The non-thermal tail is produced by thermal electrons accelerated to mildly relativistic energies by an intermittent dissipation mechanism. The electrons are allowed to cool through IC interactions with the photon field between acceleration events. This dissipation mechanism is not required to have an efficiency larger than a few per cent, since the power-law tail only contains a fraction of the total energy of the radiation.The spectral slope of the high energy radiation depends on the typical Lorentz factor of the accelerated electrons, on the peak frequency of the thermal photon spectrum, and on the ratio of the photon to lepton density. Differently from previous work (Pe 'er et al. 2005Giannios 2006) we assume that the electrons are accelerated intermittently and not continuously and that the electrons are allowed to cool among acceleration events. In addition, we assume that the energy density in radiation is larger than that in the relativistic electrons, a situation that is easily realized in jets born inside massive progenitor stars (LMB09).
Compared to the standard optically thin synchrotron, this mechanism can explain the steep low-frequency slopes observed in the early phases of some bright bursts (Crider et al. 1997;Preece et al. 1998;Ghirlanda et al. 2002Ghirlanda et al. , 2003 and the transient thermal bumps detected is several events (Ryde 2005;Ryde & Pe'er 2009;Ryde et al. 2010). Bursts for which no dissipation takes place should not display any nonthermal features. A complete discussion of the low-frequency non-thermal tail is however beyond the scope of this paper and will be presented elsewhere. Explaining a typical lowfrequency tail F(ν) ∝ ν 0 is indeed a challenge for any model and not only for the photospheric scenarios presented here and elsewhere (Mészáros & Rees 2000;Mészáros et al. 2002;Pe'er et al. 2005Pe'er et al. , 2006Giannios & Spruit 2007;Pe'er et al. 2007;Thompson et al. 2007;Ryde & Pe'er 2009, LMB09).
Radiation from dissipative photospheres has been investigated before (Pe'er et al. 2005(Pe'er et al. , 2006Giannios 2006;Giannios & Spruit 2007;Beloborodov 2010). Giannios (2006) and Giannios & Spriut (2007) concentrate on the case of a continuous energy injection or "slow heating", different from our impulsive acceleration assumption. Pe'er et al. (2005Pe'er et al. ( , 2006 consider instead two possible scenarios: "slow heating" and impulsive heating by internal shocks. They find that the bulk of the photons are shifted in energy once a steady state electron population is attained. They calculate that, for a fairly wide parameter range, the comoving peak frequency is of few tens keV. Attaining such a steady state population requires however a large optical depth and as a consequence we do not find the same results. To understand the reason for this, consider an injection episode at an optical depth of a few. Due to IC scattering, the hot electrons are efficiently cooled and their energy given to a small fraction of photons that are shifted to high frequencies. For small optical depth, the energized photons reach the photosphere with only negligible losses and decouple from the electron population. The energy given to the electrons by the dissipation event is therefore given to a small number of photons that produce a power-law tail as shown in the figures. In order to obtain a steady state electron population able to exchange energy effectively with the radiation field, a large number of scattering per photon is required, so that the high-frequency photons can return their energy to the electron population. Large optical depths are therefore required for electron and photon populations to settle in a steady state configuration dictated by the balance of heating and cooling. Such optical depths are much larger than the ones envisioned in this work. In any case, a fraction of the dissipated energy is left in the electron population that thermalizes at a temperature higher than the one before the dissipation. For the parameters adopted in this paper the effect of the increased electron temperature is negligible because the increase of the electrons temperature is very small for the optical depths considered. Finally, Beloborodov (2010) investigated the radiation produced by a well-defined dissipation mechanism: nuclear and Coulomb collisions within a baryonic outflow with a substantial population of neutrons (see also Beloborodov 2003;Rossi et al. 2006). He finds that a typical spectrum with a high-frequency slope F(ν) ∝ ν −1.4 is obtained. Differently to our result, the non-thermal spectrum is due to the presence of non-thermal leptons.
A characteristic of any photospheric model is that the radiation is released at a small radius r ph ∼ 10 10−13 cm (e.g. . The main consequence of such a small radius is that the compactness of the region is large (Pe'er & Waxman 2004) and therefore photon-photon interactions result in the production of electron-positron pairs. This can have two consequences. If the newly created pairs do not outnumber the original electrons, the only consequence is the presence of a sharp cutoff in the spectrum at hν = 511 keV in the comoving frame (∼ 100 MeV observed). If, on the other hand, the pairs outnumber the original electrons, a new photosphere is created, typically at a radius 3 to 10 times larger than the original photosphere . The scenario we developed in this paper is not dependent on whether the photosphere is due to the original electrons or to pairs, the only difference being that a pair photosphere has a lower photon to lepton ratio and produces therefore a steeper high-frequency spectrum. In addition, since the number of pairs and the number of photons are not independent, we showed that a pair photosphere with at least several energization events would produce spectra with a typical slope 1 < β sat < 1.5, in good agreement with observations (e.g., Kaneko et al. 2006).
The Fermi satellite has recently shown that at least some bright GRBs have spectra extending well into the GeV regime (Abdo et al. 2009abc;Granot et al. 2010). For any reasonable combination of parameters, GeV radiation cannot be produced at the photosphere, since it would be immediately absorbed by photon-photon collisions to produce pairs. In this scenario, the GeV emission can be either internal, i.e. produced by dissipation above the photosphere (see § 2.2; Toma et al. 2010) or external, due to the interaction of the outflow with the interstellar medium (Kumar & Barniol Duran 2010;Ghirlanda et al. 2010;. In terms of predictive power, the most notable prediction of this model is the presence of substantial variability of the high-frequency spectrum due to the dependence of the spectrum on parameters that are expected to be highly variable such as, e.g., the peak frequency of the thermal spectrum in the comoving frame (LMB09). Such variability might be however hard to detect since it is expected to have short time-scales and would therefore be averaged out in a timeintegrated spectrum. The dependence of the spectral slope on the peak frequency of the spectrum opens also the possibility of correlations between the peak frequency and the spectral slope at high frequencies. Since, however, the slope depends on two more parameters (the ratio of photons to electrons and the typical Lorentz factors of the electrons) it is not obvious that such correlations should be visible in experimental data.
We would like to thank Gabriele Ghisellini, Dimitrios Giannios, and Bing Zhang for useful discussions and criticisms to an early version of this manuscript. This work was supported in part by NASA ATP grant NNG06GI06G, Fermi GI program NNX10AP55G and Swift GI program NNX06AB69G and NNX08BA92G.