/sdf/group/fermi/u/kocevski/software/conda/envs/fermitools_v1.0.5/lib/python2.7/site-packages/pyfits/__init__.py:22: PyFITSDeprecationWarning: PyFITS is deprecated, please use astropy.io.fits
  PyFITSDeprecationWarning)  # noqa

Likelihood Analysis Tool
Support Contact: Daniel Kocevski (daniel.kocevski@nasa.gov)

Importing modules...
This is make3FGLxml version 01r0.
The default diffuse model files and names are for pass 8 and assume you have v10r00p05 of the Fermi Science Tools or higher.
This is make4FGLDR3xml version 01r09.
The default diffuse model files and names are for P8R3, 4FGL DRs, and the default fermitools directory locations.

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

/sdf/group/fermi/u/kocevski/software/conda/envs/fermitools_v1.0.5/lib/python2.7/site-packages/matplotlib/cbook/deprecation.py:106: MatplotlibDeprecationWarning: The mpl_toolkits.axes_grid module was deprecated in version 2.1. Use mpl_toolkits.axes_grid1 and mpl_toolkits.axisartist provies the same functionality instead.
  warnings.warn(message, mplDeprecation, stacklevel=1)

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

number of points = 17435
number of fields = 31
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J0904.6+5200_weekly_bin927
RA = 136.154, Dec = 52.0096
tmin = 799632001, tmax = 800236801
emin = 100.0, emax = 100000.0
irfs = P8R3_SOURCE_V2
ROI = 12
zmax = 90

Fitting strategies:
Fix sources to their catalog values = True
Leave variable source normalizations free = True
Perform pre-fit where ALL sources are frozen to catalog values = False
Perform secondary fit with a free spectral index = True
Remove all catalog sources = False
Remove weak (TS < 2) catalog sources = False
Freeze Galactic component = False

Likelihood fit parameters:
Statistic: UNBINNED
Optimizer: MINUIT

Catalog: 4FGL

Repository job = True

LAT data source:
Data catalog

Updating database...

UPDATE lightcurve_data_v2 SET job_id='26505923', job_status='RUN', time_executed='2026-05-12 01:43:17.526456', time_epoch_executed='1778575397.53' WHERE source_name='4FGL J0904.6+5200' and cadence='weekly' and bin_id='927'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/26505923

Creating custom pfile directory:
/lscratch/kocevski/26505923/pfiles/

Retrieving the FT1 file...

Issuing command:
datacat find --group FT1 --filter 'nMetStop>=799632001.0 && nMetStart<800236801.0' /Data/Flight/Reprocess/P305

Issuing command:
datacat find --group FT1 --filter 'nMetStart>564945418 && nMetStop>=799632001.0 && nMetStart<800236801.0' /Data/Flight/Level1/LPA

Retrieving 108 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/26505923/ft1_4FGL_J0904.6+5200_weekly_bin927.fits


Retrieving the FT1 file...

Issuing command:
datacat find --group FT2 --filter 'nMetStop>=799632001.0 && nMetStart<800236801.0' /Data/Flight/Level1/LPA

Retrieving 108 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/26505923/ft2_4FGL_J0904.6+5200_weekly_bin927.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/26505923/ft1_4FGL_J0904.6+5200_weekly_bin927.fits outfile=/lscratch/kocevski/26505923/ft1_filteredMKT_4FGL_J0904.6+5200_weekly_bin927.fits ra=136.154 dec=52.0096 rad=12.0 tmin=799632001.0 tmax=800236801.0 emin=100.0 emax=100000.0 zmin=0.0 zmax=90.0 evclass=128 evtype="INDEF" convtype=-1 phasemin=0.0 phasemax=1.0 evtable="EVENTS" chatter=2 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

Done.
real 3.61
user 3.09
sys 0.19

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/26505923/ft2_4FGL_J0904.6+5200_weekly_bin927.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/26505923/ft2_4FGL_J0904.6+5200_weekly_bin927.fits sctable="SC_DATA" filter="IN_SAA!=T && LIVETIME>0 && gtifilter('/sdf/group/fermi/g/LCRepository/Likelihood/GTIs/nogrb.gti',(START+STOP)/2) && (angsep(RA_SUN,DEC_SUN,RA_ZENITH,DEC_ZENITH)>115 || gtifilter('/sdf/group/fermi/g/LCRepository/Likelihood/GTIs/nosolarflares.gti',(START+STOP)/2))" roicut=no evfile=/lscratch/kocevski/26505923/ft1_filteredMKT_4FGL_J0904.6+5200_weekly_bin927.fits evtable="EVENTS" outfile="/lscratch/kocevski/26505923/ft1_filtered_4FGL_J0904.6+5200_weekly_bin927.fits" apply_filter=yes overwrite=yes header_obstimes=yes tstart=0.0 tstop=0.0 gtifile="default" chatter=3 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

