/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 = 17560
number of fields = 31
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J0904.6+5200_weekly_bin921
RA = 136.154, Dec = 52.0096
tmin = 796003201, tmax = 796608001
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='24574645', job_status='RUN', time_executed='2026-03-31 01:52:31.931030', time_epoch_executed='1774947151.93' WHERE source_name='4FGL J0904.6+5200' and cadence='weekly' and bin_id='921'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/24574645

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

Retrieving the FT1 file...

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

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

Retrieving 108 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/24574645/ft1_4FGL_J0904.6+5200_weekly_bin921.fits


Retrieving the FT1 file...

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

Retrieving 108 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/24574645/ft2_4FGL_J0904.6+5200_weekly_bin921.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/24574645/ft1_4FGL_J0904.6+5200_weekly_bin921.fits outfile=/lscratch/kocevski/24574645/ft1_filteredMKT_4FGL_J0904.6+5200_weekly_bin921.fits ra=136.154 dec=52.0096 rad=12.0 tmin=796003201.0 tmax=796608001.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 6.65
user 5.84
sys 0.33

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

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/24574645/ft2_4FGL_J0904.6+5200_weekly_bin921.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/24574645/ft1_filteredMKT_4FGL_J0904.6+5200_weekly_bin921.fits evtable="EVENTS" outfile="/lscratch/kocevski/24574645/ft1_filtered_4FGL_J0904.6+5200_weekly_bin921.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 1.16
user 0.25
sys 0.17

Number of photons that the gtmktime cut: 1757

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/24574645/ft1_filtered_4FGL_J0904.6+5200_weekly_bin921.fits" evtable="EVENTS" scfile=/lscratch/kocevski/24574645/ft2_4FGL_J0904.6+5200_weekly_bin921.fits sctable="SC_DATA" outfile=/lscratch/kocevski/24574645/ltcube_796003201_796608001_4FGL_J0904.6+5200_weekly_bin921.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/24574645/ft2_4FGL_J0904.6+5200_weekly_bin921.fits
.....................!
real 24.15
user 23.34
sys 0.27

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/24574645/ft1_filtered_4FGL_J0904.6+5200_weekly_bin921.fits evtable="EVENTS" scfile=/lscratch/kocevski/24574645/ft2_4FGL_J0904.6+5200_weekly_bin921.fits sctable="SC_DATA" expcube=/lscratch/kocevski/24574645/ltcube_796003201_796608001_4FGL_J0904.6+5200_weekly_bin921.fits outfile=/lscratch/kocevski/24574645/expmap_796003201_796608001_4FGL_J0904.6+5200_weekly_bin921.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/24574645/ltcube_796003201_796608001_4FGL_J0904.6+5200_weekly_bin921.fits
.....................!
real 70.74
user 65.64
sys 4.19

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/24574645/ft1_filtered_4FGL_J0904.6+5200_weekly_bin921.fits scfile=/lscratch/kocevski/24574645/ft2_4FGL_J0904.6+5200_weekly_bin921.fits outfile=/lscratch/kocevski/24574645/cmap_796003201_796608001_4FGL_J0904.6+5200_weekly_bin921.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.79
user 0.25
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/24574645/ft1_filtered_4FGL_J0904.6+5200_weekly_bin921.fits scfile=/lscratch/kocevski/24574645/ft2_4FGL_J0904.6+5200_weekly_bin921.fits outfile=/lscratch/kocevski/24574645/cmap_HighResolution_796003201_796608001_4FGL_J0904.6+5200_weekly_bin921.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.72
user 0.27
sys 0.14

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/24574645/ft1_filtered_4FGL_J0904.6+5200_weekly_bin921.fits evtable="EVENTS" scfile=/lscratch/kocevski/24574645/ft2_4FGL_J0904.6+5200_weekly_bin921.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/24574645/Model_4FGL_J0904.6+5200_weekly_bin921.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/24574645/ft1_filtered_4FGL_J0904.6+5200_weekly_bin921.fits.....................!
real 66.29
user 64.05
sys 1.17

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/24574645/ft1_filtered_4FGL_J0904.6+5200_weekly_bin921.fits', '/lscratch/kocevski/24574645/ft2_4FGL_J0904.6+5200_weekly_bin921.fits', expMap='/lscratch/kocevski/24574645/expmap_796003201_796608001_4FGL_J0904.6+5200_weekly_bin921.fits', expCube='/lscratch/kocevski/24574645/ltcube_796003201_796608001_4FGL_J0904.6+5200_weekly_bin921.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/24574645/Model_4FGL_J0904.6+5200_weekly_bin921.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/24574645/ft1_filtered_4FGL_J0904.6+5200_weekly_bin921.fits
Spacecraft file(s): /lscratch/kocevski/24574645/ft2_4FGL_J0904.6+5200_weekly_bin921.fits
Exposure map: /lscratch/kocevski/24574645/expmap_796003201_796608001_4FGL_J0904.6+5200_weekly_bin921.fits
Exposure cube: /lscratch/kocevski/24574645/ltcube_796003201_796608001_4FGL_J0904.6+5200_weekly_bin921.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/24574645/Model_4FGL_J0904.6+5200_weekly_bin921.xml
Optimizer: MINUIT
Statistic: UNBINNED

