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


Performing analysis on: 4FGL_J2032.6+4053_weekly_bin805
RA = 308.153, Dec = 40.8939
tmin = 725846401, tmax = 726451201
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='38431315', job_status='RUN', time_executed='2024-01-18 21:50:54.512753', time_epoch_executed='1705643454.51' WHERE source_name='4FGL J2032.6+4053' and cadence='weekly' and bin_id='805'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/38431315

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

Retrieving the FT1 file...

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

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

Retrieving 103 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/38431315/ft1_4FGL_J2032.6+4053_weekly_bin805.fits


Retrieving the FT1 file...

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

Retrieving 103 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/38431315/ft2_4FGL_J2032.6+4053_weekly_bin805.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/38431315/ft1_4FGL_J2032.6+4053_weekly_bin805.fits outfile=/lscratch/kocevski/38431315/ft1_filteredMKT_4FGL_J2032.6+4053_weekly_bin805.fits ra=308.153 dec=40.8939 rad=12.0 tmin=725846401.0 tmax=726451201.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.75
user 3.49
sys 0.21

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/38431315/ft2_4FGL_J2032.6+4053_weekly_bin805.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/38431315/ft2_4FGL_J2032.6+4053_weekly_bin805.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/38431315/ft1_filteredMKT_4FGL_J2032.6+4053_weekly_bin805.fits evtable="EVENTS" outfile="/lscratch/kocevski/38431315/ft1_filtered_4FGL_J2032.6+4053_weekly_bin805.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.40
user 0.23
sys 0.13

Number of photons that the gtmktime cut: 20102

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/38431315/ft1_filtered_4FGL_J2032.6+4053_weekly_bin805.fits" evtable="EVENTS" scfile=/lscratch/kocevski/38431315/ft2_4FGL_J2032.6+4053_weekly_bin805.fits sctable="SC_DATA" outfile=/lscratch/kocevski/38431315/ltcube_725846401_726451201_4FGL_J2032.6+4053_weekly_bin805.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/38431315/ft2_4FGL_J2032.6+4053_weekly_bin805.fits
.....................!
real 20.28
user 19.89
sys 0.23

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/38431315/ft1_filtered_4FGL_J2032.6+4053_weekly_bin805.fits evtable="EVENTS" scfile=/lscratch/kocevski/38431315/ft2_4FGL_J2032.6+4053_weekly_bin805.fits sctable="SC_DATA" expcube=/lscratch/kocevski/38431315/ltcube_725846401_726451201_4FGL_J2032.6+4053_weekly_bin805.fits outfile=/lscratch/kocevski/38431315/expmap_725846401_726451201_4FGL_J2032.6+4053_weekly_bin805.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/38431315/ltcube_725846401_726451201_4FGL_J2032.6+4053_weekly_bin805.fits
.....................!
real 72.94
user 68.24
sys 3.91

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 gamma Cygni in ROI with RadialDisk spatial model.
Extended source Cygnus Cocoon in ROI with RadialGaussian spatial model.
Extended source HB 21 in ROI with RadialDisk spatial model.
Extended source Cygnus Loop in ROI, make sure /sdf/group/fermi/g/LCRepository/Likelihood/ExtendedSources/Extended_8years/Templates/CygnusLoop.fits is the correct path to the extended template.
Extended source FHES J2129.9+5833 in ROI with RadialGaussian spatial model.
Added 185 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 J2032.6+4053 @ 308.153 40.8939

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/38431315/ft1_filtered_4FGL_J2032.6+4053_weekly_bin805.fits scfile=/lscratch/kocevski/38431315/ft2_4FGL_J2032.6+4053_weekly_bin805.fits outfile=/lscratch/kocevski/38431315/cmap_725846401_726451201_4FGL_J2032.6+4053_weekly_bin805.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=308.153 yref=40.8939 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.47
user 0.25
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/38431315/ft1_filtered_4FGL_J2032.6+4053_weekly_bin805.fits scfile=/lscratch/kocevski/38431315/ft2_4FGL_J2032.6+4053_weekly_bin805.fits outfile=/lscratch/kocevski/38431315/cmap_HighResolution_725846401_726451201_4FGL_J2032.6+4053_weekly_bin805.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=308.153 yref=40.8939 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.42
user 0.26
sys 0.13

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/38431315/ft1_filtered_4FGL_J2032.6+4053_weekly_bin805.fits evtable="EVENTS" scfile=/lscratch/kocevski/38431315/ft2_4FGL_J2032.6+4053_weekly_bin805.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/38431315/Model_4FGL_J2032.6+4053_weekly_bin805.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 Cygnus Cocoon
adding source Cygnus Loop
adding source EG_v02
adding source FHES J2129.9+5833
adding source GAL_V02
adding source HB 21
adding source gamma Cygni
Working on...
/lscratch/kocevski/38431315/ft1_filtered_4FGL_J2032.6+4053_weekly_bin805.fits.....................!
real 1552.05
user 1543.34
sys 1.34

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/38431315/ft1_filtered_4FGL_J2032.6+4053_weekly_bin805.fits', '/lscratch/kocevski/38431315/ft2_4FGL_J2032.6+4053_weekly_bin805.fits', expMap='/lscratch/kocevski/38431315/expmap_725846401_726451201_4FGL_J2032.6+4053_weekly_bin805.fits', expCube='/lscratch/kocevski/38431315/ltcube_725846401_726451201_4FGL_J2032.6+4053_weekly_bin805.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/38431315/Model_4FGL_J2032.6+4053_weekly_bin805.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J2032.6+4053'