This is gtmktime version HEAD
Applying GTI filter:
IN_SAA!=T && LIVETIME>0 && gtifilter('/sdf/group/fermi/g/LCRepository/Likelihood/GTIs/nogrb.gti',(START+STOP)/2) && (angsep(RA_SUN,DEC_SUN,RA_ZENITH,DEC_ZENITH)>115 || gtifilter('/sdf/group/fermi/g/LCRepository/Likelihood/GTIs/nosolarflares.gti',(START+STOP)/2))
real 0.71
user 0.26
sys 0.14

Number of photons that the gtmktime cut: 2524

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/26505923/ft1_filtered_4FGL_J0904.6+5200_weekly_bin927.fits" evtable="EVENTS" scfile=/lscratch/kocevski/26505923/ft2_4FGL_J0904.6+5200_weekly_bin927.fits sctable="SC_DATA" outfile=/lscratch/kocevski/26505923/ltcube_799632001_800236801_4FGL_J0904.6+5200_weekly_bin927.fits dcostheta=0.025 binsz=1.0 phibins=0 tmin=0.0 tmax=0.0 file_version="1" zmin=0.0 zmax=90.0 chatter=2 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

Working on file /lscratch/kocevski/26505923/ft2_4FGL_J0904.6+5200_weekly_bin927.fits
.....................!
real 21.80
user 21.16
sys 0.23

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/26505923/ft1_filtered_4FGL_J0904.6+5200_weekly_bin927.fits evtable="EVENTS" scfile=/lscratch/kocevski/26505923/ft2_4FGL_J0904.6+5200_weekly_bin927.fits sctable="SC_DATA" expcube=/lscratch/kocevski/26505923/ltcube_799632001_800236801_4FGL_J0904.6+5200_weekly_bin927.fits outfile=/lscratch/kocevski/26505923/expmap_799632001_800236801_4FGL_J0904.6+5200_weekly_bin927.fits irfs="P8R3_SOURCE_V2" evtype="INDEF" srcrad=30.0 nlong=88 nlat=88 nenergies=10 submap=no nlongmin=0 nlongmax=0 nlatmin=0 nlatmax=0 chatter=2 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

The exposure maps generated by this tool are meant
to be used for *unbinned* likelihood analysis only.
Do not use them for binned analyses.
Computing the ExposureMap using /lscratch/kocevski/26505923/ltcube_799632001_800236801_4FGL_J0904.6+5200_weekly_bin927.fits
.....................!
real 63.57
user 59.41
sys 3.53

Generating the xml model:
radLim = 0.001
maxRad = 12
normsOnly = True
freeVariableSources = True
Fixing all sources to their catalog values, except variable sources
Creating file and adding sources from 4FGL
Added 226 point sources and 0 extended sources

Setting source of interest to:
4FGL J0904.6+5200 @ 136.154 52.0096

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/26505923/ft1_filtered_4FGL_J0904.6+5200_weekly_bin927.fits scfile=/lscratch/kocevski/26505923/ft2_4FGL_J0904.6+5200_weekly_bin927.fits outfile=/lscratch/kocevski/26505923/cmap_799632001_800236801_4FGL_J0904.6+5200_weekly_bin927.fits algorithm="CMAP" ebinalg="LOG" emin=30.0 emax=200000.0 ebinfile=NONE tbinalg="LIN" tbinfile=NONE nxpix=160 nypix=160 binsz=0.25 coordsys="CEL" xref=136.154 yref=52.0096 axisrot=0.0 rafield="RA" decfield="DEC" proj="AIT" hpx_ordering_scheme="RING" hpx_order=3 hpx_ebin=yes hpx_region="" evtable="EVENTS" sctable="SC_DATA" efield="ENERGY" tfield="TIME" chatter=2 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

