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


Performing analysis on: 4FGL_J1438.9+3710_weekly_bin803
RA = 219.74, Dec = 37.1752
tmin = 724636801, tmax = 725241601
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='36902452', job_status='RUN', time_executed='2023-12-26 00:56:00.330268', time_epoch_executed='1703580960.33' WHERE source_name='4FGL J1438.9+3710' and cadence='weekly' and bin_id='803'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/36902452

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

Retrieving the FT1 file...

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

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

Retrieving 107 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/36902452/ft1_4FGL_J1438.9+3710_weekly_bin803.fits


Retrieving the FT1 file...

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

Retrieving 107 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/36902452/ft2_4FGL_J1438.9+3710_weekly_bin803.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/36902452/ft1_4FGL_J1438.9+3710_weekly_bin803.fits outfile=/lscratch/kocevski/36902452/ft1_filteredMKT_4FGL_J1438.9+3710_weekly_bin803.fits ra=219.74 dec=37.1752 rad=12.0 tmin=724636801.0 tmax=725241601.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 4.94
user 4.63
sys 0.22

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/36902452/ft2_4FGL_J1438.9+3710_weekly_bin803.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/36902452/ft2_4FGL_J1438.9+3710_weekly_bin803.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/36902452/ft1_filteredMKT_4FGL_J1438.9+3710_weekly_bin803.fits evtable="EVENTS" outfile="/lscratch/kocevski/36902452/ft1_filtered_4FGL_J1438.9+3710_weekly_bin803.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.69
user 0.22
sys 0.12

Number of photons that the gtmktime cut: 1278

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/36902452/ft1_filtered_4FGL_J1438.9+3710_weekly_bin803.fits" evtable="EVENTS" scfile=/lscratch/kocevski/36902452/ft2_4FGL_J1438.9+3710_weekly_bin803.fits sctable="SC_DATA" outfile=/lscratch/kocevski/36902452/ltcube_724636801_725241601_4FGL_J1438.9+3710_weekly_bin803.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/36902452/ft2_4FGL_J1438.9+3710_weekly_bin803.fits
.....................!
real 21.96
user 21.29
sys 0.22

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/36902452/ft1_filtered_4FGL_J1438.9+3710_weekly_bin803.fits evtable="EVENTS" scfile=/lscratch/kocevski/36902452/ft2_4FGL_J1438.9+3710_weekly_bin803.fits sctable="SC_DATA" expcube=/lscratch/kocevski/36902452/ltcube_724636801_725241601_4FGL_J1438.9+3710_weekly_bin803.fits outfile=/lscratch/kocevski/36902452/expmap_724636801_725241601_4FGL_J1438.9+3710_weekly_bin803.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/36902452/ltcube_724636801_725241601_4FGL_J1438.9+3710_weekly_bin803.fits
.....................!
real 76.93
user 72.21
sys 4.39

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 176 point sources and 0 extended sources

Setting source of interest to:
4FGL J1438.9+3710 @ 219.74 37.1752

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/36902452/ft1_filtered_4FGL_J1438.9+3710_weekly_bin803.fits scfile=/lscratch/kocevski/36902452/ft2_4FGL_J1438.9+3710_weekly_bin803.fits outfile=/lscratch/kocevski/36902452/cmap_724636801_725241601_4FGL_J1438.9+3710_weekly_bin803.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=219.74 yref=37.1752 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.25
sys 0.12

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/36902452/ft1_filtered_4FGL_J1438.9+3710_weekly_bin803.fits scfile=/lscratch/kocevski/36902452/ft2_4FGL_J1438.9+3710_weekly_bin803.fits outfile=/lscratch/kocevski/36902452/cmap_HighResolution_724636801_725241601_4FGL_J1438.9+3710_weekly_bin803.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=219.74 yref=37.1752 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.24
sys 0.14

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/36902452/ft1_filtered_4FGL_J1438.9+3710_weekly_bin803.fits evtable="EVENTS" scfile=/lscratch/kocevski/36902452/ft2_4FGL_J1438.9+3710_weekly_bin803.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/36902452/Model_4FGL_J1438.9+3710_weekly_bin803.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/36902452/ft1_filtered_4FGL_J1438.9+3710_weekly_bin803.fits.....................!
real 42.49
user 41.09
sys 1.04

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/36902452/ft1_filtered_4FGL_J1438.9+3710_weekly_bin803.fits', '/lscratch/kocevski/36902452/ft2_4FGL_J1438.9+3710_weekly_bin803.fits', expMap='/lscratch/kocevski/36902452/expmap_724636801_725241601_4FGL_J1438.9+3710_weekly_bin803.fits', expCube='/lscratch/kocevski/36902452/ltcube_724636801_725241601_4FGL_J1438.9+3710_weekly_bin803.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/36902452/Model_4FGL_J1438.9+3710_weekly_bin803.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1438.9+3710'

4FGL J1438.9+3710
   Spectrum: LogParabola
282         norm:  4.709e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-12)
283        alpha:  2.310e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
284         beta:  1.080e-01  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
285           Eb:  6.335e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/36902452/ft1_filtered_4FGL_J1438.9+3710_weekly_bin803.fits
Spacecraft file(s): /lscratch/kocevski/36902452/ft2_4FGL_J1438.9+3710_weekly_bin803.fits
Exposure map: /lscratch/kocevski/36902452/expmap_724636801_725241601_4FGL_J1438.9+3710_weekly_bin803.fits
Exposure cube: /lscratch/kocevski/36902452/ltcube_724636801_725241601_4FGL_J1438.9+3710_weekly_bin803.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/36902452/Model_4FGL_J1438.9+3710_weekly_bin803.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) = 13803.0333876

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .37284E-05   1.0000          .0000       .10000E+07
     2 'norm      '    .13811E-03   1.0000          .0000       .10000E+07
     3 'Prefactor '    11.227       1.0000          .0000       .10000E+07
     4 'norm      '    3.9353       1.0000          .0000       .10000E+07
     5 'Prefactor '    .32375E-04   1.0000          .0000       .10000E+07
     6 'Prefactor '    .29025E-03   1.0000          .0000       .10000E+07
     7 'Prefactor '    4.4883       1.0000          .0000       .10000E+07
     8 'norm      '    .30235E-03   1.0000          .0000       .10000E+07
     9 'norm      '    5.5750       1.0000          .0000       .10000E+07
    10 'Prefactor '    .19272E-03   1.0000          .0000       .10000E+07
    11 'norm      '    .13646E-05   1.0000          .0000       .10000E+07
    12 'Prefactor '    4.5072       1.0000          .0000       .10000E+07
    13 'Prefactor '    .94711E-04   1.0000          .0000       .10000E+07
    14 'Prefactor '    .69095E-06   1.0000          .0000       .10000E+07
    15 'norm      '    .83056       1.0000          .0000       .10000E+07
    16 'norm      '    .20560E-03   1.0000          .0000       .10000E+07
    17 'Prefactor '    .28100E-02   1.0000          .0000       .10000E+07
    18 'Prefactor '    59.442       1.0000          .0000       .10000E+07
    19 'Prefactor '    10.078       1.0000          .0000       .10000E+07
    20 'Prefactor '    .97263E-04   1.0000          .0000       .10000E+07
    21 'norm      '    .95313       1.0000          .0000       .10000E+07
    22 'Prefactor '    1.2377       1.0000          .0000       .10000E+07
    23 'norm      '    .94530E-02   1.0000          .0000       .10000E+07
    24 'Normalizat'    1.2199       1.0000         .10000E-01   10.000    
    25 'Prefactor '    .67672       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5650E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   13803.02     FROM MIGRAD    STATUS=CONVERGED    161 CALLS     2132 TOTAL
                     EDM=   .43E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.5%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .11102E-09    .90492        .91117E-07** at limit **
   2  norm          .31086E-08    3.2655       -.62623E-06** at limit **
   3  Prefactor     11.212        2.1031        .23244E-07    .39244E-03
   4  norm          3.9357        2.2363        .74184E-07   -.13463E-02
   5  Prefactor     .11102E-09    1.7373        .51765E-06** at limit **
   6  Prefactor     .22204E-09    2.1564       -.22021E-06** at limit **
   7  Prefactor     4.4877        2.3502        .76642E-07   -.26178E-02
   8  norm          .68279E-08    3.4911        .83898E-06** at limit **
   9  norm          5.5172        3.5485        .47587E-07   -.33058E-03
  10  Prefactor     .11047E-07    5.7246        .33445E-06** at limit **
  11  norm          .27756E-08    2.7608        .12317E-06** at limit **
  12  Prefactor     4.5036        7.0692        .15802E-06    .76540E-03
  13  Prefactor     .28311E-08    2.4020       -.17347E-06** at limit **
  14  Prefactor     .11102E-09    1.0157       -.37792E-07** at limit **
  15  norm          .83092        .78942       -.16146E-06   -.62394E-02
  16  norm          .96517E-06    14.657       -.19585E-05** at limit **
  17  Prefactor     .61062E-09    9.3728       -.34725E-06** at limit **
  18  Prefactor     59.221        11.889       -.55958E-06    .17224    
  19  Prefactor     10.059        3.7869       -.26455E-07   -.29408E-02
  20  Prefactor     .54956E-08    3.0803       -.24691E-06** at limit **
  21  norm          .95233        .66869       -.42245E-07    .12480E-02
  22  Prefactor     1.2433        6.5207       -.39722E-06   -.32989E-04
  23  norm          .61856E-06    94.758       -.30281E-05** at limit **
  24  Normalizat    1.2200        .12768        .94017E-06   -.78178E-04
  25  Prefactor     .67687        .13666       -.19664E-05   -.59228E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 1.11022e-10
  norm       = 3.10862e-09
  Prefactor  = 11.2116
  norm       = 3.9357
  Prefactor  = 1.11022e-10
  Prefactor  = 2.22045e-10
  Prefactor  = 4.48774
  norm       = 6.82787e-09
  norm       = 5.5172
  Prefactor  = 1.10467e-08
  norm       = 2.77556e-09
  Prefactor  = 4.50363
  Prefactor  = 2.83107e-09
  Prefactor  = 1.11022e-10
  norm       = 0.83092
  norm       = 9.65172e-07
  Prefactor  = 6.10623e-10
  Prefactor  = 59.2211
  Prefactor  = 10.0588
  Prefactor  = 5.4956e-09
  norm       = 0.952328
  Prefactor  = 1.24328
  norm       = 6.18561e-07
  Normalizat = 1.22002
  Prefactor  = 0.67687
 **********
 **   18 **HESSE 
 **********

 FCN=   13803.02     FROM HESSE     STATUS=OK           483 CALLS     2615 TOTAL
                     EDM=   .57E-05    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .11102E-09    .90626        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  norm          .31086E-08    3.3412        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     11.212        11.322        .29874E-03   -1.5641    
   4  norm          3.9357        2.2415        .50828E-03   -1.5668    
   5  Prefactor     .11102E-09    1.7377        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .22204E-09    2.1633        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     4.4877        2.3566        .47501E-03   -1.5666    
   8  norm          .68279E-08    3.6338        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          5.5172        3.5556        .42525E-03   -1.5661    
  10  Prefactor     .11047E-07    5.8773        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  norm          .27756E-08    3.1275        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     4.5036        7.1067        .47399E-03   -1.5666    
  13  Prefactor     .28311E-08    5.5126        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .11102E-09    1.0183        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          .83092        .81256        .50684E-03   -1.5690    
  16  norm          .96517E-06    1.2703        .42118E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     .61062E-09    9.2685        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     59.221        46.125        .12971E-03   -1.5554    
  19  Prefactor     10.059        8.6136        .31539E-03   -1.5645    
  20  Prefactor     .54956E-08    5.3447        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  norm          .95233        .70756        .42154E-03   -1.5688    
  22  Prefactor     1.2433        7.2132        .10083E-02   -1.5686    
  23  norm          .61856E-06    5.5998        .78118E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Normalizat    1.2200        .11082        .34420E-01   -.85986    
  25  Prefactor     .67687        .11789        .64852E-01   -1.0444    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 5.66621e-06
Minuit parameter uncertainties:
  1  1.74392e-05
  2  0.000202945
  3  11.3219
  4  2.24153
  5  2.70757e-05
  6  4.14297e-05
  7  2.35661
  8  0.000314666
  9  3.55561
  10  0.0005092
  11  0.000186333
  12  7.10667
  13  0.00024927
  14  1.94488e-05
  15  0.812563
  16  0.00221452
  17  0.000148927
  18  46.1248
  19  8.61362
  20  0.000342868
  21  0.707565
  22  5.98935
  23  0.00372224
  24  0.110838
  25  0.117935
Done.

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

Extracting fit parameters...

4FGL J1438.9+3710
   Spectrum: LogParabola
282         norm:  5.517e+00  3.556e+00  0.000e+00  1.000e+06 ( 1.000e-12)
283        alpha:  2.310e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
284         beta:  1.080e-01  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
285           Eb:  6.335e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
562    Prefactor:  6.769e-01  1.179e-01  0.000e+00  1.000e+01 ( 1.000e+00)
563        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
564        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
561   Normalization:  1.220e+00  1.108e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 4.48
Ra Dec: 219.740 37.175
Photon Index (Fixed Index): 2.31 +/- 0.00
Photon Flux (Fixed Index): 2.50e-08 +/- 1.61e-08
Energy Flux (Fixed Index): 8.57e-06 +/- 5.52e-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) = 13802.9992215
delta logL = 0.0217242847793

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 13802.998798
delta logL = 0.0221477651248

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   13803.00     FROM MIGRAD    STATUS=CONVERGED     88 CALLS      245 TOTAL
                     EDM=   .22E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          5.5783        3.6756        .17005E-04    .44753E-02
   2  alpha         2.1799        .61104        .22696E-01    .53109E-04
   3  Normalizat    1.2239        .12645        .20186E-03   -.43029E-04
   4  Prefactor     .67427        .13669        .28744E-03   -.38128E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 5.57827
  alpha      = 2.17987
  Normalizat = 1.22387
  Prefactor  = 0.674267
 **********
 **   18 **HESSE 
 **********

 FCN=   13803.00     FROM HESSE     STATUS=OK            23 CALLS      268 TOTAL
                     EDM=   .23E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          5.5783        3.6783        .68020E-06   -1.5661    
   2  alpha         2.1799        .61134        .90784E-03   -.12841    
   3  Normalizat    1.2239        .12657        .80743E-05   -.85868    
   4  Prefactor     .67427        .13680        .11498E-04   -1.0454    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.2837e-10
