You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to produce an SED for an extended source in fermipy (Virgo cluster). I have a spatial map (a fits file) that I define in the configuration file under the SpatialModel:'SpatialMap', Spatial_Filename : ‘map_name.fits’.It is a standard WCS skymap in TAN projection arbitrarily normalized to produce 1 count integrated over the region (about 5 x 5 deg^2, or ~1e-2 sr.)
The Issue
The gta.sed() function does not produce correct values for anything involving the differential flux (dnde) when analyzing this extended source. As a result:
The plots generated by SEDPlotter().plot() are incorrect, with e2dnde values being off by some factor. We tested changing the normalization of the input map file, which resulted in a change of the output sed[dnde] values but not in the output sed[flux] values.
The flux (flux) values in the sed() dictionary are correct, so this issue appears specific to how dnde is calculated.
Manually translating the correct sed['flux'] values into dnde using the usual formula reveals an offset of ~9.24901341e-09 for each energy bin (i.e., the scaling offset is constant across bins) for the Virgo example.
It seems likely that the issue lies in how dnde is calculated within the SED routine, but I couldn’t identify the source of the problem.
The pdf of the notebook (showing the output) is attached below.
Environment
OS: macOS Sonoma v14.3 (also tested on Linux Mint, the issue persists)
fermipy v1.2.2
ScienceTools v2.2.0
Thanks is advance for your help! Let me know if any additional information is needed.
Regarding the offset, it may indeed be a gta.sed() issue:
The input spatial map could be read incorrectly or there is an issue in the calculation routine, which is likely the cause of the problem.
When executing the identical procedure with a radial disk, for instance, one would likely observe that the offset is approximately equivalent to the ratio of the normalizations when utilizing a disk and a spatial map.
Would it be possible for you to provide the spatial map or, at minimum, the spectral model (spectral parameters) obtained from the gta.sed(), to enable confirmation of this hypothesis?
Thank you for the quick response, @MiltosMichailidis! I agree with you that the offset would be the ratio of the normalizations using disk and spatial map (same way as it is when considering a point source and the spatial map in the file I provide above).
I am attaching the spatial map (for the Virgo cluster) and the configuration file I used for my analysis here.
I am trying to produce an SED for an extended source in fermipy (Virgo cluster). I have a spatial map (a fits file) that I define in the configuration file under the SpatialModel:
'SpatialMap', Spatial_Filename : ‘map_name.fits’.
It is a standard WCS skymap in TAN projection arbitrarily normalized to produce 1 count integrated over the region (about 5 x 5 deg^2, or ~1e-2 sr.)The Issue
The
gta.sed()
function does not produce correct values for anything involving the differential flux (dnde
) when analyzing this extended source. As a result:SEDPlotter().plot()
are incorrect, withe2dnde
values being off by some factor. We tested changing the normalization of the input map file, which resulted in a change of the outputsed[dnde]
values but not in the outputsed[flux]
values.flux
) values in thesed()
dictionary are correct, so this issue appears specific to howdnde
is calculated.sed['flux']
values intodnde
using the usual formula reveals an offset of ~9.24901341e-09 for each energy bin (i.e., the scaling offset is constant across bins) for the Virgo example.It seems likely that the issue lies in how
dnde
is calculated within the SED routine, but I couldn’t identify the source of the problem.The pdf of the notebook (showing the output) is attached below.
Environment
Thanks is advance for your help! Let me know if any additional information is needed.
github_issue.pdf
The text was updated successfully, but these errors were encountered: