{'fraction_non_alphanumeric': 0.02702702702702703, 'fraction_numerical': 0.0042152243987106375, 'mean_word_length': 4.824548736462094, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, '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}}
StellarICs: Stellar and solar Inverse Compton emission package

StellarICs is software to compute gamma-ray emission from inverse-Compton scattering by cosmic-ray leptons in the heliosphere and in the photospheres of stars. It includes a set of cosmic-ray spectra and a formulation of their modulation, but it can be used for any user-defined modulation model and lepton spectra. Inverse-Compton emission provides a unique probe of cosmic-ray leptons in the heliosphere between the earth and the sun. The software is publicly available and it is under continuing development.


Introduction
For the first time in 2006 [6,7] theorized the gamma-ray emission by inverse-Compton (IC) scattering of cosmic-ray electrons and positrons on the photon field of individuals stars. The importance of this emission mechanism was realized when apply to the closet star, the Sun. In fact, the Sun was predicted to be an extended source of gamma-ray emission, produced by IC scattering of cosmic-ray electrons on solar photons in [6], [5] and [7]. EGRET detected for the first time the solar emission from the quiet Sun [8], and now Fermi-LAT is so sensitive that even such weak emission can be detected with high significance and studied in detail [1]. Hence, propagation of leptons in the inner heliosphere can be investigated in detail. Inverse-Compton emission has a broad distribution on the sky with maximum intensity in the direction of the Sun, but extending over the entire sky at a low level. This emission is also important as a background over the sky to be accounted for in studies of Galactic and extragalactic gamma-ray emission 1 .
Most of the Galactic luminosity comes from luminous stars, which are rare. However, calculations of the Galactic IC emission have usually assumed a smooth interstellar radiation field. Instead, we expect [6,9] the interstellar radiation field, and hence the inverse Compton emission, to be clumpy. Also the predicted IC emission from Cygnus OB2 [7] was modeled for example as in [9], and it was found to contribute to the the emission from the Cygnus region observed by Fermi-LAT [2].
Given the relevance of this emission mechanism, It is important to have a reliable reference IC model available for general use. We present here our C++ software to compute IC scattering from the heliosphere, as well as the photospheres of stars. It includes a formulation of modulation in the heliosphere, but can be used for any userdefined modulation model. It outputs angular profiles and spectra to FITS files in table format in a variety of forms for convenient use. The software is publicly available 2 and is under continuing development. It is used in the Fermi-LAT Science Tools as a standard model for the solar IC emission as a background component [3].

Structure of the software
The software provides models of inverse-Compton emission from the heliosphere and the photosphere of individual stars. It includes energy loss rates and emissivity for any userdefined target photon and lepton spectra. It is written in C++ and is modular. There are C++ classes for IC cross sections, emissivity spectra, stellar radiation fields, electron and positron spectra. It can compute both isotropic and anisotropic IC scattering. A driver routine is provided and can be adapted by the user as required. New models of electrons, positrons and modulation can be easily added. It has an optimized emissivity computation for spectral integrations and it can be run in parallel; the computation parameters allow a user-defined compromise between high resolution and reasonable computation time. It is very flexible since it contains user-defined parameters (energy ranges, integration steps etc.). Output is provided as FITS files (in table format), in various forms: angular profiles, spectra and differential and integrated flux. Output as idl commands is also provided. It has been tested with GNU and Intel compilers, and optionally uses OpenMP for faster execution on multiprocessor machines. A sample output dataset is provided with the package to illustrate the format and check the installation.

Main program
An example file (solar ic driver.cc) is included in the package. This contains the parameters that can be edited by users depending on their requirements. This parameters to be defined are: energy range and grid factor for both cosmicray electrons and gamma rays, grid spacing (linear or logarithmic) of the angle from the Sun or the star, integration range and steps, parameters of the star (temperature, radius, distance), electron spectra models including cases with free parametrizations.

Computation
the class SolarIC contains the calculation of the IC emission integrated along the line of sight. It uses the input parameters from solar ic driver.cc, the electron spec- trum parametrization from LeptonSpectrum, the photon field of the star or Sun from StarPhotonField, as a blackbody source, and the IC cross-sections based on the Klein-Nishina formula from InverseCompton. The option to use a logarithmic angular grid is useful to resolve the rapid variation near the solar disk while still covering the full angular range required.

Electron spectra
The LeptonSpectrum class defines the electron and positron spectra and the model parameters are freely definable. Several sample models are provided, including those based on existing publications [8,5,1]. They will be regularly updated with new models. Modulation is described with the force-field approximation, but this can be freely extended to more realistic models.

Inverse Compton cross-sections
The class InverseCompton calculates the Cross-sections. Both isotropic and anisotropic Klein-Nishina cross-sections are included, as described in [4,8]. The Thompson crosssection is also included for a cross-check. The IC emissivity spectrum for a given lepton spectrum and radiation field is computed here, and this can be used for other applications such as interstellar emission. An energy-loss computation for a given radiation field is also available here.

Output files
The output is a FITS file with multiple extensions for convenient use e.g. directly with HEASARC's f v tool, or other plotting tools. Extension names and contents of the output FITS file and respectively units are listed in Table 1. Alternatively the FITS file can be read by any program using c f itsio, or output as ASCII using f v. To plot a differential solar spectrum, as for example in Figure 1, run a solar model, choose extension 6 and plot the appropriate column against angle. To plot solar profiles of integral intensity choose extension 2, and plot the appropriate column against angle, as in Figure 2.
In addition, the program outputs an idl program which generates spectra and profiles directly: this option has been used to generate the plots in this article.

Examples
Figs 1 and 2 show the solar spectrum at various angles from the sun, and intensity profiles above various energies, for a typical CR lepton spectrum. For the profiles a logarithmic angular grid was used to resolve the behavior near the solar disk.
This plot illustrates the extension of the emission to the entire sky, and also demonstrates an interesting feature: due to the anisotropy of the solar radiation field the emission is almost zero towards the solar disk, the emission beyond the sun being occulted. This effect should be visible in future high-quality Fermi-LAT data, and can help to distinguish the surface emission (cosmic-ray hadronic interactions) from the IC component.

Stellar spectra
Spectra for stars have been presented in [6,7], and can be obtained with the present package by defining the relevant

Summary
We have presented our software for calculating the IC emission from single stars and the Sun. The software is under continuing development, taking into account updated observations in gamma rays and cosmic rays. It is used in the Fermi-LAT Science Tools as a standard model for the solar IC emission, and it will be especially useful for evaluating future data from Fermi-LAT.