/nfs/farm/g/glast/g/LCRepository/bin/miniconda2/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)


Waiting 18 seconds before starting...
Proceeding.

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 make4FGLxml version 01r04.
The default diffuse model files and names are for pass 8 and 4FGL and assume you have v11r5p3 of the Fermi Science Tools or higher.

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

/nfs/farm/g/glast/g/LCRepository/bin/miniconda2/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 = 7478
number of fields = 22
No RA_SUN column yet. Adding RA_SUN/DEC_SUN columns.
Done.


Performing analysis on: 4FGL_J1738.2+4000_daily_bin36
RA = 264.56, Dec = 40.0099
tmin = 248659201, tmax = 248918401
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='939920', job_status='RUN', time_executed='2021-09-18 00:45:47.457281', time_epoch_executed='1631951147.46' WHERE source_name='4FGL J1738.2+4000' and cadence='daily' and bin_id='36'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/939920

Creating custom pfile directory:
/scratch/kocevski/939920/pfiles/

Retrieving the FT1 file...

Issuing command:
/afs/slac.stanford.edu/g/glast/ground/bin/datacat find --group FT1 --filter 'nMetStop>=248659201.0 && nMetStart<248918401.0' /Data/Flight/Reprocess/P305

Issuing command:
/afs/slac.stanford.edu/g/glast/ground/bin/datacat find --group FT1 --filter 'nMetStart>564945418 && nMetStop>=248659201.0 && nMetStart<248918401.0' /Data/Flight/Level1/LPA

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/939920/ft1_4FGL_J1738.2+4000_daily_bin36.fits


Retrieving the FT1 file...

Issuing command:
/afs/slac.stanford.edu/g/glast/ground/bin/datacat find --group FT2 --filter 'nMetStop>=248659201.0 && nMetStart<248918401.0' /Data/Flight/Level1/LPA

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/939920/ft2_4FGL_J1738.2+4000_daily_bin36.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/939920/ft1_4FGL_J1738.2+4000_daily_bin36.fits outfile=/scratch/kocevski/939920/ft1_filteredMKT_4FGL_J1738.2+4000_daily_bin36.fits ra=264.56 dec=40.0099 rad=12.0 tmin=248659201.0 tmax=248918401.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 1.39
user 1.22
sys 0.16

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/939920/ft2_4FGL_J1738.2+4000_daily_bin36.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/939920/ft2_4FGL_J1738.2+4000_daily_bin36.fits sctable="SC_DATA" filter="IN_SAA!=T && LIVETIME>0 && gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nogrb.gti',(START+STOP)/2) && (angsep(RA_SUN,DEC_SUN,RA_ZENITH,DEC_ZENITH)>115 || gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nosolarflares.gti',(START+STOP)/2))" roicut=no evfile=/scratch/kocevski/939920/ft1_filteredMKT_4FGL_J1738.2+4000_daily_bin36.fits evtable="EVENTS" outfile="/scratch/kocevski/939920/ft1_filtered_4FGL_J1738.2+4000_daily_bin36.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('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nogrb.gti',(START+STOP)/2) && (angsep(RA_SUN,DEC_SUN,RA_ZENITH,DEC_ZENITH)>115 || gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nosolarflares.gti',(START+STOP)/2))
real 0.48
user 0.33
sys 0.14

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/939920/ft1_filtered_4FGL_J1738.2+4000_daily_bin36.fits" evtable="EVENTS" scfile=/scratch/kocevski/939920/ft2_4FGL_J1738.2+4000_daily_bin36.fits sctable="SC_DATA" outfile=/scratch/kocevski/939920/ltcube_248659201_248918401_4FGL_J1738.2+4000_daily_bin36.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 /scratch/kocevski/939920/ft2_4FGL_J1738.2+4000_daily_bin36.fits
.....................!
real 12.72
user 12.35
sys 0.34

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/939920/ft1_filtered_4FGL_J1738.2+4000_daily_bin36.fits evtable="EVENTS" scfile=/scratch/kocevski/939920/ft2_4FGL_J1738.2+4000_daily_bin36.fits sctable="SC_DATA" expcube=/scratch/kocevski/939920/ltcube_248659201_248918401_4FGL_J1738.2+4000_daily_bin36.fits outfile=/scratch/kocevski/939920/expmap_248659201_248918401_4FGL_J1738.2+4000_daily_bin36.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 /scratch/kocevski/939920/ltcube_248659201_248918401_4FGL_J1738.2+4000_daily_bin36.fits
.....................!
real 191.68
user 186.35
sys 5.01

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