Performing an iterative likelihood fit...

Fit tolerance = 1

Performing likelihood fit...
Done.

MINUIT Return Code (Fixed Index): 102
logL (Fixed Index) = 19277.0347526

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .66674       1.0000          .0000       .10000E+07
     2 'Prefactor '    .18326E-02   1.0000          .0000       .10000E+07
     3 'norm      '    1.9748       1.0000          .0000       .10000E+07
     4 'norm      '    1.8430       1.0000          .0000       .10000E+07
     5 'Prefactor '    .12730E-03   1.0000          .0000       .10000E+07
     6 'Prefactor '    5.9658       1.0000          .0000       .10000E+07
     7 'Prefactor '    24.058       1.0000          .0000       .10000E+07
     8 'Prefactor '    .11955E-02   1.0000          .0000       .10000E+07
     9 'Prefactor '    .53790E-06   1.0000          .0000       .10000E+07
    10 'norm      '    4.9392       1.0000          .0000       .10000E+07
    11 'norm      '    1.3064       1.0000          .0000       .10000E+07
    12 'Prefactor '    7.7201       1.0000          .0000       .10000E+07
    13 'Prefactor '    12.210       1.0000          .0000       .10000E+07
    14 'Prefactor '    .16398E-06   1.0000          .0000       .10000E+07
    15 'norm      '    .43632E-06   1.0000          .0000       .10000E+07
    16 'norm      '    1.0652       1.0000          .0000       .10000E+07
    17 'Prefactor '    .93734       1.0000          .0000       .10000E+07
    18 'Prefactor '    1.9497       1.0000          .0000       .10000E+07
    19 'Prefactor '    6.2377       1.0000          .0000       .10000E+07
    20 'Prefactor '    .20950E-06   1.0000          .0000       .10000E+07
    21 'Prefactor '    .10978E-04   1.0000          .0000       .10000E+07
    22 'Prefactor '    1.8093       1.0000          .0000       .10000E+07
    23 'Prefactor '    2.1501       1.0000          .0000       .10000E+07
    24 'Prefactor '    6.6518       1.0000          .0000       .10000E+07
    25 'norm      '    .77827E-07   1.0000          .0000       .10000E+07
    26 'Prefactor '    43.300       1.0000          .0000       .10000E+07
    27 'norm      '    1.9525       1.0000          .0000       .10000E+07
    28 'norm      '    8.5660       1.0000          .0000       .10000E+07
    29 'Prefactor '    .32413E-06   1.0000          .0000       .10000E+07
    30 'norm      '    2.6854       1.0000          .0000       .10000E+07
    31 'Prefactor '    47.489       1.0000          .0000       .10000E+07
    32 'Normalizat'    .84453       1.0000         .10000E-01   10.000    
    33 'Prefactor '    1.1624       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .7190E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   19272.31     FROM MIGRAD    STATUS=CONVERGED    150 CALLS     1864 TOTAL
                     EDM=   .19E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.7%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .66705        .85714       -.11908E-07   -.27110E-02
   2  Prefactor     .94091E-07    7.6211        .15455E-05** at limit **
   3  norm          1.9765        1.6558       -.52072E-08   -.18485E-02
   4  norm          1.8419        .93875       -.29188E-07   -.14778E-01
   5  Prefactor     .38858E-09    3.2420       -.65660E-06** at limit **
   6  Prefactor     5.9757        3.7598        .53202E-07   -.51765E-02
   7  Prefactor     24.163        15.302        .15220E-05   -.32704E-01
   8  Prefactor     .10375E-06    8.1122       -.14543E-05** at limit **
   9  Prefactor      .0000        3.5154        .21741E-06** at limit **
  10  norm          4.9467        3.3996        .24535E-07    .25261E-02
  11  norm          1.3022        2.0127       -.20150E-06    .38753E-03
  12  Prefactor     7.7304        5.3988       -.46904E-06    .24304E-01
  13  Prefactor     12.331        7.6836        .15407E-05    .42463E-01
  14  Prefactor     .88818E-09    .85561       -.52982E-07** at limit **
  15  norm           .0000        .10786       -.33421E-07** at limit **
  16  norm          1.0649        .46458        .35304E-07    .21167E-01
  17  Prefactor     .93386        1.4055        .20788E-07    .58646E-02
  18  Prefactor     1.9460        1.4501       -.44562E-07   -.55286E-02
  19  Prefactor     6.2328        1.9918       -.42517E-06   -.10178    
  20  Prefactor     .11102E-08    .86933       -.93446E-07** at limit **
  21  Prefactor     .11102E-09    1.9317        .12206E-06** at limit **
  22  Prefactor     2.5732        2.3017        .37274E-06   -.26565E-02
  23  Prefactor     2.2000        1.6425        .35970E-06    .24155E-01
  24  Prefactor     6.6351        3.6118        .60383E-08    .14320E-01
  25  norm          .22204E-09    1.4040        .57170E-07** at limit **
  26  Prefactor     43.333        3.3207        .35246E-06   -.50200E-01
  27  norm          1.9529        .36704        .24883E-07    .44799E-01
  28  norm          8.5541        1.2943        .14106E-06    .37888E-02
  29  Prefactor     .11102E-09    .67409       -.84582E-07** at limit **
  30  norm          2.6872        1.3048        .44954E-07    .91564E-02
  31  Prefactor     47.537        1.0524       -.51868E-10   -.96270E-02
  32  Normalizat    .84335        .12194       -.60831E-05    .27009E-03
  33  Prefactor     1.1629        .11144        .17240E-05    .35905E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 0.667046
  Prefactor  = 9.40914e-08
  norm       = 1.97648
  norm       = 1.84192
  Prefactor  = 3.88578e-10
  Prefactor  = 5.97573
  Prefactor  = 24.1632
  Prefactor  = 1.0375e-07
  Prefactor  = 0
  norm       = 4.94673
  norm       = 1.30222
  Prefactor  = 7.7304
  Prefactor  = 12.331
  Prefactor  = 8.88178e-10
  norm       = 0
  norm       = 1.06489
  Prefactor  = 0.933861
  Prefactor  = 1.94599
  Prefactor  = 6.2328
  Prefactor  = 1.11022e-09
  Prefactor  = 1.11022e-10
  Prefactor  = 2.57321
  Prefactor  = 2.19998
  Prefactor  = 6.63513
  norm       = 2.22045e-10
  Prefactor  = 43.3328
  norm       = 1.95287
  norm       = 8.5541
  Prefactor  = 1.11022e-10
  norm       = 2.68717
  Prefactor  = 47.537
  Normalizat = 0.843348
  Prefactor  = 1.16292
 **********
 **   18 **HESSE 
 **********

 FCN=   19272.31     FROM HESSE     STATUS=OK           777 CALLS     2641 TOTAL
                     EDM=   .23E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .66705        .86632        .63450E-03   -1.5692    
   2  Prefactor     .94091E-07    10.139        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          1.9765        1.6678        .73745E-03   -1.5680    
   4  norm          1.8419        .94403        .76796E-03   -1.5681    
   5  Prefactor     .38858E-09    12.904        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     5.9757        3.8610        .41088E-03   -1.5659    
   7  Prefactor     24.163        17.371        .20392E-03   -1.5610    
   8  Prefactor     .10375E-06    10.299        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor      .0000        3.4937        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          4.9467        3.4290        .45230E-03   -1.5663    
  11  norm          1.3022        2.0765        .96516E-03   -1.5685    
  12  Prefactor     7.7304        5.6167        .36067E-03   -1.5652    
  13  Prefactor     12.331        12.078        .28642E-03   -1.5638    
  14  Prefactor     .88818E-09    .88301        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm           .0000        .10719        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          1.0649        .48509        .11818E-02   -1.5687    
  17  Prefactor     .93386        1.4567        .43212E-03   -1.5689    
  18  Prefactor     1.9460        1.4621        .74295E-03   -1.5680    
  19  Prefactor     6.2328        4.3616        .40170E-03   -1.5658    
  20  Prefactor     .11102E-08    .90149        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .11102E-09    1.9354        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     2.5732        31.376        .77649E-03   -1.5676    
  23  Prefactor     2.2000        4.7666        .70243E-03   -1.5678    
  24  Prefactor     6.6351        3.6837        .38884E-03   -1.5656    
  25  norm          .22204E-09    1.4124        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  Prefactor     43.333        21.317        .15198E-03   -1.5576    
  27  norm          1.9529        .37372        .74233E-03   -1.5680    
  28  norm          8.5541        5.7280        .34226E-03   -1.5649    
  29  Prefactor     .11102E-09    .67489        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  30  norm          2.6872        1.3059        .62151E-03   -1.5675    
  31  Prefactor     47.537        22.872        .14512E-03   -1.5570    
  32  Normalizat    .84335        .11122        .64478E-01   -.98480    
  33  Prefactor     1.1629        .96416E-01    .53898E-01   -.87480    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.25737e-07
