/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).

**
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6870E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   95959.50     FROM MIGRAD    STATUS=CONVERGED     88 CALLS      806 TOTAL
                     EDM=   .86E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.3%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .72780        .57923       -.40781E-07   -.55332E-02
   2  Prefactor     .66613E-09    51.214        .19468E-05** at limit **
   3  norm          .90153        1.9728        .30148E-06    .52142E-03
   4  norm          .22204E-09    3.7397       -.59155E-06** at limit **
   5  norm          5.8782        2.8246       -.11903E-07    .23661E-02
   6  norm          11.862        1.6879       -.21932E-06    .11720    
   7  norm          6.6328        4.7685       -.86800E-06   -.22094E-01
   8  norm          1.9762        1.9762       -.32140E-07    .13559E-02
   9  Prefactor      .0000        3.3015        .43796E-06** at limit **
  10  norm          .55511E-10    .45819       -.51010E-07** at limit **
  11  Prefactor     .59056        1.2814        .10689E-06    .19456E-03
  12  Prefactor     2.2128        .60020       -.18528E-06    .73823E-04
  13  norm          8.7716        5.1782       -.50605E-06   -.13193E-01
  14  Normalizat    1.2614        .15669        .29486E-05    .22641E-03
  15  Prefactor     .99331        .17139E-01    .54140E-06    .25327E-02
                               ERR DEF=  .500    
Final values: 
  norm       = 0.727798
  Prefactor  = 6.66134e-10
  norm       = 0.901526
  norm       = 2.22045e-10
  norm       = 5.87821
  norm       = 11.8621
  norm       = 6.63277
  norm       = 1.97619
  Prefactor  = 0
  norm       = 5.55112e-11
  Prefactor  = 0.590564
  Prefactor  = 2.21283
  norm       = 8.77158
  Normalizat = 1.26139
  Prefactor  = 0.993308
/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).

 **********
 **   18 **HESSE 
 **********

 FCN=   95959.50     FROM HESSE     STATUS=OK           218 CALLS     1024 TOTAL
                     EDM=   .38E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .72780        .58055        .58498E-03   -1.5691    
   2  Prefactor     .66613E-09    50.776        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .90153        1.9883        .45411E-03   -1.5689    
   4  norm          .22204E-09    3.7323        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          5.8782        2.8303        .41390E-03   -1.5659    
   6  norm          11.862        17.134        .29081E-03   -1.5639    
   7  norm          6.6328        4.7860        .38949E-03   -1.5656    
   8  norm          1.9762        1.9870        .73693E-03   -1.5680    
   9  Prefactor      .0000        3.2922        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          .55511E-10    .46079        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .59056        1.3067        .70015E-03   -1.5693    
  12  Prefactor     2.2128        .60162        .69121E-02   -1.5410    
  13  norm          8.7716        5.1873        .33822E-03   -1.5649    
  14  Normalizat    1.2614        .15765        .21530       -.84726    
  15  Prefactor     .99331        .16953E-01    .26326E-01   -.92953    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.76792e-07
Minuit parameter uncertainties:
  1  0.580554
  2  0.000373303
  3  1.98825
  4  5.70869e-05
  5  2.83031
  6  17.134
  7  4.78602
  8  1.98702
  9  1.03396e-05
  10  1.04295e-05
  11  1.30674
  12  0.601617
  13  5.18732
  14  0.157711
  15  0.0169536
number of points = 17302
number of fields = 31
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J0035.9+5950_weekly_bin886
RA = 8.9823, Dec = 59.8334
tmin = 774835201, tmax = 775440001
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='13799235', job_status='RUN', time_executed='2025-10-15 22:37:23.217685', time_epoch_executed='1760593043.22' WHERE source_name='4FGL J0035.9+5950' and cadence='weekly' and bin_id='886'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/13799235

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

Retrieving the FT1 file...

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

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

Retrieving 107 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/13799235/ft1_4FGL_J0035.9+5950_weekly_bin886.fits


Retrieving the FT1 file...

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