Setting source of interest to:
4FGL J1738.2+4000 @ 264.56 40.0099

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/939920/ft1_filtered_4FGL_J1738.2+4000_daily_bin36.fits scfile=/scratch/kocevski/939920/ft2_4FGL_J1738.2+4000_daily_bin36.fits outfile=/scratch/kocevski/939920/cmap_248659201_248918401_4FGL_J1738.2+4000_daily_bin36.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=264.56 yref=40.0099 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.52
user 0.36
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/939920/ft1_filtered_4FGL_J1738.2+4000_daily_bin36.fits scfile=/scratch/kocevski/939920/ft2_4FGL_J1738.2+4000_daily_bin36.fits outfile=/scratch/kocevski/939920/cmap_HighResolution_248659201_248918401_4FGL_J1738.2+4000_daily_bin36.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=264.56 yref=40.0099 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.53
user 0.38
sys 0.14

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/939920/ft1_filtered_4FGL_J1738.2+4000_daily_bin36.fits evtable="EVENTS" scfile=/scratch/kocevski/939920/ft2_4FGL_J1738.2+4000_daily_bin36.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/939920/Model_4FGL_J1738.2+4000_daily_bin36.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...
/scratch/kocevski/939920/ft1_filtered_4FGL_J1738.2+4000_daily_bin36.fits.....................!
real 55.41
user 54.10
sys 1.21

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/939920/ft1_filtered_4FGL_J1738.2+4000_daily_bin36.fits', '/scratch/kocevski/939920/ft2_4FGL_J1738.2+4000_daily_bin36.fits', expMap='/scratch/kocevski/939920/expmap_248659201_248918401_4FGL_J1738.2+4000_daily_bin36.fits', expCube='/scratch/kocevski/939920/ltcube_248659201_248918401_4FGL_J1738.2+4000_daily_bin36.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/939920/Model_4FGL_J1738.2+4000_daily_bin36.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1738.2+4000'

4FGL J1738.2+4000
   Spectrum: PowerLaw
