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


Performing analysis on: 4FGL_J0739.2+0137_weekly_bin853
RA = 114.82, Dec = 1.6216
tmin = 754876801, tmax = 755481601
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='59976925', job_status='RUN', time_executed='2024-12-10 00:11:33.308033', time_epoch_executed='1733818293.31' WHERE source_name='4FGL J0739.2+0137' and cadence='weekly' and bin_id='853'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/59976925

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

Retrieving the FT1 file...

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

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

Retrieving 107 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/59976925/ft1_4FGL_J0739.2+0137_weekly_bin853.fits


Retrieving the FT1 file...

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

Retrieving 107 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/59976925/ft2_4FGL_J0739.2+0137_weekly_bin853.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/59976925/ft1_4FGL_J0739.2+0137_weekly_bin853.fits outfile=/lscratch/kocevski/59976925/ft1_filteredMKT_4FGL_J0739.2+0137_weekly_bin853.fits ra=114.82 dec=1.6216 rad=12.0 tmin=754876801.0 tmax=755481601.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.42
user 2.76
sys 0.35

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/59976925/ft2_4FGL_J0739.2+0137_weekly_bin853.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/59976925/ft2_4FGL_J0739.2+0137_weekly_bin853.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/59976925/ft1_filteredMKT_4FGL_J0739.2+0137_weekly_bin853.fits evtable="EVENTS" outfile="/lscratch/kocevski/59976925/ft1_filtered_4FGL_J0739.2+0137_weekly_bin853.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.55
user 0.19
sys 0.20

Number of photons that the gtmktime cut: 2620

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/59976925/ft1_filtered_4FGL_J0739.2+0137_weekly_bin853.fits" evtable="EVENTS" scfile=/lscratch/kocevski/59976925/ft2_4FGL_J0739.2+0137_weekly_bin853.fits sctable="SC_DATA" outfile=/lscratch/kocevski/59976925/ltcube_754876801_755481601_4FGL_J0739.2+0137_weekly_bin853.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/59976925/ft2_4FGL_J0739.2+0137_weekly_bin853.fits
.....................!
real 24.29
user 23.15
sys 0.45

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/59976925/ft1_filtered_4FGL_J0739.2+0137_weekly_bin853.fits evtable="EVENTS" scfile=/lscratch/kocevski/59976925/ft2_4FGL_J0739.2+0137_weekly_bin853.fits sctable="SC_DATA" expcube=/lscratch/kocevski/59976925/ltcube_754876801_755481601_4FGL_J0739.2+0137_weekly_bin853.fits outfile=/lscratch/kocevski/59976925/expmap_754876801_755481601_4FGL_J0739.2+0137_weekly_bin853.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/59976925/ltcube_754876801_755481601_4FGL_J0739.2+0137_weekly_bin853.fits
.....................!
real 60.01
user 55.88
sys 3.44

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 Rosette in ROI, make sure /sdf/group/fermi/g/LCRepository/Likelihood/ExtendedSources/Extended_8years/Templates/Rosette.fits is the correct path to the extended template.
Extended source Monoceros in ROI with RadialGaussian spatial model.
Added 149 point sources and 2 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 J0739.2+0137 @ 114.82 1.6216

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/59976925/ft1_filtered_4FGL_J0739.2+0137_weekly_bin853.fits scfile=/lscratch/kocevski/59976925/ft2_4FGL_J0739.2+0137_weekly_bin853.fits outfile=/lscratch/kocevski/59976925/cmap_754876801_755481601_4FGL_J0739.2+0137_weekly_bin853.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=114.82 yref=1.6216 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.41
user 0.19
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/59976925/ft1_filtered_4FGL_J0739.2+0137_weekly_bin853.fits scfile=/lscratch/kocevski/59976925/ft2_4FGL_J0739.2+0137_weekly_bin853.fits outfile=/lscratch/kocevski/59976925/cmap_HighResolution_754876801_755481601_4FGL_J0739.2+0137_weekly_bin853.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=114.82 yref=1.6216 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.39
user 0.20
sys 0.12

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/59976925/ft1_filtered_4FGL_J0739.2+0137_weekly_bin853.fits evtable="EVENTS" scfile=/lscratch/kocevski/59976925/ft2_4FGL_J0739.2+0137_weekly_bin853.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/59976925/Model_4FGL_J0739.2+0137_weekly_bin853.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
adding source Monoceros
adding source Rosette
Working on...
/lscratch/kocevski/59976925/ft1_filtered_4FGL_J0739.2+0137_weekly_bin853.fits....................!
real 134.95
user 132.76
sys 1.11

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/59976925/ft1_filtered_4FGL_J0739.2+0137_weekly_bin853.fits', '/lscratch/kocevski/59976925/ft2_4FGL_J0739.2+0137_weekly_bin853.fits', expMap='/lscratch/kocevski/59976925/expmap_754876801_755481601_4FGL_J0739.2+0137_weekly_bin853.fits', expCube='/lscratch/kocevski/59976925/ltcube_754876801_755481601_4FGL_J0739.2+0137_weekly_bin853.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/59976925/Model_4FGL_J0739.2+0137_weekly_bin853.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J0739.2+0137'

4FGL J0739.2+0137
   Spectrum: LogParabola
204         norm:  4.536e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-11)
205        alpha:  2.313e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
206         beta:  9.503e-02  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
207           Eb:  4.724e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/59976925/ft1_filtered_4FGL_J0739.2+0137_weekly_bin853.fits
Spacecraft file(s): /lscratch/kocevski/59976925/ft2_4FGL_J0739.2+0137_weekly_bin853.fits
Exposure map: /lscratch/kocevski/59976925/expmap_754876801_755481601_4FGL_J0739.2+0137_weekly_bin853.fits
Exposure cube: /lscratch/kocevski/59976925/ltcube_754876801_755481601_4FGL_J0739.2+0137_weekly_bin853.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/59976925/Model_4FGL_J0739.2+0137_weekly_bin853.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) = 28098.788899

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    9.4088       1.0000          .0000       .10000E+07
     2 'norm      '    .20055E-04   1.0000          .0000       .10000E+07
     3 'norm      '    .24821       1.0000          .0000       .10000E+07
     4 'norm      '    1.9716       1.0000          .0000       .10000E+07
     5 'Prefactor '    12.584       1.0000          .0000       .10000E+07
     6 'Prefactor '    .32458       1.0000          .0000       .10000E+07
     7 'Prefactor '    32.896       1.0000          .0000       .10000E+07
     8 'norm      '    2.2680       1.0000          .0000       .10000E+07
     9 'Prefactor '    .52330E-06   1.0000          .0000       .10000E+07
    10 'Prefactor '    9.2731       1.0000          .0000       .10000E+07
    11 'norm      '    .44837E-04   1.0000          .0000       .10000E+07
    12 'Prefactor '    7.1368       1.0000          .0000       .10000E+07
    13 'Prefactor '    .40228E-05   1.0000          .0000       .10000E+07
    14 'Prefactor '    .89776E-03   1.0000          .0000       .10000E+07
    15 'norm      '    11.169       1.0000          .0000       .10000E+07
    16 'norm      '    .64393E-08   1.0000          .0000       .10000E+07
    17 'norm      '    4.5063       1.0000          .0000       .10000E+07
    18 'norm      '    11.678       1.0000          .0000       .10000E+07
    19 'norm      '    5.7256       1.0000          .0000       .10000E+07
    20 'Normalizat'    .89263       1.0000         .10000E-01   10.000    
    21 'Prefactor '    .99767       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5100E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   28098.70     FROM MIGRAD    STATUS=CONVERGED    128 CALLS     1301 TOTAL
                     EDM=   .16E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.1%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          9.3893        7.0143        .85754E-07    .34543E-01
   2  norm          .26296E-06    6.8169        .39195E-06** at limit **
   3  norm          .25172        6.4433       -.13332E-06   -.19255E-03
   4  norm          1.9758        1.2392        .29422E-07    .19886E-02
   5  Prefactor     12.289        6.0434       -.91751E-07   -.55479E-02
   6  Prefactor     .23309        8.7616        .41473E-06** at limit **
   7  Prefactor     32.609        16.899       -.23014E-06    .10652    
   8  norm          2.2699        1.0051        .41556E-07    .39623E-02
   9  Prefactor     .22204E-09    3.5101        .85254E-07** at limit **
  10  Prefactor     9.2727        3.0181       -.34150E-07   -.10732E-02
  11  norm          .61690E-06    7.1931        .46436E-06** at limit **
  12  Prefactor     7.1396        5.8418        .23724E-08    .20304E-02
  13  Prefactor      .0000        2.1640        .68048E-07** at limit **
  14  Prefactor     .76716E-07    12.371        .80814E-06** at limit **
  15  norm          11.194        5.4980       -.25538E-07    .25231E-02
  16  norm           .0000        .76223       -.10704E-06** at limit **
  17  norm          4.5062        .94098        .58651E-07    .12466E-01
  18  norm          11.814        5.5074        .85651E-07    .84032E-01
  19  norm          5.7218        2.1672        .52954E-08   -.77499E-03
  20  Normalizat    .89254        .11971       -.13569E-05    .17813E-04
  21  Prefactor     .99781        .41561E-01    .46223E-06    .29883E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 9.38929
  norm       = 2.62956e-07
  norm       = 0.251722
  norm       = 1.97585
  Prefactor  = 12.2886
  Prefactor  = 0.233088
  Prefactor  = 32.6086
  norm       = 2.26991
  Prefactor  = 2.22045e-10
  Prefactor  = 9.27272
  norm       = 6.16895e-07
  Prefactor  = 7.13958
  Prefactor  = 0
  Prefactor  = 7.67164e-08
  norm       = 11.1938
  norm       = 0
  norm       = 4.50618
  norm       = 11.8136
  norm       = 5.72175
  Normalizat = 0.892535
  Prefactor  = 0.997809
 **********
 **   18 **HESSE 
 **********

 FCN=   28098.70     FROM HESSE     STATUS=OK           377 CALLS     1678 TOTAL
                     EDM=   .41E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          9.3893        7.0603        .32647E-03   -1.5647    
   2  norm          .26296E-06    7.3726        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .25172        .89863        .80432E-02   -1.5698    
   4  norm          1.9758        1.2566        .73813E-03   -1.5680    
   5  Prefactor     12.289        19.260        .28212E-03   -1.5638    
   6  Prefactor     .23309        2.1501        .98803E-02   -1.5698    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     32.609        22.401        .17438E-03   -1.5594    
   8  norm          2.2699        1.0113        .68170E-03   -1.5678    
   9  Prefactor     .22204E-09    3.5145        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     9.2727        3.0216        .32887E-03   -1.5647    
  11  norm          .61690E-06    8.5551        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     7.1396        5.8481        .37525E-03   -1.5655    
  13  Prefactor      .0000        2.1428        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .76716E-07    12.602        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          11.194        5.4961        .29953E-03   -1.5641    
  16  norm           .0000        .74188        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          4.5062        .94359        .47404E-03   -1.5666    
  18  norm          11.814        10.867        .29289E-03   -1.5639    
  19  norm          5.7218        2.1709        .41953E-03   -1.5660    
  20  Normalizat    .89254        .11734        .99961E-01   -.96723    
  21  Prefactor     .99781        .39814E-01    .34013E-01   -.92803    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.08847e-07
