예제 #1
0
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

import numpy

from ximpol.srcmodel.roi import xUniformDisk, xROIModel
from ximpol.srcmodel.spectrum import power_law
from ximpol.srcmodel.polarization import constant

ROI_MODEL = xROIModel(10., 10.)

energy_spectrum = power_law(10., 2.)
polarization_degree = constant(0.5)
polarization_angle = constant(numpy.radians(65.))
disk = xUniformDisk('disk', 10., 10., 0.01, energy_spectrum,
                    polarization_degree, polarization_angle)

ROI_MODEL.add_source(disk)

if __name__ == '__main__':
    print(ROI_MODEL)
예제 #2
0
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.


import numpy

from ximpol.srcmodel.roi import xUniformDisk, xROIModel
from ximpol.srcmodel.spectrum import power_law
from ximpol.srcmodel.polarization import constant


ROI_MODEL = xROIModel(10., 10.)

energy_spectrum = power_law(10., 2.)
polarization_degree = constant(0.5)
polarization_angle = constant(numpy.radians(65.))
disk = xUniformDisk('disk', 10., 10., 0.01, energy_spectrum,
                    polarization_degree, polarization_angle)

ROI_MODEL.add_source(disk)


if __name__ == '__main__':
    print(ROI_MODEL)
예제 #3
0
    return xInterpolatedUnivariateSplineLinear(energy, flux, **fmt)


ROI_MODEL = xROIModel(266.8, -28.46)

spectrum_spline_b1 = parse_spectral_model('spec_model_SgrB1.txt')

def energy_spectrum_b1(E, t):
    """
    """
    return spectum_spline_b1(E)

polarization_degree_b1 = constant(0.405)
polarization_angle_b1 = constant(numpy.radians(88.3))
sgrb1 = xUniformDisk('Sgr B1', 266.75833, -28.5325, angular_radius(6.),
                     energy_spectrum_b1, polarization_degree_b1,
                     polarization_angle_b1)

spectrum_spline_b2 = parse_spectral_model('spec_model_SgrB2.txt')

def energy_spectrum_b2(E, t):
    """
    """
    return spectrum_spline_b2(E)

polarization_degree_b2 = constant(0.455)
polarization_angle_b2 = constant(numpy.radians(84.4))
sgrb2 = xUniformDisk('Sgr B2', 266.835, -28.38528, angular_radius(5.),
                     energy_spectrum_b2, polarization_degree_b2,
                     polarization_angle_b2)