This is gtbin version HEAD
real 0.74
user 0.22
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/26505923/ft1_filtered_4FGL_J0904.6+5200_weekly_bin927.fits scfile=/lscratch/kocevski/26505923/ft2_4FGL_J0904.6+5200_weekly_bin927.fits outfile=/lscratch/kocevski/26505923/cmap_HighResolution_799632001_800236801_4FGL_J0904.6+5200_weekly_bin927.fits algorithm="CMAP" ebinalg="LOG" emin=30.0 emax=200000.0 ebinfile=NONE tbinalg="LIN" tbinfile=NONE nxpix=500 nypix=500 binsz=0.1 coordsys="CEL" xref=136.154 yref=52.0096 axisrot=0.0 rafield="RA" decfield="DEC" proj="AIT" hpx_ordering_scheme="RING" hpx_order=3 hpx_ebin=yes hpx_region="" evtable="EVENTS" sctable="SC_DATA" efield="ENERGY" tfield="TIME" chatter=2 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

This is gtbin version HEAD
real 0.79
user 0.24
sys 0.12

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/26505923/ft1_filtered_4FGL_J0904.6+5200_weekly_bin927.fits evtable="EVENTS" scfile=/lscratch/kocevski/26505923/ft2_4FGL_J0904.6+5200_weekly_bin927.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/26505923/Model_4FGL_J0904.6+5200_weekly_bin927.xml irfs="P8R3_SOURCE_V2" evclsmin=0 evclass="INDEF" evtype="INDEF" convert=yes chatter=2 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

adding source EG_v02
adding source GAL_V02
Working on...
/lscratch/kocevski/26505923/ft1_filtered_4FGL_J0904.6+5200_weekly_bin927.fits.....................!
real 83.11
user 81.09
sys 1.20

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/26505923/ft1_filtered_4FGL_J0904.6+5200_weekly_bin927.fits', '/lscratch/kocevski/26505923/ft2_4FGL_J0904.6+5200_weekly_bin927.fits', expMap='/lscratch/kocevski/26505923/expmap_799632001_800236801_4FGL_J0904.6+5200_weekly_bin927.fits', expCube='/lscratch/kocevski/26505923/ltcube_799632001_800236801_4FGL_J0904.6+5200_weekly_bin927.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/26505923/Model_4FGL_J0904.6+5200_weekly_bin927.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J0904.6+5200'

4FGL J0904.6+5200
   Spectrum: PowerLaw
353    Prefactor:  1.897e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-13)
354        Index:  2.565e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
355        Scale:  8.643e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/26505923/ft1_filtered_4FGL_J0904.6+5200_weekly_bin927.fits
Spacecraft file(s): /lscratch/kocevski/26505923/ft2_4FGL_J0904.6+5200_weekly_bin927.fits
Exposure map: /lscratch/kocevski/26505923/expmap_799632001_800236801_4FGL_J0904.6+5200_weekly_bin927.fits
Exposure cube: /lscratch/kocevski/26505923/ltcube_799632001_800236801_4FGL_J0904.6+5200_weekly_bin927.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/26505923/Model_4FGL_J0904.6+5200_weekly_bin927.xml
Optimizer: MINUIT
Statistic: UNBINNED

Performing an iterative likelihood fit...

Fit tolerance = 1

Performing likelihood fit...
Done.

MINUIT Return Code (Fixed Index): 0
logL (Fixed Index) = 27089.8280421

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Fixed Index): 0
logL (Fixed Index) = 27088.2218742

Fit tolerance = 1e-08