Retrieving 107 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/13799235/ft2_4FGL_J0035.9+5950_weekly_bin886.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/13799235/ft1_4FGL_J0035.9+5950_weekly_bin886.fits outfile=/lscratch/kocevski/13799235/ft1_filteredMKT_4FGL_J0035.9+5950_weekly_bin886.fits ra=8.9823 dec=59.8334 rad=12.0 tmin=774835201.0 tmax=775440001.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.35
user 5.50
sys 0.49

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/13799235/ft2_4FGL_J0035.9+5950_weekly_bin886.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/13799235/ft2_4FGL_J0035.9+5950_weekly_bin886.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/13799235/ft1_filteredMKT_4FGL_J0035.9+5950_weekly_bin886.fits evtable="EVENTS" outfile="/lscratch/kocevski/13799235/ft1_filtered_4FGL_J0035.9+5950_weekly_bin886.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.68
user 0.28
sys 0.16

Number of photons that the gtmktime cut: 10218

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/13799235/ft1_filtered_4FGL_J0035.9+5950_weekly_bin886.fits" evtable="EVENTS" scfile=/lscratch/kocevski/13799235/ft2_4FGL_J0035.9+5950_weekly_bin886.fits sctable="SC_DATA" outfile=/lscratch/kocevski/13799235/ltcube_774835201_775440001_4FGL_J0035.9+5950_weekly_bin886.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/13799235/ft2_4FGL_J0035.9+5950_weekly_bin886.fits
.....................!
real 22.20
user 21.32
sys 0.42

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/13799235/ft1_filtered_4FGL_J0035.9+5950_weekly_bin886.fits evtable="EVENTS" scfile=/lscratch/kocevski/13799235/ft2_4FGL_J0035.9+5950_weekly_bin886.fits sctable="SC_DATA" expcube=/lscratch/kocevski/13799235/ltcube_774835201_775440001_4FGL_J0035.9+5950_weekly_bin886.fits outfile=/lscratch/kocevski/13799235/expmap_774835201_775440001_4FGL_J0035.9+5950_weekly_bin886.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/13799235/ltcube_774835201_775440001_4FGL_J0035.9+5950_weekly_bin886.fits
.....................!
real 76.96
user 71.68
sys 4.63

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
Extended source HB 3 in ROI with RadialDisk spatial model.
Extended source W 3 in ROI, make sure /sdf/group/fermi/g/LCRepository/Likelihood/ExtendedSources/Extended_8years/Templates/W3.fits is the correct path to the extended template.
Extended source CTB 109 in ROI with RadialDisk spatial model.
Extended source FHES J2208.4+6443 in ROI with RadialGaussian spatial model.
Extended source FHES J2304.0+5406 in ROI with RadialGaussian spatial model.
Added 197 point sources and 5 extended sources
If using unbinned likelihood you will need to rerun gtdiffrsp for the extended sources or rerun the makeModel function with optional argument psForce=True

Setting source of interest to:
4FGL J0035.9+5950 @ 8.9823 59.8334

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/13799235/ft1_filtered_4FGL_J0035.9+5950_weekly_bin886.fits scfile=/lscratch/kocevski/13799235/ft2_4FGL_J0035.9+5950_weekly_bin886.fits outfile=/lscratch/kocevski/13799235/cmap_774835201_775440001_4FGL_J0035.9+5950_weekly_bin886.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=8.9823 yref=59.8334 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.71
user 0.25
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/13799235/ft1_filtered_4FGL_J0035.9+5950_weekly_bin886.fits scfile=/lscratch/kocevski/13799235/ft2_4FGL_J0035.9+5950_weekly_bin886.fits outfile=/lscratch/kocevski/13799235/cmap_HighResolution_774835201_775440001_4FGL_J0035.9+5950_weekly_bin886.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=8.9823 yref=59.8334 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 HDone.

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

Extracting fit parameters...

4FGL J0035.9+5950
   Spectrum: LogParabola
