aklog: Couldn't determine realm of user:aklog: No credentials cache found  while getting realm
/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 97 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 = 73886
number of fields = 31
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J1738.2+4000_monthly_bin167
RA = 264.56, Dec = 40.0099
tmin = 669859201, tmax = 672451201
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='902392', job_status='RUN', time_executed='2022-04-24 02:33:35.901979', time_epoch_executed='1650792815.9' WHERE source_name='4FGL J1738.2+4000' and cadence='monthly' and bin_id='167'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/902392

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

Retrieving the FT1 file...

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

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

Retrieving 456 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/902392/ft1_4FGL_J1738.2+4000_monthly_bin167.fits


Retrieving the FT1 file...

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

Retrieving 456 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/902392/ft2_4FGL_J1738.2+4000_monthly_bin167.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/902392/ft1_4FGL_J1738.2+4000_monthly_bin167.fits outfile=/scratch/kocevski/902392/ft1_filteredMKT_4FGL_J1738.2+4000_monthly_bin167.fits ra=264.56 dec=40.0099 rad=12.0 tmin=669859201.0 tmax=672451201.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 38.09
user 37.09
sys 0.86

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/902392/ft2_4FGL_J1738.2+4000_monthly_bin167.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/902392/ft1_filteredMKT_4FGL_J1738.2+4000_monthly_bin167.fits evtable="EVENTS" outfile="/scratch/kocevski/902392/ft1_filtered_4FGL_J1738.2+4000_monthly_bin167.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.85
user 0.66
sys 0.17