326    Prefactor:  6.394e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-14)
327        Index:  2.517e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
328        Scale:  1.525e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/939920/ft1_filtered_4FGL_J1738.2+4000_daily_bin36.fits
Spacecraft file(s): /scratch/kocevski/939920/ft2_4FGL_J1738.2+4000_daily_bin36.fits
Exposure map: /scratch/kocevski/939920/expmap_248659201_248918401_4FGL_J1738.2+4000_daily_bin36.fits
Exposure cube: /scratch/kocevski/939920/ltcube_248659201_248918401_4FGL_J1738.2+4000_daily_bin36.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/939920/Model_4FGL_J1738.2+4000_daily_bin36.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) = 6687.06324253

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    1.3791       1.0000         .10000E-03   10000.    
     3 'Prefactor '    1.4252       1.0000         .10000E-03   10000.    
     4 'Prefactor '    6.6539       1.0000         .10000E-03   10000.    
     5 'norm      '    .99913       1.0000         .10000E-03   10000.    
     6 'norm      '    1.2871       1.0000         .10000E-03   10000.    
     7 'Prefactor '    6.8719       1.0000         .10000E-03   10000.    
     8 'norm      '    .10848E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    15.634       1.0000         .10000E-03   10000.    
    10 'norm      '    3.1865       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    5.6910       1.0000         .10000E-03   10000.    
    14 'Prefactor '    39.116       1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    76.950       1.0000         .10000E-03   10000.    
    18 'Prefactor '    16.227       1.0000         .10000E-03   10000.    
    19 'Prefactor '    31.497       1.0000         .10000E-03   10000.    
    20 'Prefactor '    7.4061       1.0000         .10000E-03   10000.    
    21 'Prefactor '    .52714E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    67.224       1.0000         .10000E-03   10000.    
    23 'norm      '    2.4516       1.0000         .10000E-03   10000.    
    24 'norm      '    .10012E-03   1.0000         .10000E-03   10000.    
    25 'norm      '    1.9980       1.0000         .10000E-03   10000.    
    26 'Prefactor '    1.5586       1.0000         .10000E-03   10000.    
    27 'Prefactor '    5.6715       1.0000         .10000E-03   10000.    
    28 'Normalizat'    .97391       1.0000         .10000E-01   10.000    
    29 'Prefactor '    .75737       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6840E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   6687.056     FROM MIGRAD    STATUS=CONVERGED    723 CALLS     3726 TOTAL
                     EDM=   .19E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.1%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .10000E-03    15.016        .49010E-07** at limit **
   2  Prefactor     1.3785        2.0108       -.18658E-07   -.10176E-03
   3  Prefactor     1.4259        2.0801        .33562E-07   -.11830E-03
   4  Prefactor     6.6534        3.9147       -.71068E-07   -.38003E-04
   5  norm          .99991        1.5297        .14303E-07   -.83899E-04
   6  norm          1.2871        .96945       -.73647E-09   -.44536E-04
   7  Prefactor     6.8700        8.1765       -.25261E-06   -.41778E-04
   8  norm          .10000E-03    .45886        .21026E-07** at limit **
   9  norm          15.631        12.309       -.88993E-07    .24983E-04
  10  norm          3.1863        1.9116       -.80022E-07   -.55875E-04
  11  Prefactor     .10000E-03    2.2594        .21907E-07** at limit **
  12  Prefactor     .10000E-03    101.23       -.19708E-04** at limit **
  13  norm          5.6878        6.2731        .63444E-06    .50271E-04
  14  Prefactor     39.110        64.549       -.60177E-05   -.10659E-04
  15  Prefactor     .10000E-03    38.480       -.24765E-05** at limit **
  16  norm          .10000E-03    2.4537        .48585E-07** at limit **
  17  Prefactor     76.956        60.548        .42567E-05    .32768E-04
  18  Prefactor     16.227        37.139       -.21354E-05   -.11758E-05
  19  Prefactor     31.489        15.541        .12577E-05   -.35336E-04
  20  Prefactor     7.4061        6.9907        .55122E-06    .29624E-04
  21  Prefactor     .10003E-03    54.731        .17749E-04** at limit **
  22  Prefactor     67.199        69.398       -.20371E-04   -.22148E-03
  23  norm          2.4514        1.5832        .34358E-07   -.47497E-04
  24  norm          .10000E-03    96.503        .16703E-04** at limit **
  25  norm          1.9982        2.4558        .11324E-05   -.30595E-02
  26  Prefactor     1.5583        4.8464        .29358E-07   -.22028E-03
  27  Prefactor     5.6715        3.9014       -.33506E-06   -.77972E-04
  28  Normalizat    .97393        .20864        .79708E-07   -.36873E-04
  29  Prefactor     .75730        .12056        .41155E-06   -.97057E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 0.0001
  Prefactor  = 1.37846
  Prefactor  = 1.42592
  Prefactor  = 6.65335
  norm       = 0.999909
  norm       = 1.28708
  Prefactor  = 6.87
  norm       = 0.0001
  norm       = 15.6312
  norm       = 3.18632
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 5.68784
  Prefactor  = 39.1102
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 76.9563
  Prefactor  = 16.2271
  Prefactor  = 31.4886
  Prefactor  = 7.40608
  Prefactor  = 0.000100034
  Prefactor  = 67.1993
  norm       = 2.45144
  norm       = 0.0001
  norm       = 1.99824
  Prefactor  = 1.55833
  Prefactor  = 5.67145
  Normalizat = 0.97393
  Prefactor  = 0.7573
 **********
 **   18 **HESSE 
 **********

 FCN=   6687.056     FROM HESSE     STATUS=OK           565 CALLS     4291 TOTAL
                     EDM=   .19E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .10000E-03    15.017        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     1.3785        2.0554        .93056E-04   -1.5473    
   3  Prefactor     1.4259        2.1123        .92867E-04   -1.5469    
   4  Prefactor     6.6534        3.8925        .11553E-03   -1.5192    
   5  norm          .99991        1.2869        .11879E-02   -1.5508    
   6  norm          1.2871        .95287        .66815E-04   -1.5481    
   7  Prefactor     6.8700        8.0118        .15305E-03   -1.5184    
   8  norm          .10000E-03    2.0856        .10283E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          15.631        12.284        .10130E-03   -1.4917    
  10  norm          3.1863        1.9063        .82258E-04   -1.5351    
  11  Prefactor     .10000E-03    2.3050        .12001E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    101.83        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          5.6878        6.2436        .16838E-03   -1.5231    
  14  Prefactor     39.110        64.357        .64087E-04   -1.4456    
  15  Prefactor     .10000E-03    38.502        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          .10000E-03    2.4672        .12506E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     76.956        60.431        .45776E-04   -1.3951    
  18  Prefactor     16.227        37.095        .99425E-04   -1.4902    
  19  Prefactor     31.489        15.516        .71394E-04   -1.4585    
  20  Prefactor     7.4061        7.0169        .14738E-03   -1.5164    
  21  Prefactor     .10003E-03    57.768        .21131E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     67.199        70.443        .48953E-04   -1.4067    
  23  norm          2.4514        1.5863        .80337E-04   -1.5395    
  24  norm          .10000E-03    96.346        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  norm          1.9982        6.0653        .14651E-02   -1.5425    
  26  Prefactor     1.5583        4.8462        .30261E-03   -1.5458    
  27  Prefactor     5.6715        3.9009        .12989E-03   -1.5232    
  28  Normalizat    .97393        .24981        .29631E-03   -.93909    
  29  Prefactor     .75730        .14459        .20161E-03   -1.0132    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.89099e-08