97          norm:  9.015e-01  1.988e+00  0.000e+00  1.000e+06 ( 1.000e-13)
98         alpha:  1.662e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
99          beta:  5.188e-02  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
100           Eb:  3.201e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
676    Prefactor:  9.933e-01  1.695e-02  0.000e+00  1.000e+01 ( 1.000e+00)
677        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
678        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
667   Normalization:  1.261e+00  1.577e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.27
Ra Dec: 8.982 59.833
Photon Flux Upper Limit: 2.38959937322e-08 ph cm-2 s-1
Energy Flux Upper Limit: 4.72006021658e-05 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/13798731/likelihoodResults_774835201_775440001_4FGL_J0035.9+5950_weekly_bin886.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) = 95959.2967348
delta logL = 0.19969901006

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 95959.2889942
delta logL = 0.207439549733

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    1.1091       1.0000          .0000       .10000E+07
     2 'alpha     '    2.2491       1.0000          .0000       5.0000    
     3 'Normalizat'    1.2571       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .99293       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6870E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   95959.29     FROM MIGRAD    STATUS=CONVERGED    101 CALLS      267 TOTAL
                     EDM=   .20E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          1.1090        2.2875        .43559E-04    .53652E-02
   2  alpha         2.2508        .98119        .34079E-01    .50291E-04
   3  Normalizat    1.2572        .15380        .96233E-03   -.30243E-05
   4  Prefactor     .99291        .16966E-01    .11637E-03   -.34388E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 1.10902
  alpha      = 2.25082
  Normalizat = 1.25716
  Prefactor  = 0.992913
 **********
 **   18 **HESSE 
 **********

 FCN=   95959.29     FROM HESSE     STATUS=OK            27 CALLS      294 TOTAL
                     EDM=   .22E-12    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          1.1090        1.7996        .87119E-05   -1.5687    
   2  alpha         2.2508        .78346        .13632E-02   -.99837E-01
   3  Normalizat    1.2572        .15352        .38493E-04   -.84854    
   4  Prefactor     .99291        .16965E-01    .46548E-05   -.92966    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.16712e-13
Minuit parameter uncertainties:
  1  1.79957
  2  0.797027
  3  0.153571
  4  0.0169646
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) = 95959.2889905
delta logL = 0.207443227409

Extracting fit parameters...

4FGL J0035.9+5950
   Spectrum: LogParabola
97          norm:  1.109e+00  1.800e+00  0.000e+00  1.000e+06 ( 1.000e-13)
98         alpha:  2.251e+00  7.970e-01  0.000e+00  5.000e+00 ( 1.000e+00)
99          beta:  5.188e-02  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
100           Eb:  3.201e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
676    Prefactor:  9.929e-01  1.696e-02  0.000e+00  1.000e+01 ( 1.000e+00)
677        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
678        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
667   Normalization:  1.257e+00  1.536e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.27
Ra Dec: 8.982 59.833

Creating a high resolution counts map...
INFO: Auto-setting vmin to -2.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  2.220e+00 [aplpy.core]
Saving /lscratch/kocevski/13798731/cmap_HighResolution_774835201_775440001_4FGL_J0035.9+5950_weekly_bin886.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='4.72e-05', job_status='DONE', photon_flux_upper_limit='2.39e-08', time_completed='2025-10-15 22:48:16.791498', job_id='13798731', GAL2='0.99', fit_tolerance='1e-08', EG2='1.26', EG='1.26', time_epoch_completed='1760593696.79', return_code2='0', ts='0.27', comment='SUCCESS', return_code='0', GAL='0.99', dlogl='2.07e-01', ts2='0.69', photon_index_error='0.00', photon_index='1.66' WHERE bin_id='886' AND source_name='4FGL J0035.9+5950' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Wed Oct 15 22:48:16 PDT 2025

EAD
real 0.58
user 0.26
sys 0.15

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/13799235/ft1_filtered_4FGL_J0035.9+5950_weekly_bin886.fits evtable="EVENTS" scfile=/lscratch/kocevski/13799235/ft2_4FGL_J0035.9+5950_weekly_bin886.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/13799235/Model_4FGL_J0035.9+5950_weekly_bin886.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 CTB 109
adding source EG_v02
adding source FHES J2208.4+6443
adding source FHES J2304.0+5406
adding source GAL_V02
adding source HB 3
adding source W 3
Working on...
/lscratch/kocevski/13799235/ft1_filtered_4FGL_J0035.9+5950_weekly_bin886.fits.....................!
real 570.95
user 566.33
sys 1.13

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/13799235/ft1_filtered_4FGL_J0035.9+5950_weekly_bin886.fits', '/lscratch/kocevski/13799235/ft2_4FGL_J0035.9+5950_weekly_bin886.fits', expMap='/lscratch/kocevski/13799235/expmap_774835201_775440001_4FGL_J0035.9+5950_weekly_bin886.fits', expCube='/lscratch/kocevski/13799235/ltcube_774835201_775440001_4FGL_J0035.9+5950_weekly_bin886.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/13799235/Model_4FGL_J0035.9+5950_weekly_bin886.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J0035.9+5950'

4FGL J0035.9+5950
   Spectrum: LogParabola