Minuit parameter uncertainties:
  1  0.86632
  2  0.00195357
  3  1.66784
  4  0.944028
  5  0.000142906
  6  3.86099
  7  17.3706
  8  0.00206742
  9  8.50162e-06
  10  3.42901
  11  2.07647
  12  5.61671
  13  12.0776
  14  5.63622e-05
  15  1.45888e-06
  16  0.48509
  17  1.45671
  18  1.46215
  19  4.36164
  20  6.28332e-05
  21  2.73348e-05
  22  17.9709
  23  4.76658
  24  3.68365
  25  3.377e-05
  26  21.3169
  27  0.373716
  28  5.72803
  29  1.88592e-05
  30  1.3059
  31  22.8718
  32  0.111252
  33  0.0964307
Done.

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

Extracting fit parameters...

4FGL J0904.6+5200
   Spectrum: PowerLaw
353    Prefactor:  1.233e+01  1.208e+01  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:  1.163e+00  9.643e-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:  8.433e-01  1.113e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 1.32
Ra Dec: 136.154 52.010
Photon Index (Fixed Index): 2.56 +/- 0.00
Photon Flux (Fixed Index): 1.99e-08 +/- 1.95e-08
Energy Flux (Fixed Index): 5.40e-06 +/- 5.29e-06

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