Performing likelihood fit...
 **********
 **   14 **SET NOWARN 
 **********

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    2.6110       1.0000          .0000       .10000E+07
     2 'Prefactor '    24.177       1.0000          .0000       .10000E+07
     3 'norm      '    1.8056       1.0000          .0000       .10000E+07
     4 'norm      '    1.4580       1.0000          .0000       .10000E+07
     5 'Prefactor '    .61062E-09   1.0000          .0000       .10000E+07
     6 'Prefactor '    3.6209       1.0000          .0000       .10000E+07
     7 'Prefactor '    .54052E-02   1.0000          .0000       .10000E+07
     8 'Prefactor '    .35760E-06   1.0000          .0000       .10000E+07
     9 'Prefactor '    3.0819       1.0000          .0000       .10000E+07
    10 'norm      '    2.7821       1.0000          .0000       .10000E+07
    11 'norm      '    3.6794       1.0000          .0000       .10000E+07
    12 'Prefactor '    1.5498       1.0000          .0000       .10000E+07
    13 'Prefactor '    8.9336       1.0000          .0000       .10000E+07
    14 'Prefactor '    .59826       1.0000          .0000       .10000E+07
    15 'norm      '    .11102E-08   1.0000          .0000       .10000E+07
    16 'norm      '    .77345       1.0000          .0000       .10000E+07
    17 'Prefactor '    .65811       1.0000          .0000       .10000E+07
    18 'Prefactor '    1.5686       1.0000          .0000       .10000E+07
    19 'Prefactor '    .29193E-03   1.0000          .0000       .10000E+07
    20 'Prefactor '    1.5998       1.0000          .0000       .10000E+07
    21 'Prefactor '    .16010       1.0000          .0000       .10000E+07
    22 'Prefactor '    2.5737       1.0000          .0000       .10000E+07
    23 'Prefactor '    .11353       1.0000          .0000       .10000E+07
    24 'Prefactor '    1.6981       1.0000          .0000       .10000E+07
    25 'norm      '    .57565E-07   1.0000          .0000       .10000E+07
    26 'Prefactor '    11.727       1.0000          .0000       .10000E+07
    27 'norm      '    .82748       1.0000          .0000       .10000E+07
    28 'norm      '    20.806       1.0000          .0000       .10000E+07
    29 'Prefactor '    .31419E-06   1.0000          .0000       .10000E+07
    30 'norm      '    2.8309       1.0000          .0000       .10000E+07
    31 'Prefactor '    .25190       1.0000          .0000       .10000E+07
    32 'Normalizat'    1.1342       1.0000         .10000E-01   10.000    
    33 'Prefactor '    .95820       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .7190E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
 MACHINE ACCURACY LIMITS FURTHER IMPROVEMENT.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   27088.22     FROM MIGRAD    STATUS=CONVERGED   1036 CALLS     2791 TOTAL
                     EDM=   .33E-05    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          2.6116        1.3214         .0000        .19011E-02
   2  Prefactor     24.495        19.696         .0000       -.22892E-02
   3  norm          1.8053        1.7816         .0000        .22316E-01
   4  norm          1.4581        .88113         .0000        .10976E-01
   5  Prefactor      .0000        .98475         .0000    ** at limit **
   6  Prefactor     3.6224        2.2793         .0000        .12822E-01
   7  Prefactor     .44409E-09    9.3804         .0000    ** at limit **
   8  Prefactor     .55511E-10    2.9579         .0000    ** at limit **
   9  Prefactor     3.0796        2.3389         .0000        .54561E-02
  10  norm          2.7818        1.8445         .0000       -.73778E-03
  11  norm          3.6781        2.6928         .0000        .36057    
  12  Prefactor     1.5448        3.6514         .0000        .44421    
  13  Prefactor     8.9317        7.4710         .0000        .21122E-01
  14  Prefactor     .59783        1.1754         .0000        .59021E-01
  15  norm           .0000        .54015E-01     .0000    ** at limit **
  16  norm          .77313        .35325         .0000        .25306E-01
  17  Prefactor     .65837        .95837         .0000        .49229E-01
  18  Prefactor     1.5684        1.1295         .0000        .34616E-02
  19  Prefactor     .19984E-08    2.7041         .0000    ** at limit **
  20  Prefactor     1.5992        1.4367         .0000        .13573E-01
  21  Prefactor     .19279        3.0799         .0000    ** at limit **
  22  Prefactor     2.5711        10.063         .0000        .25336E-02
  23  Prefactor     .14449        .94096         .0000    ** at limit **
  24  Prefactor     1.6969        3.3943         .0000        .82575    
  25  norm           .0000        .92193         .0000    ** at limit **
  26  Prefactor     11.576        15.198         .0000        .66310E-03
  27  norm          .82826        .22809         .0000        .38896E-01
  28  norm          20.857        6.9458         .0000        .22022E-02
  29  Prefactor     .11102E-09    1.0721         .0000    ** at limit **
  30  norm          2.8299        1.1240         .0000        .61298E-02
  31  Prefactor     .16044E-05    5.7248         .0000    ** at limit **
  32  Normalizat    1.1342        .90204E-01     .0000        .18763E-03
  33  Prefactor     .95808        .79337E-01     .0000       -.62007E-05
                               ERR DEF=  .500    