97          norm:  3.538e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-13)
98         alpha:  1.662e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
99          beta:  5.188e-02  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
100           Eb:  3.201e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/13799235/ft1_filtered_4FGL_J0035.9+5950_weekly_bin886.fits
Spacecraft file(s): /lscratch/kocevski/13799235/ft2_4FGL_J0035.9+5950_weekly_bin886.fits
Exposure map: /lscratch/kocevski/13799235/expmap_774835201_775440001_4FGL_J0035.9+5950_weekly_bin886.fits
Exposure cube: /lscratch/kocevski/13799235/ltcube_774835201_775440001_4FGL_J0035.9+5950_weekly_bin886.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/13799235/Model_4FGL_J0035.9+5950_weekly_bin886.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) = 95960.0811112

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .72757       1.0000          .0000       .10000E+07
     2 'Prefactor '    .40108E-03   1.0000          .0000       .10000E+07
     3 'norm      '    .90506       1.0000          .0000       .10000E+07
     4 'norm      '    .43909E-07   1.0000          .0000       .10000E+07
     5 'norm      '    5.8801       1.0000          .0000       .10000E+07
     6 'norm      '    11.846       1.0000          .0000       .10000E+07
     7 'norm      '    6.6298       1.0000          .0000       .10000E+07
     8 'norm      '    1.9772       1.0000          .0000       .10000E+07
     9 'Prefactor '    .10978E-05   1.0000          .0000       .10000E+07
    10 'norm      '    .46518E-07   1.0000          .0000       .10000E+07
    11 'Prefactor '    .59125       1.0000          .0000       .10000E+07
    12 'Prefactor '    2.2130       1.0000         .10000E-03   10000.    
    13 'norm      '    8.7705       1.0000          .0000       .10000E+07
    14 'Normalizat'    1.2615       1.0000         .10000E-01   10.000    
    15 'Prefactor '    .99329       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6870E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   95959.50     FROM MIGRAD    STATUS=CONVERGED     88 CALLS      806 TOTAL
                     EDM=   .86E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.3%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .72780        .57923       -.40781E-07   -.55332E-02
   2  Prefactor     .66613E-09    51.214        .19468E-05** at limit **
   3  norm          .90153        1.9728        .30148E-06    .52142E-03
   4  norm          .22204E-09    3.7397       -.59155E-06** at limit **
   5  norm          5.8782        2.8246       -.11903E-07    .23661E-02
   6  norm          11.862        1.6879       -.21932E-06    .11720    
   7  norm          6.6328        4.7685       -.86800E-06   -.22094E-01
   8  norm          1.9762        1.9762       -.32140E-07    .13559E-02
   9  Prefactor      .0000        3.3015        .43796E-06** at limit **
  10  norm          .55511E-10    .45819       -.51010E-07** at limit **
  11  Prefactor     .59056        1.2814        .10689E-06    .19456E-03
  12  Prefactor     2.2128        .60020       -.18528E-06    .73823E-04
  13  norm          8.7716        5.1782       -.50605E-06   -.13193E-01
  14  Normalizat    1.2614        .15669        .29486E-05    .22641E-03
  15  Prefactor     .99331        .17139E-01    .54140E-06    .25327E-02
                               ERR DEF=  .500    
Final values: 
  norm       = 0.727798
  Prefactor  = 6.66134e-10
  norm       = 0.901526
  norm       = 2.22045e-10
  norm       = 5.87821
  norm       = 11.8621
  norm       = 6.63277
  norm       = 1.97619
  Prefactor  = 0
  norm       = 5.55112e-11
  Prefactor  = 0.590564
  Prefactor  = 2.21283
  norm       = 8.77158
  Normalizat = 1.26139
  Prefactor  = 0.993308
 **********
 **   18 **HESSE 
 **********

 FCN=   95959.50     FROM HESSE     STATUS=OK           218 CALLS     1024 TOTAL
                     EDM=   .38E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .72780        .58055        .58498E-03   -1.5691    
   2  Prefactor     .66613E-09    50.776        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .90153        1.9883        .45411E-03   -1.5689    
   4  norm          .22204E-09    3.7323        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          5.8782        2.8303        .41390E-03   -1.5659    
   6  norm          11.862        17.134        .29081E-03   -1.5639    
   7  norm          6.6328        4.7860        .38949E-03   -1.5656    
   8  norm          1.9762        1.9870        .73693E-03   -1.5680    
   9  Prefactor      .0000        3.2922        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          .55511E-10    .46079        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .59056        1.3067        .70015E-03   -1.5693    
  12  Prefactor     2.2128        .60162        .69121E-02   -1.5410    
  13  norm          8.7716        5.1873        .33822E-03   -1.5649    
  14  Normalizat    1.2614        .15765        .21530       -.84726    
  15  Prefactor     .99331        .16953E-01    .26326E-01   -.92953    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.76792e-07