Minuit parameter uncertainties:
  1  7.50716e-07
  2  2.05546
  3  2.11237
  4  3.89263
  5  1.28696
  6  0.952882
  7  8.01302
  8  4.03545e-06
  9  12.2862
  10  1.90633
  11  4.26905e-06
  12  0.000451545
  13  6.24435
  14  64.4719
  15  4.78463e-05
  16  5.76715e-06
  17  60.4793
  18  37.1472
  19  15.5179
  20  7.01766
  21  0.00281827
  22  70.5307
  23  1.58629
  24  0.000298396
  25  6.06717
  26  4.84739
  27  3.90109
  28  0.250113
  29  0.144662
Done.

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

Extracting fit parameters...

4FGL J1738.2+4000
   Spectrum: PowerLaw
326    Prefactor:  3.911e+01  6.447e+01  1.000e-04  1.000e+04 ( 1.000e-14)
327        Index:  2.517e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
328        Scale:  1.525e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
681    Prefactor:  7.573e-01  1.447e-01  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
680   Normalization:  9.739e-01  2.501e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.56
Ra Dec: 264.560 40.010
Photon Flux Upper Limit: 1.07e-07 ph cm-2 s-1
Energy Flux Upper Limit: 8.37e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/939920/likelihoodResults_248659201_248918401_4FGL_J1738.2+4000_daily_bin36.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) = 6687.05520437
delta logL = 0.000511176480359

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6687.05446312
delta logL = 0.00125242390732

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    42.451       1.0000         .10000E-03   10000.    
     2 'Index     '    2.4593       1.0000          .0000       10.000    
     3 'Normalizat'    .97544       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .75691       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6840E+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.
 MIGRAD TERMINATED WITHOUT CONVERGENCE.

 FCN=   6687.054     FROM MIGRAD    STATUS=FAILED       101 CALLS      282 TOTAL
                     EDM=   .22E-07    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     42.591        111.11        .61528E-04   -.36696E-04
   2  Index         2.4535        1.4795        .99189E-02    .38099E-03
   3  Normalizat    .97550        .23291        .29610E-03   -.22630E-03
   4  Prefactor     .75661        .14076        .20169E-03    .35830E-03
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   6687.054     FROM SIMPLEX   STATUS=UNCHANGED     76 CALLS      358 TOTAL
                     EDM=   .16E-04    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     42.591        111.11        .58472E-03   -1.4402    
   2  Index         2.4535        1.4795        .11645E-02   -.53437    
   3  Normalizat    .97550        .23291        .40151E-03   -.93856    
   4  Prefactor     .75661        .14076        .24680E-03   -1.0135    
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   6687.054     FROM MIGRAD    STATUS=CONVERGED     28 CALLS      386 TOTAL
                     EDM=   .23E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     42.591        94.006        .12306E-04    .48041E-05
   2  Index         2.4535        1.2574        .19838E-02   -.30832E-05
   3  Normalizat    .97550        .23234        .11844E-04    .76789E-06
   4  Prefactor     .75661        .14055        .40339E-04    .19164E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 42.591
  Index      = 2.4535
  Normalizat = 0.975503
  Prefactor  = 0.756608
 **********
 **   18 **HESSE 
 **********

 FCN=   6687.054     FROM HESSE     STATUS=OK            23 CALLS      409 TOTAL
                     EDM=   .26E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     42.591        91.341        .24611E-05   -1.4402    
   2  Index         2.4535        1.2217        .79351E-04   -.53437    
   3  Normalizat    .97550        .23240        .23688E-05   -.93856    
   4  Prefactor     .75661        .14059        .80678E-05   -1.0135    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.56022e-12