4FGL J2032.6+4053
   Spectrum: LogParabola
360         norm:  3.020e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-12)
361        alpha:  2.963e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
362         beta:  3.173e-01  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
363           Eb:  1.188e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/38431315/ft1_filtered_4FGL_J2032.6+4053_weekly_bin805.fits
Spacecraft file(s): /lscratch/kocevski/38431315/ft2_4FGL_J2032.6+4053_weekly_bin805.fits
Exposure map: /lscratch/kocevski/38431315/expmap_725846401_726451201_4FGL_J2032.6+4053_weekly_bin805.fits
Exposure cube: /lscratch/kocevski/38431315/ltcube_725846401_726451201_4FGL_J2032.6+4053_weekly_bin805.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/38431315/Model_4FGL_J2032.6+4053_weekly_bin805.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) = 177257.093752

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .15810E-06   1.0000          .0000       .10000E+07
     2 'norm      '    .62025E-04   1.0000          .0000       .10000E+07
     3 'norm      '    .12477E-05   1.0000          .0000       .10000E+07
     4 'Prefactor '    4.1980       1.0000          .0000       .10000E+07
     5 'norm      '    .88704       1.0000          .0000       .10000E+07
     6 'Prefactor '    7.7792       1.0000          .0000       .10000E+07
     7 'norm      '    2.8814       1.0000          .0000       .10000E+07
     8 'norm      '    10.193       1.0000          .0000       .10000E+07
     9 'Prefactor '    1.7576       1.0000         .10000E-03   10000.    
    10 'norm      '    .33584E-07   1.0000          .0000       .10000E+07
    11 'norm      '    .28468E-01   1.0000          .0000       .10000E+07
    12 'norm      '    6.3463       1.0000          .0000       .10000E+07
    13 'norm      '    .16137E-06   1.0000          .0000       .10000E+07
    14 'Prefactor '    .80055E-05   1.0000          .0000       .10000E+07
    15 'Prefactor '    .67439E-05   1.0000          .0000       .10000E+07
    16 'norm      '    .22252       1.0000          .0000       .10000E+07
    17 'norm      '    4.1490       1.0000          .0000       .10000E+07
    18 'Normalizat'    1.3756       1.0000         .10000E-01   10.000    
    19 'Prefactor '    .99659       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6920E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   177256.3     FROM MIGRAD    STATUS=CONVERGED     99 CALLS     1154 TOTAL
                     EDM=   .13E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .6%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor      .0000        1.5303       -.40194E-07** at limit **
   2  norm           .0000        5.3716       -.55285E-07** at limit **
   3  norm           .0000        2.6478       -.71001E-07** at limit **
   4  Prefactor     4.2122        1.0782        .40878E-09   -.80630E-02
   5  norm          .88755        .44695       -.13531E-08    .62353E-02
   6  Prefactor     7.6769        1.0103       -.16119E-09   -.26212E-03
   7  norm          2.8809        .88706       -.16883E-07    .23677E-03
   8  norm          10.196        2.6674       -.14175E-08    .65009E-04
   9  Prefactor     1.7575        .11461        .12902E-07   -.74657E-04
  10  norm           .0000        1.4412        .26250E-07** at limit **
  11  norm          .28866E-08    .75423       -.14202E-07** at limit **
  12  norm          6.3457        2.6953        .51357E-08    .35270E-04
  13  norm           .0000        1.3290        .63369E-08** at limit **
  14  Prefactor      .0000        5.0959        .27749E-08** at limit **
  15  Prefactor      .0000        3.2373       -.87590E-07** at limit **
  16  norm          .22274        .57986        .37939E-07** at limit **
  17  norm          4.1367        3.6153        .13020E-07   -.56542E-04
  18  Normalizat    1.3755        .15648        .10373E-06   -.10456E-05
  19  Prefactor     .99662        .13349E-01   -.18076E-07    .29565E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0
  norm       = 0
  norm       = 0
  Prefactor  = 4.21221
  norm       = 0.887551
  Prefactor  = 7.67692
  norm       = 2.88093
  norm       = 10.1964
  Prefactor  = 1.75748
  norm       = 0
  norm       = 2.88658e-09
  norm       = 6.3457
  norm       = 0
  Prefactor  = 0
  Prefactor  = 0
  norm       = 0.222736
  norm       = 4.13666
  Normalizat = 1.37553
  Prefactor  = 0.996619
 **********
 **   18 **HESSE 
 **********

 FCN=   177256.3     FROM HESSE     STATUS=OK           314 CALLS     1468 TOTAL
                     EDM=   .30E-03    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor      .0000        1.5240        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  norm           .0000        5.3663        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm           .0000        2.6149        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     4.2122        7.0824        .49162E-03   -1.5667    
   5  norm          .88755        2.5564        .46660E-03   -1.5689    
   6  Prefactor     7.6769        11.216        .35928E-03   -1.5653    
   7  norm          2.8809        .88678        .59848E-03   -1.5674    
   8  norm          10.196        2.6862        .31361E-03   -1.5644    
   9  Prefactor     1.7575        .11556        .77598E-02   -1.5443    
  10  norm           .0000        1.4053        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  norm          .28866E-08    .42664        .96342E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm          6.3457        2.7061        .39820E-03   -1.5658    
  13  norm           .0000        1.3137        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor      .0000        5.0780        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor      .0000        3.2390        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          .22274        .57919        .11388E-02   -1.5699    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          4.1367        3.6131        .49460E-03   -1.5667    
  18  Normalizat    1.3755        .16452        .30024       -.81339    
  19  Prefactor     .99662        .13506E-01    .28254E-01   -.92842    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 0.000296991