Number of photons that the gtmktime cut: 8648

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/902392/ft1_filtered_4FGL_J1738.2+4000_monthly_bin167.fits" evtable="EVENTS" scfile=/scratch/kocevski/902392/ft2_4FGL_J1738.2+4000_monthly_bin167.fits sctable="SC_DATA" outfile=/scratch/kocevski/902392/ltcube_669859201_672451201_4FGL_J1738.2+4000_monthly_bin167.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/902392/ft2_4FGL_J1738.2+4000_monthly_bin167.fits
.....................!
real 143.96
user 143.25
sys 0.41

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/902392/ft1_filtered_4FGL_J1738.2+4000_monthly_bin167.fits evtable="EVENTS" scfile=/scratch/kocevski/902392/ft2_4FGL_J1738.2+4000_monthly_bin167.fits sctable="SC_DATA" expcube=/scratch/kocevski/902392/ltcube_669859201_672451201_4FGL_J1738.2+4000_monthly_bin167.fits outfile=/scratch/kocevski/902392/expmap_669859201_672451201_4FGL_J1738.2+4000_monthly_bin167.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/902392/ltcube_669859201_672451201_4FGL_J1738.2+4000_monthly_bin167.fits
.....................!
real 191.98
user 186.95
sys 4.65

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/902392/ft1_filtered_4FGL_J1738.2+4000_monthly_bin167.fits scfile=/scratch/kocevski/902392/ft2_4FGL_J1738.2+4000_monthly_bin167.fits outfile=/scratch/kocevski/902392/cmap_669859201_672451201_4FGL_J1738.2+4000_monthly_bin167.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.81
user 0.63
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/902392/ft1_filtered_4FGL_J1738.2+4000_monthly_bin167.fits scfile=/scratch/kocevski/902392/ft2_4FGL_J1738.2+4000_monthly_bin167.fits outfile=/scratch/kocevski/902392/cmap_HighResolution_669859201_672451201_4FGL_J1738.2+4000_monthly_bin167.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.90
user 0.61
sys 0.18

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

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/902392/ft1_filtered_4FGL_J1738.2+4000_monthly_bin167.fits', '/scratch/kocevski/902392/ft2_4FGL_J1738.2+4000_monthly_bin167.fits', expMap='/scratch/kocevski/902392/expmap_669859201_672451201_4FGL_J1738.2+4000_monthly_bin167.fits', expCube='/scratch/kocevski/902392/ltcube_669859201_672451201_4FGL_J1738.2+4000_monthly_bin167.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/902392/Model_4FGL_J1738.2+4000_monthly_bin167.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/902392/ft1_filtered_4FGL_J1738.2+4000_monthly_bin167.fits
Spacecraft file(s): /scratch/kocevski/902392/ft2_4FGL_J1738.2+4000_monthly_bin167.fits
Exposure map: /scratch/kocevski/902392/expmap_669859201_672451201_4FGL_J1738.2+4000_monthly_bin167.fits
Exposure cube: /scratch/kocevski/902392/ltcube_669859201_672451201_4FGL_J1738.2+4000_monthly_bin167.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/902392/Model_4FGL_J1738.2+4000_monthly_bin167.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) = 91076.5304996

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    6.7863       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .93139       1.0000         .10000E-03   10000.    
     3 'Prefactor '    14.111       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .20423E-01   1.0000         .10000E-03   10000.    
     5 'norm      '    3.5161       1.0000         .10000E-03   10000.    
     6 'norm      '    .23618       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .16351E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    .59239E-01   1.0000         .10000E-03   10000.    
     9 'norm      '    14.830       1.0000         .10000E-03   10000.    
    10 'norm      '    4.8419       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .92416       1.0000         .10000E-03   10000.    
    12 'Prefactor '    3.7208       1.0000         .10000E-03   10000.    
    13 'norm      '    .45530       1.0000         .10000E-03   10000.    
    14 'Prefactor '    6.1299       1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10067E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    1.4140       1.0000         .10000E-03   10000.    
    17 'Prefactor '    17.803       1.0000         .10000E-03   10000.    
    18 'Prefactor '    5.9979       1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    6.9341       1.0000         .10000E-03   10000.    
    21 'Prefactor '    .11179E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    13.538       1.0000         .10000E-03   10000.    
    23 'norm      '    .53923       1.0000         .10000E-03   10000.    
    24 'norm      '    .10002E-03   1.0000         .10000E-03   10000.    
    25 'norm      '    2.3545       1.0000         .10000E-03   10000.    
    26 'Prefactor '    7.3094       1.0000         .10000E-03   10000.    
    27 'Prefactor '    3.0127       1.0000         .10000E-03   10000.    
    28 'Normalizat'    .97658       1.0000         .10000E-01   10.000    
    29 'Prefactor '    .99216       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=   91076.34     FROM MIGRAD    STATUS=CONVERGED    772 CALLS     3379 TOTAL
                     EDM=   .35E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .6%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          6.7857        8.3389       -.31321E-06   -.11963E-04
   2  Prefactor     .93159        .65730        .22706E-07   -.69832E-03
   3  Prefactor     14.110        .91694       -.25840E-08   -.32213E-03
   4  Prefactor     .21158E-01    .10900        .76863E-08   -.22639E-03
   5  norm          3.5161        .51267        .11420E-08    .29221E-04
   6  norm          .23620        .18454        .70613E-08   -.90285E-03
   7  Prefactor     .10000E-03    .44209        .34834E-07** at limit **
   8  norm          .59257E-01    .96107E-01   -.92221E-08   -.10217E-02
   9  norm          14.831        2.7419       -.20110E-07    .68921E-04
  10  norm          4.8420        .63453       -.28060E-07   -.36256E-03
  11  Prefactor     .92406        .79710       -.18521E-07   -.22068E-03
  12  Prefactor     3.7208        4.4129       -.31592E-06   -.10103E-07
  13  norm          .45578        .62551       -.67817E-07   -.69554E-03
  14  Prefactor     6.1292        10.965        .14886E-05    .21453E-04
  15  Prefactor     .10000E-03    22.647        .20063E-06** at limit **
  16  norm          1.4142        1.0428       -.58738E-07   -.40060E-03
  17  Prefactor     17.802        10.272        .10972E-05   -.12070E-04
  18  Prefactor     6.0001        9.4215        .18487E-05   -.10130E-04
  19  Prefactor     .10000E-03    .98775        .28542E-07** at limit **
  20  Prefactor     6.9342        2.4420        .30801E-08   -.74791E-03
  21  Prefactor     .10000E-03    6.4183        .22147E-06** at limit **
  22  Prefactor     13.538        16.603       -.16660E-05   -.12399E-04
  23  norm          .53888        .39703        .23265E-07    .49490E-03
  24  norm          .10000E-03    8.2251        .44486E-07** at limit **
  25  norm          2.3548        1.8744       -.13551E-07   -.25723E-03
  26  Prefactor     7.3095        1.3087        .25491E-07   -.21375E-02
  27  Prefactor     3.0128        1.2890        .12234E-07   -.29484E-03
  28  Normalizat    .97652        .62765E-01   -.22812E-06    .66522E-05
  29  Prefactor     .99218        .37565E-01    .42225E-07   -.18858E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 6.78573
  Prefactor  = 0.931587
  Prefactor  = 14.1105
  Prefactor  = 0.0211585
  norm       = 3.5161
  norm       = 0.2362
  Prefactor  = 0.000100002
  norm       = 0.059257
  norm       = 14.8305
  norm       = 4.842
  Prefactor  = 0.924062
  Prefactor  = 3.72079
  norm       = 0.455781
  Prefactor  = 6.12921
  Prefactor  = 0.0001
  norm       = 1.41423
  Prefactor  = 17.8016
  Prefactor  = 6.00011
  Prefactor  = 0.0001
  Prefactor  = 6.93416
  Prefactor  = 0.0001
  Prefactor  = 13.5385
  norm       = 0.538883
  norm       = 0.0001
  norm       = 2.35484
  Prefactor  = 7.30946
  Prefactor  = 3.01277
  Normalizat = 0.976522
  Prefactor  = 0.992184
 **********
 **   18 **HESSE 
 **********

 FCN=   91076.34     FROM HESSE     STATUS=OK           599 CALLS     3978 TOTAL
                     EDM=   .11E-05    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          6.7857        8.3278        .15402E-03   -1.5187    
   2  Prefactor     .93159        .60457        .14472E-03   -1.5515    
   3  Prefactor     14.110        .83850        .50192E-04   -1.4957    
   4  Prefactor     .21158E-01    .14743        .37704E-01   -1.5679    
   5  norm          3.5161        .51292        .79754E-04   -1.5333    
   6  norm          .23620        .17292        .11037E-02   -1.5611    
   7  Prefactor     .10000E-03    .59360        .55202E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .59257E-01    .15381        .11745E-02   -1.5659    
   9  norm          14.831        2.7224        .10401E-03   -1.4938    
  10  norm          4.8420        .63512        .81208E-04   -1.5268    
  11  Prefactor     .92406        .58427        .23955E-02   -1.5516    
  12  Prefactor     3.7208        4.4014        .20934E-03   -1.5322    
  13  norm          .45578        .79340        .27553E-02   -1.5573    
  14  Prefactor     6.1292        10.857        .16215E-03   -1.5213    
  15  Prefactor     .10000E-03    22.851        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          1.4142        1.0370        .25550E-03   -1.5470    
  17  Prefactor     17.802        10.214        .94923E-04   -1.4864    
  18  Prefactor     6.0001        9.3690        .16395E-03   -1.5218    
  19  Prefactor     .10000E-03    1.0046        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     6.9342        2.5980        .76177E-03   -1.5181    
  21  Prefactor     .10000E-03    6.4969        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     13.538        16.605        .10886E-03   -1.4972    
  23  norm          .53888        .30026        .15893E-02   -1.5561    
  24  norm          .10000E-03    8.3829        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  norm          2.3548        1.8810        .26712E-03   -1.5401    
  26  Prefactor     7.3095        1.7525        .74178E-03   -1.5167    
  27  Prefactor     3.0128        1.2911        .21628E-03   -1.5361    
  28  Normalizat    .97652        .76197E-01    .32998E-03   -.93821    
  29  Prefactor     .99218        .45711E-01    .20473E-03   -.92990    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.11257e-06
