ranieremenezes / easyfermi

The easiest way to analyze Fermi-LAT data
https://easyfermi.readthedocs.io/en/latest/index.html
BSD 3-Clause "New" or "Revised" License
42 stars 6 forks source link

A 'Source model for source 4FGL J1228.7-0318 has no counts in ROI' error #66

Closed haruku99 closed 3 months ago

haruku99 commented 3 months ago

Hello, I encountered an error while processing the light curve of 3C 279 using easyfermi on my Mac.

I was attempting to split the light curve spanning approximately 17 days into 20 bins and then split it using an adaptive method with a threshold of 50. I had successfully performed similar operations before (Also for 3C 279), but this time I encountered the error "WARNING lightcurve_408414660_408419015 GTAnalysis.profile_norm(): Source model for source 4FGL J1228.7-0318 has no counts in ROI." (I manually downloaded the photon and spacecraft files from https://fermi.gsfc.nasa.gov/cgi-bin/ssc/LAT/QueryResults.cgi?id=L240611223518B2F361C319, with a photon energy range of 100-1000 MeV and a search radius of 12 degrees.) I tried removing 4FGL J1228.7-0318 from the source list in easyfermi and rerunning the analysis, but I still encountered the same error. Could you please advise me on how to resolve this issue? (Relevant information is included in the attached zip file.)

haruku99 commented 3 months ago

Package.zip

ranieremenezes commented 3 months ago

Hi @haruku99 , the problem is that there is not enough data in one of the light curve bins. Your bins are smaller than 24 hours, which is extremely short for Fermi-LAT standards. Furthermore, the binned likelihood method adopted in easyfermi is suited for larger time windows (e.g. bins with > 1 week for a very bright blazar like 3C 279), where you have a lot of counts (you can use shorter time windows in case of a huge flaring state, like the one in BL Lacertae in the past few years).

If it is ok for your project, try using larger time bins for the light curve.

haruku99 commented 3 months ago

Thank you for your reply, I will try to use larger bins. By the way, how can I obtain a light curve with very small bins (for example, 3 hours or even smaller)? Should I manually use fermitools as shown in the FSSC tutorials instead of easyfermi?

ranieremenezes commented 3 months ago

Yes, for ~3 hours bins you should use the unbinned likelihood method available only in the fermitools.

haruku99 commented 3 months ago

Thank you for your patient response again, I got it.