Final values: 
  norm       = 2.61159
  Prefactor  = 24.4952
  norm       = 1.80533
  norm       = 1.45808
  Prefactor  = 0
  Prefactor  = 3.6224
  Prefactor  = 4.44089e-10
  Prefactor  = 5.55112e-11
  Prefactor  = 3.07963
  norm       = 2.7818
  norm       = 3.67806
  Prefactor  = 1.54481
  Prefactor  = 8.93171
  Prefactor  = 0.597832
  norm       = 0
  norm       = 0.773132
  Prefactor  = 0.65837
  Prefactor  = 1.5684
  Prefactor  = 1.9984e-09
  Prefactor  = 1.59918
  Prefactor  = 0.192789
  Prefactor  = 2.57114
  Prefactor  = 0.144494
  Prefactor  = 1.69693
  norm       = 0
  Prefactor  = 11.5757
  norm       = 0.828262
  norm       = 20.8568
  Prefactor  = 1.11022e-10
  norm       = 2.82986
  Prefactor  = 1.60438e-06
  Normalizat = 1.13425
  Prefactor  = 0.958079
 **********
 **   18 **HESSE 
 **********

 FCN=   27088.22     FROM HESSE     STATUS=OK           745 CALLS     3536 TOTAL
                     EDM=   .12E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          2.6116        1.3228        .13074E-04   -1.5676    
   2  Prefactor     24.495        19.698        .81368E-05   -1.5609    
   3  norm          1.8053        1.7525        .19939E-04   -1.5681    
   4  norm          1.4581        .86461        .11033E-04   -1.5684    
   5  Prefactor      .0000        .98555        .84235E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     3.6224        2.2739        .18790E-04   -1.5670    
   7  Prefactor     .44409E-09    9.4108        .84235E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .55511E-10    2.9753        .84235E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     3.0796        2.3379        .21179E-04   -1.5673    
  10  norm          2.7818        1.8458        .17559E-04   -1.5675    
  11  norm          3.6781        2.6831        .10526E-03   -1.5670    
  12  Prefactor     1.5448        3.6205        .17107E-03   -1.5683    
  13  Prefactor     8.9317        7.4729        .67020E-04   -1.5648    
  14  Prefactor     .59783        1.1548        .23397E-04   -1.5692    
  15  norm           .0000        .55134E-01    .73618E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          .77313        .34945        .62867E-05   -1.5690    
  17  Prefactor     .65837        .93735        .17982E-04   -1.5692    
  18  Prefactor     1.5684        1.1205        .33946E-05   -1.5683    
  19  Prefactor     .19984E-08    2.5862        .70297E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     1.5992        1.4057        .16965E-04   -1.5683    
  21  Prefactor     .19279        5.2451        .84844E-02   -1.5699    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     2.5711        10.059        .25438E-04   -1.5676    
  23  Prefactor     .14449        10.354        .29879E-03   -1.5700    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     1.6969        3.2588        .16142E-03   -1.5682    
  25  norm           .0000        .92228        .84235E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  Prefactor     11.576        15.176        .11691E-04   -1.5640    
  27  norm          .82826        .22771        .39270E-05   -1.5690    
  28  norm          20.857        6.9312        .87719E-05   -1.5617    
  29  Prefactor     .11102E-09    8.4476        .31216E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  30  norm          2.8299        1.1229        .10676E-04   -1.5674    
  31  Prefactor     .16044E-05    7.0350        .11676E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  32  Normalizat    1.1342        .10491        .24206E-03   -.88660    
  33  Prefactor     .95808        .91918E-01    .25404E-03   -.94140    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.2089e-07
Minuit parameter uncertainties:
  1  1.32277
  2  19.6979
  3  1.75253
  4  0.864608
  5  3.6669e-06
  6  2.2739
  7  0.000126044
  8  2.75023e-05
  9  2.3379
  10  1.84583
  11  2.68311
  12  3.62054
  13  7.47294
  14  1.15478
  15  4.74319e-08
  16  0.349447
  17  0.937351
  18  1.12053
  19  0.000144229
  20  1.40569
  21  2.01116
  22  10.0592
  23  2.44634
  24  3.25881
  25  5.52657e-06
  26  15.1758
  27  0.227707
  28  6.93123
  29  6.16337e-05
  30  1.12292
  31  0.00671921
  32  0.104924
  33  0.0919334
Done.

MINUIT Return Code (Fixed Index): 0
logL (Fixed Index) = 27088.2210095

Extracting fit parameters...

4FGL J0904.6+5200
   Spectrum: PowerLaw
353    Prefactor:  8.932e+00  7.473e+00  0.000e+00  1.000e+06 ( 1.000e-13)
354        Index:  2.565e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
355        Scale:  8.643e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
716    Prefactor:  9.581e-01  9.193e-02  0.000e+00  1.000e+01 ( 1.000e+00)
717        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
718        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
715   Normalization:  1.134e+00  1.049e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 2.44
Ra Dec: 136.154 52.010
Photon Index (Fixed Index): 2.56 +/- 0.00
Photon Flux (Fixed Index): 1.44e-08 +/- 1.21e-08
Energy Flux (Fixed Index): 3.91e-06 +/- 3.27e-06