Minuit parameter uncertainties:
  1  3.89396e-07
  2  1.08686e-05
  3  2.00236e-06
  4  7.08238
  5  2.55637
  6  11.2164
  7  0.886782
  8  2.68616
  9  0.115562
  10  1.28318e-07
  11  7.0348e-05
  12  2.70609
  13  8.21894e-07
  14  1.65442e-05
  15  6.69336e-06
  16  0.579188
  17  3.61308
  18  0.164584
  19  0.0135062
Done.

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

Extracting fit parameters...

4FGL J2032.6+4053
   Spectrum: LogParabola
360         norm:  6.346e+00  2.706e+00  0.000e+00  1.000e+06 ( 1.000e-12)
361        alpha:  2.963e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
362         beta:  3.173e-01  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
363           Eb:  1.188e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
681    Prefactor:  9.966e-01  1.351e-02  0.000e+00  1.000e+01 ( 1.000e+00)
682        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
683        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
677   Normalization:  1.376e+00  1.646e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 6.43
Ra Dec: 308.153 40.894
Photon Index (Fixed Index): 2.96 +/- 0.00
Photon Flux (Fixed Index): 1.54e-07 +/- 6.55e-08
Energy Flux (Fixed Index): 4.55e-05 +/- 1.94e-05

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) = 177256.157014
delta logL = 0.192688876588

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 177256.155323
delta logL = 0.194379919849

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    3.8810       1.0000          .0000       .10000E+07
     2 'alpha     '    3.3965       1.0000          .0000       5.0000    
     3 'Normalizat'    1.3612       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .99626       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6920E+05   .2000E-04
 **********
 MACHINE ACCURACY LIMITS FURTHER IMPROVEMENT.

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
 MIGRAD TERMINATED WITHOUT CONVERGENCE.

 FCN=   177256.2     FROM MIGRAD    STATUS=FAILED        88 CALLS      343 TOTAL
                     EDM=   .52E-04    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          3.8810        27.657        .10239E-03   -.46975E-01
   2  alpha         3.3965        4.0741        .25335E-01    .45242E-02
   3  Normalizat    1.3612        .17027        .13554E-02    .12366E-02
   4  Prefactor     .99626        .11014E-01    .12485E-03    .21824E-02
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   177256.2     FROM SIMPLEX   STATUS=UNCHANGED     86 CALLS      429 TOTAL
                     EDM=   .14E-04    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          3.8810        27.657        .13063E-04   -.46975E-01
   2  alpha         3.3965        4.0741        .17080E-02    .45242E-02
   3  Normalizat    1.3612        .17027        .71416E-04    .12366E-02
   4  Prefactor     .99626        .11014E-01    .11949E-04    .21824E-02
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   177256.2     FROM MIGRAD    STATUS=CONVERGED     31 CALLS      460 TOTAL
                     EDM=   .33E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          3.8812        6.9502        .40956E-05   -.38107E-01
   2  alpha         3.3964        1.1180        .50671E-02   -.24691E-03
   3  Normalizat    1.3612        .16240        .54215E-04    .11877E-02
   4  Prefactor     .99626        .13165E-01    .49941E-05    .26370E-02
                               ERR DEF=  .500    