Minuit parameter uncertainties:
  1  8.3292
  2  0.60457
  3  0.8385
  4  0.111439
  5  0.512919
  6  0.172925
  7  6.71331e-05
  8  0.153815
  9  2.72245
  10  0.635126
  11  0.584273
  12  4.40182
  13  0.793422
  14  10.8607
  15  1.49836e-05
  16  1.03696
  17  10.2153
  18  9.3713
  19  5.12998e-07
  20  2.59806
  21  3.31371e-05
  22  16.6109
  23  0.30026
  24  1.5414e-06
  25  1.88105
  26  1.75255
  27  1.29109
  28  0.0762054
  29  0.0457133
Done.

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

Extracting fit parameters...

4FGL J1738.2+4000
   Spectrum: PowerLaw
326    Prefactor:  6.129e+00  1.086e+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:  9.922e-01  4.571e-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
680   Normalization:  9.765e-01  7.621e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.43
Ra Dec: 264.560 40.010
Photon Flux Upper Limit: 2.02e-08 ph cm-2 s-1
Energy Flux Upper Limit: 1.57e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/902392/likelihoodResults_669859201_672451201_4FGL_J1738.2+4000_monthly_bin167.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) = 91076.2697229
delta logL = 0.0731949351466

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 91076.2556951
delta logL = 0.0872227082

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    8.2679       1.0000         .10000E-03   10000.    
     2 'Index     '    2.0612       1.0000          .0000       10.000    
     3 'Normalizat'    .97874       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .99142       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=   91076.26     FROM MIGRAD    STATUS=CONVERGED     52 CALLS      219 TOTAL
                     EDM=   .26E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.8%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     8.2703        13.368        .81929E-05    .51212E-04
   2  Index         2.0611        1.0086       -.76621E-05   -.86535E-04
   3  Normalizat    .97874        .58840E-01   -.13971E-06   -.25063E-03
   4  Prefactor     .99142        .36910E-01   -.30944E-08   -.10364E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 8.27027
  Index      = 2.06114
  Normalizat = 0.978742
  Prefactor  = 0.99142
 **********
 **   18 **HESSE 
 **********

 FCN=   91076.26     FROM HESSE     STATUS=OK            29 CALLS      248 TOTAL
                     EDM=   .51E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     8.2703        13.323        .13943E-03   -1.5133    
   2  Index         2.0611        1.0371        .10179E-02   -.62830    
   3  Normalizat    .97874        .70661E-01    .32965E-03   -.93746    
   4  Prefactor     .99142        .44375E-01    .20480E-03   -.93016    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 5.09881e-10