TS (Fixed Index): 2.44
Ra Dec: 136.154 52.010
Photon Flux Upper Limit: 4.13998029663e-08 ph cm-2 s-1
Energy Flux Upper Limit: 0.00323305051034 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/26505923/likelihoodResults_799632001_800236801_4FGL_J0904.6+5200_weekly_bin927.txt

Performing a free index iterative likelihood fit...

Freezing all point sources, except source of interest...

Done.

Freeing candidate source...
Done.

Fit tolerance = 1

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 27088.0012672
delta logL = 0.219742371843

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 27087.9973362
delta logL = 0.223673293953

Fit tolerance = 1e-08

Performing likelihood fit...
 **********
 **   14 **SET NOWARN 
 **********

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    11.738       1.0000          .0000       .10000E+07
     2 'Index     '    2.1522       1.0000          .0000       10.000    
     3 'Normalizat'    1.1399       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .95443       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .7190E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   27088.00     FROM MIGRAD    STATUS=CONVERGED     91 CALLS      291 TOTAL
                     EDM=   .87E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     11.738        9.7438        .11686E-04    .26384E-02
   2  Index         2.1526        .57579        .15929E-01    .50359E-04
   3  Normalizat    1.1399        .90660E-01    .24152E-03   -.60062E-04
   4  Prefactor     .95442        .88284E-01    .25445E-03   -.60942E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 11.7376
  Index      = 2.15257
  Normalizat = 1.13987
  Prefactor  = 0.954417
 **********
 **   18 **HESSE 
 **********

 FCN=   27088.00     FROM HESSE     STATUS=OK            25 CALLS      316 TOTAL
                     EDM=   .80E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     11.738        9.6329        .46744E-06   -1.5639    
   2  Index         2.1526        .56946        .63716E-03   -.60588    
   3  Normalizat    1.1399        .90705E-01    .96609E-05   -.88482    
   4  Prefactor     .95442        .88336E-01    .10178E-04   -.94265    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 8.00029e-11
Minuit parameter uncertainties:
  1  9.6329
  2  0.571293
  3  0.090717
  4  0.0883498
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 27087.997336
delta logL = 0.223673504639

Extracting fit parameters...

4FGL J0904.6+5200
   Spectrum: PowerLaw
353    Prefactor:  1.174e+01  9.633e+00  0.000e+00  1.000e+06 ( 1.000e-13)
354        Index:  2.153e+00  5.713e-01  0.000e+00  1.000e+01 (-1.000e+00)
355        Scale:  8.643e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
716    Prefactor:  9.544e-01  8.835e-02  0.000e+00  1.000e+01 ( 1.000e+00)
717        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
718        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
715   Normalization:  1.140e+00  9.072e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 2.88
Ra Dec: 136.154 52.010
Photon Index (Free Index): 2.15 +/- 0.57
Photon Flux (Free Index): 1.06e-08 +/- 1.07e-08
Energy Flux (Free Index): 5.20e-06 +/- 5.03e-06

Creating a high resolution counts map...
INFO: Auto-setting vmin to -1.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  1.110e+00 [aplpy.core]
Saving /lscratch/kocevski/26505923/cmap_HighResolution_799632001_800236801_4FGL_J0904.6+5200_weekly_bin927.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='3.23e-03', comment='SUCCESS', photon_flux='1.44e-08', energy_flux2='5.20e-06', photon_flux_error='1.21e-08', dlogl='2.24e-01', energy_flux='3.91e-06', photon_flux2='1.06e-08', job_status='DONE', time_completed='2026-05-12 02:06:29.088879', photon_index_error2='0.57', photon_index2='2.15', ts='2.44', fit_tolerance='1e-08', GAL='0.96', photon_index_error='0.00', photon_flux_upper_limit='4.14e-08', energy_flux_error2='5.03e-06', EG='1.13', time_epoch_completed='1778576789.09', return_code='0', job_id='26505923', GAL2='0.95', EG2='1.14', return_code2='0', energy_flux_error='3.27e-06', photon_flux_error2='1.07e-08', ts2='2.88', photon_index='2.56' WHERE bin_id='927' AND source_name='4FGL J0904.6+5200' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue May 12 02:06:29 PDT 2026