Final values: 
  norm       = 3.8812
  alpha      = 3.39643
  Normalizat = 1.36121
  Prefactor  = 0.996263
 **********
 **   18 **HESSE 
 **********

 FCN=   177256.2     FROM HESSE     STATUS=OK            23 CALLS      483 TOTAL
                     EDM=   .33E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          3.8812        4.6502        .16382E-06   -1.5669    
   2  alpha         3.3964        .76523        .20268E-03    .36674    
   3  Normalizat    1.3612        .15843        .10843E-04   -.81757    
   4  Prefactor     .99626        .13112E-01    .99883E-06   -.92854    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.31184e-09
Minuit parameter uncertainties:
  1  4.65016
  2  0.779651
  3  0.158491
  4  0.0131121
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) = 177256.155323
delta logL = 0.194379920809

Extracting fit parameters...

4FGL J2032.6+4053
   Spectrum: LogParabola
360         norm:  3.881e+00  4.650e+00  0.000e+00  1.000e+06 ( 1.000e-12)
361        alpha:  3.396e+00  7.797e-01  0.000e+00  5.000e+00 ( 1.000e+00)
362         beta:  3.173e-01  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
363           Eb:  1.188e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
681    Prefactor:  9.963e-01  1.311e-02  0.000e+00  1.000e+01 ( 1.000e+00)
682        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
683        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
677   Normalization:  1.361e+00  1.585e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 6.86
Ra Dec: 308.153 40.894
Photon Index (Free Index): 3.40 +/- 0.78
Photon Flux (Free Index): 2.01e-07 +/- 9.91e-08
Energy Flux (Free Index): 4.70e-05 +/- 1.89e-05

Creating a high resolution counts map...
INFO: Auto-setting vmin to -3.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  3.330e+00 [aplpy.core]
Saving /lscratch/kocevski/38431315/cmap_HighResolution_725846401_726451201_4FGL_J2032.6+4053_weekly_bin805.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='1.54e-07', energy_flux2='4.70e-05', photon_flux_error='6.55e-08', dlogl='1.94e-01', energy_flux='4.55e-05', photon_flux2='2.01e-07', job_status='DONE', time_completed='2024-01-18 23:01:19.851513', photon_index_error2='0.78', photon_index2='3.40', ts='6.43', fit_tolerance='1e-08', GAL='1.00', photon_index_error='0.00', energy_flux_error2='1.89e-05', EG='1.38', time_epoch_completed='1705647679.85', return_code='0', job_id='38431315', GAL2='1.00', EG2='1.36', return_code2='0', energy_flux_error='1.94e-05', photon_flux_error2='9.91e-08', ts2='6.86', photon_index='2.96' WHERE bin_id='805' AND source_name='4FGL J2032.6+4053' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Thu Jan 18 23:01:19 PST 2024