Minuit parameter uncertainties:
  1  3.67831
  2  0.617715
  3  0.1266
  4  0.136866
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) = 13802.9987979
delta logL = 0.0221478928852

Extracting fit parameters...

4FGL J1438.9+3710
   Spectrum: LogParabola
282         norm:  5.578e+00  3.678e+00  0.000e+00  1.000e+06 ( 1.000e-12)
283        alpha:  2.180e+00  6.177e-01  0.000e+00  5.000e+00 ( 1.000e+00)
284         beta:  1.080e-01  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
285           Eb:  6.335e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
562    Prefactor:  6.743e-01  1.369e-01  0.000e+00  1.000e+01 ( 1.000e+00)
563        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
564        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
561   Normalization:  1.224e+00  1.266e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 4.52
Ra Dec: 219.740 37.175
Photon Index (Free Index): 2.18 +/- 0.62
Photon Flux (Free Index): 2.22e-08 +/- 2.01e-08
Energy Flux (Free Index): 8.82e-06 +/- 5.94e-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/36902452/cmap_HighResolution_724636801_725241601_4FGL_J1438.9+3710_weekly_bin803.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='2.50e-08', energy_flux2='8.82e-06', photon_flux_error='1.61e-08', dlogl='2.21e-02', energy_flux='8.57e-06', photon_flux2='2.22e-08', job_status='DONE', time_completed='2023-12-26 01:03:56.456996', photon_index_error2='0.62', photon_index2='2.18', ts='4.48', fit_tolerance='1e-08', GAL='0.68', photon_index_error='0.00', energy_flux_error2='5.94e-06', EG='1.22', time_epoch_completed='1703581436.46', return_code='0', job_id='36902452', GAL2='0.67', EG2='1.22', return_code2='0', energy_flux_error='5.52e-06', photon_flux_error2='2.01e-08', ts2='4.52', photon_index='2.31' WHERE bin_id='803' AND source_name='4FGL J1438.9+3710' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Dec 26 01:03:56 PST 2023