Saving results to:
/lscratch/kocevski/24574645/likelihoodResults_796003201_796608001_4FGL_J0904.6+5200_weekly_bin921.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) = 19271.8370694
delta logL = 0.468231465566

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 19271.8141257
delta logL = 0.491175218551

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    6.1459       1.0000          .0000       .10000E+07
     2 'Index     '    3.3069       1.0000          .0000       10.000    
     3 'Normalizat'    .82527       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.1738       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.

 FCN=   19271.81     FROM MIGRAD    STATUS=CONVERGED     62 CALLS      309 TOTAL
                     EDM=   .14E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     6.1503        78.793        .40472E-03    .54860E-02
   2  Index         3.3052        2.8152        .16468        .33740E-03
   3  Normalizat    .82529        .31230E-01    .65121E-01    .44938E-04
   4  Prefactor     1.1738        .29396E-01    .53685E-01   -.11656E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 6.15028
  Index      = 3.30522
  Normalizat = 0.825287
  Prefactor  = 1.17377
 **********
 **   18 **HESSE 
 **********

 FCN=   19271.81     FROM HESSE     STATUS=OK            33 CALLS      342 TOTAL
                     EDM=   .28E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     6.1503        15.522        .16189E-04   -1.5658    
   2  Index         3.3052        1.4151        .86136E-02   -.34581    
   3  Normalizat    .82529        .11590        .28808E-03   -.99137    
   4  Prefactor     1.1738        .11024        .23736E-03   -.87142    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.75662e-10
Minuit parameter uncertainties:
  1  15.5224
  2  1.43739
  3  0.115938
  4  0.110257
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) = 19271.81412
delta logL = 0.491180857734

Extracting fit parameters...

4FGL J0904.6+5200
   Spectrum: PowerLaw
353    Prefactor:  6.150e+00  1.552e+01  0.000e+00  1.000e+06 ( 1.000e-13)
354        Index:  3.305e+00  1.437e+00  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:  1.174e+00  1.103e-01  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:  8.253e-01  1.159e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 2.37
Ra Dec: 136.154 52.010
Photon Index (Free Index): 3.31 +/- 1.44
Photon Flux (Free Index): 3.33e-08 +/- 2.47e-08
Energy Flux (Free Index): 5.88e-06 +/- 4.98e-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/24574645/cmap_HighResolution_796003201_796608001_4FGL_J0904.6+5200_weekly_bin921.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='4.58e-03', comment='SUCCESS', photon_flux='1.99e-08', energy_flux2='5.88e-06', photon_flux_error='1.95e-08', dlogl='4.91e-01', energy_flux='5.40e-06', photon_flux2='3.33e-08', job_status='DONE', time_completed='2026-03-31 02:08:05.617711', photon_index_error2='1.44', photon_index2='3.31', ts='1.32', fit_tolerance='1e-08', GAL='1.16', photon_index_error='0.00', photon_flux_upper_limit='5.87e-08', energy_flux_error2='4.98e-06', EG='0.84', time_epoch_completed='1774948085.62', return_code='0', job_id='24574645', GAL2='1.17', EG2='0.83', return_code2='0', energy_flux_error='5.29e-06', photon_flux_error2='2.47e-08', ts2='2.37', photon_index='2.56' WHERE bin_id='921' AND source_name='4FGL J0904.6+5200' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Mar 31 02:08:06 PDT 2026