Minuit parameter uncertainties:
  1  7.06035
  2  0.00278477
  3  0.898629
  4  1.25663
  5  19.2598
  6  1.41586
  7  22.401
  8  1.01133
  9  5.71267e-05
  10  3.02157
  11  0.00459456
  12  5.84814
  13  2.47709e-06
  14  0.00196687
  15  5.49612
  16  3.03827e-06
  17  0.943595
  18  10.8672
  19  2.17088
  20  0.117371
  21  0.0398152
Done.

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

Extracting fit parameters...

4FGL J0739.2+0137
   Spectrum: LogParabola
204         norm:  2.270e+00  1.011e+00  0.000e+00  1.000e+06 ( 1.000e-11)
205        alpha:  2.313e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
206         beta:  9.503e-02  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
207           Eb:  4.724e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
499    Prefactor:  9.978e-01  3.982e-02  0.000e+00  1.000e+01 ( 1.000e+00)
500        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
501        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
498   Normalization:  8.925e-01  1.174e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 9.66
Ra Dec: 114.820 1.622
Photon Index (Fixed Index): 2.31 +/- 0.00
Photon Flux (Fixed Index): 5.62e-08 +/- 2.50e-08
Energy Flux (Fixed Index): 1.82e-05 +/- 8.10e-06

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) = 28098.6213479
delta logL = 0.0833985393874

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 28098.6172784
delta logL = 0.0874679832523

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   28098.62     FROM MIGRAD    STATUS=CONVERGED     54 CALLS      214 TOTAL
                     EDM=   .39E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          2.1881        1.2728        .69572E-03   -.21082E-01
   2  alpha         2.1267        .43950        .41745       -.13337E-03
   3  Normalizat    .90077        .10566        .99548E-01    .10131E-03
   4  Prefactor     .99669        .37475E-01    .34029E-01   -.33277E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 2.18809
  alpha      = 2.12673
  Normalizat = 0.900774
  Prefactor  = 0.996687
 **********
 **   18 **HESSE 
 **********

 FCN=   28098.62     FROM HESSE     STATUS=OK            33 CALLS      247 TOTAL
                     EDM=   .62E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          2.1881        1.0227        .10738E-04   -1.5678    
   2  alpha         2.1267        .43093        .22289E-01   -.14987    
   3  Normalizat    .90077        .11065        .44117E-03   -.96433    
   4  Prefactor     .99669        .39039E-01    .15038E-03   -.92840    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.17949e-10