Minuit parameter uncertainties:
  1  13.3282
  2  1.04881
  3  0.0706679
  4  0.0443764
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/902392': 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) = 91076.2556951
delta logL = 0.087222724047

Extracting fit parameters...

4FGL J1738.2+4000
   Spectrum: PowerLaw
326    Prefactor:  8.270e+00  1.333e+01  1.000e-04  1.000e+04 ( 1.000e-14)
327        Index:  2.061e+00  1.049e+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:  9.914e-01  4.438e-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
680   Normalization:  9.787e-01  7.067e-02  1.000e-02  1.000e+01 ( 1.000e+00)


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

Creating a high resolution counts map...
INFO: Auto-setting vmin to -2.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  2.220e+00 [aplpy.core]
Saving /scratch/kocevski/902392/cmap_HighResolution_669859201_672451201_4FGL_J1738.2+4000_monthly_bin167.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.57e-03', job_status='DONE', photon_flux_upper_limit='2.02e-08', time_completed='2022-04-24 05:08:32.529714', job_id='902392', GAL2='0.99', fit_tolerance='1e-08', EG2='0.98', EG='0.98', time_epoch_completed='1650802112.53', return_code2='0', ts='0.43', comment='SUCCESS', return_code='0', GAL='0.99', dlogl='8.72e-02', ts2='0.60', photon_index_error='0.00', photon_index='2.52' WHERE bin_id='167' AND source_name='4FGL J1738.2+4000' AND cadence='monthly';

Database successfully updated.


Analysis Complete.


Sun Apr 24 05:08:32 PDT 2022


------------------------------------------------------------
Sender: LSF System <lsf@bullet0111>
Subject: Job 902392: <4FGL_J1738.2+4000_monthly_bin167> in cluster <slac> Done

Job <4FGL_J1738.2+4000_monthly_bin167> was submitted from host <rhel6-64f> by user <kocevski> in cluster <slac> at Sun Apr 24 02:10:24 2022
Job was executed on host(s) <bullet0111>, in queue <medium>, as user <kocevski> in cluster <slac> at Sun Apr 24 02:31:49 2022
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Sun Apr 24 02:31:49 2022
Terminated at Sun Apr 24 05:08:33 2022
Results reported at Sun Apr 24 05:08:33 2022

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1738.2+4000_monthly_bin167 264.56 40.0099 669859201 672451201 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 :                                   9222.00 sec.
    Max Memory :                                 1101 MB
    Average Memory :                             440.81 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   9404 sec.
    Turnaround time :                            10689 sec.

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