Minuit parameter uncertainties:
  1  91.6431
  2  1.23874
  3  0.232638
  4  0.140661
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/939920': No such file or directory
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) = 6687.05443714
delta logL = 0.00127841088579

Extracting fit parameters...

4FGL J1738.2+4000
   Spectrum: PowerLaw
326    Prefactor:  4.259e+01  9.164e+01  1.000e-04  1.000e+04 ( 1.000e-14)
327        Index:  2.454e+00  1.239e+00  0.000e+00  1.000e+01 (-1.000e+00)
328        Scale:  1.525e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
681    Prefactor:  7.566e-01  1.407e-01  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
680   Normalization:  9.755e-01  2.326e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.56
Ra Dec: 264.560 40.010

Creating a high resolution counts map...
INFO: Auto-setting vmin to -2.500e-04 [aplpy.core]
INFO: Auto-setting vmax to  2.775e-03 [aplpy.core]
Saving /scratch/kocevski/939920/cmap_HighResolution_248659201_248918401_4FGL_J1738.2+4000_daily_bin36.png

Cleaning up...

** Nuclear option initiated! **
rmdir /scratch/kocevski/939920

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='8.37e-03', job_status='DONE', photon_flux_upper_limit='1.07e-07', time_completed='2021-09-18 01:01:47.257041', job_id='939920', GAL2='0.76', fit_tolerance='1e-08', EG2='0.98', EG='0.97', time_epoch_completed='1631952107.26', return_code2='0', ts='0.56', comment='SUCCESS', return_code='0', GAL='0.76', dlogl='1.28e-03', ts2='0.57', photon_index_error='0.00', photon_index='2.52' WHERE bin_id='36' AND source_name='4FGL J1738.2+4000' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep 18 01:01:47 PDT 2021


------------------------------------------------------------
Sender: LSF System <scs@bullet0116>
Subject: Job 939920: <4FGL_J1738.2+4000_daily_bin36> in cluster <slac> Done

Job <4FGL_J1738.2+4000_daily_bin36> was submitted from host <rhel6-64f> by user <kocevski> in cluster <slac> at Sat Sep 18 00:45:18 2021
Job was executed on host(s) <bullet0116>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Sep 18 00:45:20 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Sat Sep 18 00:45:20 2021
Terminated at Sat Sep 18 01:01:48 2021
Results reported at Sat Sep 18 01:01:48 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1738.2+4000_daily_bin36 264.56 40.0099 248659201 248918401 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1738.2+4000 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   956.06 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             333.14 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   987 sec.
    Turnaround time :                            990 sec.

The output (if any) is above this job summary.