Minuit parameter uncertainties:
  1  1.02274
  2  0.433147
  3  0.110674
  4  0.0390397
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) = 28098.6172762
delta logL = 0.0874702063884

Extracting fit parameters...

4FGL J0739.2+0137
   Spectrum: LogParabola
204         norm:  2.188e+00  1.023e+00  0.000e+00  1.000e+06 ( 1.000e-11)
205        alpha:  2.127e+00  4.331e-01  0.000e+00  5.000e+00 ( 1.000e+00)
206         beta:  9.503e-02  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
207           Eb:  4.724e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
499    Prefactor:  9.967e-01  3.904e-02  0.000e+00  1.000e+01 ( 1.000e+00)
500        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
501        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
498   Normalization:  9.008e-01  1.107e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 9.80
Ra Dec: 114.820 1.622
Photon Index (Free Index): 2.13 +/- 0.43
Photon Flux (Free Index): 4.73e-08 +/- 2.91e-08
Energy Flux (Free Index): 1.89e-05 +/- 8.85e-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/59976925/cmap_HighResolution_754876801_755481601_4FGL_J0739.2+0137_weekly_bin853.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='5.62e-08', energy_flux2='1.89e-05', photon_flux_error='2.50e-08', dlogl='8.75e-02', energy_flux='1.82e-05', photon_flux2='4.73e-08', job_status='DONE', time_completed='2024-12-10 00:20:42.815658', photon_index_error2='0.43', photon_index2='2.13', ts='9.66', fit_tolerance='1e-08', GAL='1.00', photon_index_error='0.00', energy_flux_error2='8.85e-06', EG='0.89', time_epoch_completed='1733818842.82', return_code='0', job_id='59976925', GAL2='1.00', EG2='0.90', return_code2='0', energy_flux_error='8.10e-06', photon_flux_error2='2.91e-08', ts2='9.80', photon_index='2.31' WHERE bin_id='853' AND source_name='4FGL J0739.2+0137' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Dec 10 00:20:42 PST 2024