Minuit parameter uncertainties:
  1  0.580554
  2  0.000373303
  3  1.98825
  4  5.70869e-05
  5  2.83031
  6  17.134
  7  4.78602
  8  1.98702
  9  1.03396e-05
  10  1.04295e-05
  11  1.30674
  12  0.601617
  13  5.18732
  14  0.157711
  15  0.0169536
Done.

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

Extracting fit parameters...

4FGL J0035.9+5950
   Spectrum: LogParabola
97          norm:  9.015e-01  1.988e+00  0.000e+00  1.000e+06 ( 1.000e-13)
98         alpha:  1.662e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
99          beta:  5.188e-02  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
100           Eb:  3.201e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
676    Prefactor:  9.933e-01  1.695e-02  0.000e+00  1.000e+01 ( 1.000e+00)
677        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
678        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
667   Normalization:  1.261e+00  1.577e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.27
Ra Dec: 8.982 59.833
Photon Flux Upper Limit: 2.38959937322e-08 ph cm-2 s-1
Energy Flux Upper Limit: 4.72006021658e-05 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/13799235/likelihoodResults_774835201_775440001_4FGL_J0035.9+5950_weekly_bin886.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) = 95959.2967348
delta logL = 0.19969901006

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 95959.2889942
delta logL = 0.207439549733

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    1.1091       1.0000          .0000       .10000E+07
     2 'alpha     '    2.2491       1.0000          .0000       5.0000    
     3 'Normalizat'    1.2571       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .99293       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6870E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   95959.29     FROM MIGRAD    STATUS=CONVERGED    101 CALLS      267 TOTAL
                     EDM=   .20E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          1.1090        2.2875        .43559E-04    .53652E-02
   2  alpha         2.2508        .98119        .34079E-01    .50291E-04
   3  Normalizat    1.2572        .15380        .96233E-03   -.30243E-05
   4  Prefactor     .99291        .16966E-01    .11637E-03   -.34388E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 1.10902
  alpha      = 2.25082
  Normalizat = 1.25716
  Prefactor  = 0.992913
 **********
 **   18 **HESSE 
 **********

 FCN=   95959.29     FROM HESSE     STATUS=OK            27 CALLS      294 TOTAL
                     EDM=   .22E-12    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          1.1090        1.7996        .87119E-05   -1.5687    
   2  alpha         2.2508        .78346        .13632E-02   -.99837E-01
   3  Normalizat    1.2572        .15352        .38493E-04   -.84854    
   4  Prefactor     .99291        .16965E-01    .46548E-05   -.92966    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.16712e-13
Minuit parameter uncertainties:
  1  1.79957
  2  0.797027
  3  0.153571
  4  0.0169646
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) = 95959.2889905
delta logL = 0.207443227409

Extracting fit parameters...

4FGL J0035.9+5950
   Spectrum: LogParabola
97          norm:  1.109e+00  1.800e+00  0.000e+00  1.000e+06 ( 1.000e-13)
98         alpha:  2.251e+00  7.970e-01  0.000e+00  5.000e+00 ( 1.000e+00)
99          beta:  5.188e-02  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
100           Eb:  3.201e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
676    Prefactor:  9.929e-01  1.696e-02  0.000e+00  1.000e+01 ( 1.000e+00)
677        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
678        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
667   Normalization:  1.257e+00  1.536e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.27
Ra Dec: 8.982 59.833

Creating a high resolution counts map...
INFO: Auto-setting vmin to -2.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  2.220e+00 [aplpy.core]
Saving /lscratch/kocevski/13799235/cmap_HighResolution_774835201_775440001_4FGL_J0035.9+5950_weekly_bin886.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='4.72e-05', job_status='DONE', photon_flux_upper_limit='2.39e-08', time_completed='2025-10-15 23:13:28.303257', job_id='13799235', GAL2='0.99', fit_tolerance='1e-08', EG2='1.26', EG='1.26', time_epoch_completed='1760595208.3', return_code2='0', ts='0.27', comment='SUCCESS', return_code='0', GAL='0.99', dlogl='2.07e-01', ts2='0.69', photon_index_error='0.00', photon_index='1.66' WHERE bin_id='886' AND source_name='4FGL J0035.9+5950' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Wed Oct 15 23:13:28 PDT 2025

