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


Performing analysis on: 4FGL_J1738.2+4000_daily_bin718
RA = 264.56, Dec = 40.0099
tmin = 425433601, tmax = 425692801
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='944021', job_status='RUN', time_executed='2021-09-18 00:55:56.964439', time_epoch_executed='1631951756.96' WHERE source_name='4FGL J1738.2+4000' and cadence='daily' and bin_id='718'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/944021

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

Retrieving the FT1 file...

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

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

Retrieving 38 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/944021/ft1_4FGL_J1738.2+4000_daily_bin718.fits


Retrieving the FT1 file...

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

Retrieving 38 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/944021/ft2_4FGL_J1738.2+4000_daily_bin718.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/944021/ft1_4FGL_J1738.2+4000_daily_bin718.fits outfile=/scratch/kocevski/944021/ft1_filteredMKT_4FGL_J1738.2+4000_daily_bin718.fits ra=264.56 dec=40.0099 rad=12.0 tmin=425433601.0 tmax=425692801.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.04
user 2.85
sys 0.18

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/944021/ft2_4FGL_J1738.2+4000_daily_bin718.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/944021/ft1_filteredMKT_4FGL_J1738.2+4000_daily_bin718.fits evtable="EVENTS" outfile="/scratch/kocevski/944021/ft1_filtered_4FGL_J1738.2+4000_daily_bin718.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.13

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/944021/ft1_filtered_4FGL_J1738.2+4000_daily_bin718.fits evtable="EVENTS" scfile=/scratch/kocevski/944021/ft2_4FGL_J1738.2+4000_daily_bin718.fits sctable="SC_DATA" expcube=/scratch/kocevski/944021/ltcube_425433601_425692801_4FGL_J1738.2+4000_daily_bin718.fits outfile=/scratch/kocevski/944021/expmap_425433601_425692801_4FGL_J1738.2+4000_daily_bin718.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/944021/ltcube_425433601_425692801_4FGL_J1738.2+4000_daily_bin718.fits
.....................!
real 189.54
user 184.15
sys 5.08

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/944021/ft1_filtered_4FGL_J1738.2+4000_daily_bin718.fits scfile=/scratch/kocevski/944021/ft2_4FGL_J1738.2+4000_daily_bin718.fits outfile=/scratch/kocevski/944021/cmap_425433601_425692801_4FGL_J1738.2+4000_daily_bin718.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.37
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/944021/ft1_filtered_4FGL_J1738.2+4000_daily_bin718.fits scfile=/scratch/kocevski/944021/ft2_4FGL_J1738.2+4000_daily_bin718.fits outfile=/scratch/kocevski/944021/cmap_HighResolution_425433601_425692801_4FGL_J1738.2+4000_daily_bin718.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.37
sys 0.15

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    23.662       1.0000         .10000E-03   10000.    
     2 'Prefactor '    1.3495       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .85381       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10833E-03   1.0000         .10000E-03   10000.    
     5 'norm      '    2.7417       1.0000         .10000E-03   10000.    
     6 'norm      '    1.0098       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .13115E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    .10005E-03   1.0000         .10000E-03   10000.    
    10 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    12.472       1.0000         .10000E-03   10000.    
    12 'Prefactor '    60.967       1.0000         .10000E-03   10000.    
    13 'norm      '    2.4874       1.0000         .10000E-03   10000.    
    14 'Prefactor '    32.908       1.0000         .10000E-03   10000.    
    15 'Prefactor '    50.403       1.0000         .10000E-03   10000.    
    16 'norm      '    5.0496       1.0000         .10000E-03   10000.    
    17 'Prefactor '    67.184       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .12448E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    5.3113       1.0000         .10000E-03   10000.    
    20 'Prefactor '    8.6007       1.0000         .10000E-03   10000.    
    21 'Prefactor '    .73936       1.0000         .10000E-03   10000.    
    22 'Prefactor '    129.39       1.0000         .10000E-03   10000.    
    23 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    24 'norm      '    91.828       1.0000         .10000E-03   10000.    
    25 'norm      '    21.759       1.0000         .10000E-03   10000.    
    26 'Prefactor '    .64280       1.0000         .10000E-03   10000.    
    27 'Prefactor '    1.6462       1.0000         .10000E-03   10000.    
    28 'Normalizat'    .95913       1.0000         .10000E-01   10.000    
    29 'Prefactor '    .99315       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=   6556.183     FROM MIGRAD    STATUS=CONVERGED    868 CALLS     3450 TOTAL
                     EDM=   .19E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  7.1%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          23.790        35.734       -.65050E-06   -.40744E-04
   2  Prefactor     1.3493        1.4290       -.33979E-07   -.28035E-03
   3  Prefactor     .85371        1.4062       -.15203E-06   -.31447E-03
   4  Prefactor     .10000E-03    1.7769        .78113E-07** at limit **
   5  norm          2.7420        1.6548       -.38654E-07   -.21454E-03
   6  norm          1.0102        1.0433        .11577E-07   -.12321E-03
   7  Prefactor     .10000E-03    5.7822        .26952E-06** at limit **
   8  norm          .10000E-03    .28021        .11227E-06** at limit **
   9  norm          .10000E-03    7.6993        .50783E-07** at limit **
  10  norm          .10000E-03    .45440       -.27889E-06** at limit **
  11  Prefactor     12.492        6.4780        .10207E-06    .60296E-04
  12  Prefactor     61.991        89.324        .21560E-05   -.12177E-04
  13  norm          2.6523        8.3127       -.25178E-05   -.27544E-03
  14  Prefactor     28.686        66.830        .23436E-05   -.12671E-04
  15  Prefactor     58.416        114.41        .34680E-05    .14911E-04
  16  norm          4.9157        10.083       -.21127E-06    .26984E-04
  17  Prefactor     69.324        80.074       -.51682E-06    .24126E-04
  18  Prefactor     .10003E-03    239.97       -.21422E-04** at limit **
  19  Prefactor     4.8895        28.522        .66895E-05    .90206E-04
  20  Prefactor     8.6666        11.472        .16858E-06    .14631E-04
  21  Prefactor     .14656E-03    151.36        .14297E-04** at limit **
  22  Prefactor     133.41        115.35       -.18164E-06   -.36870E-03
  23  norm          .10000E-03    .81040        .47526E-06** at limit **
  24  norm          87.631        88.127       -.11553E-06    .56206E-04
  25  norm          21.729        12.008        .11983E-06    .57447E-05
  26  Prefactor     .67593        9.8906        .26175E-05    .62524E-03
  27  Prefactor     1.6549        5.5536        .16138E-06    .24345E-03
  28  Normalizat    .95957        .25296        .28847E-05   -.35608E-03
  29  Prefactor     .99243        .14974       -.30628E-05   -.40311E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 23.7897
  Prefactor  = 1.34928
  Prefactor  = 0.853705
  Prefactor  = 0.0001
  norm       = 2.74203
  norm       = 1.01019
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 0.0001
  norm       = 0.0001
  Prefactor  = 12.4921
  Prefactor  = 61.9908
  norm       = 2.65232
  Prefactor  = 28.6861
  Prefactor  = 58.4158
  norm       = 4.91575
  Prefactor  = 69.3238
  Prefactor  = 0.000100034
  Prefactor  = 4.88947
  Prefactor  = 8.66656
  Prefactor  = 0.000146562
  Prefactor  = 133.41
  norm       = 0.0001
  norm       = 87.6309
  norm       = 21.7287
  Prefactor  = 0.675935
  Prefactor  = 1.65493
  Normalizat = 0.959565
  Prefactor  = 0.992431
 **********
 **   18 **HESSE 
 **********

 FCN=   6556.183     FROM HESSE     STATUS=OK           571 CALLS     4021 TOTAL
                     EDM=   .61E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          23.790        35.574        .82348E-04   -1.4732    
   2  Prefactor     1.3493        1.4323        .80579E-04   -1.5476    
   3  Prefactor     .85371        1.4056        .50556E-04   -1.5523    
   4  Prefactor     .10000E-03    5.4744        .20377E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          2.7420        1.6538        .78076E-04   -1.5377    
   6  norm          1.0102        .99989        .80478E-03   -1.5507    
   7  Prefactor     .10000E-03    5.8639        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .10000E-03    .36427        .83030E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          .10000E-03    7.7927        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          .10000E-03    .45679        .53246E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     12.492        6.4532        .56713E-03   -1.5001    
  12  Prefactor     61.991        88.430        .51387E-04   -1.4132    
  13  norm          2.6523        8.1645        .25918E-03   -1.5382    
  14  Prefactor     28.686        66.183        .69851E-04   -1.4636    
  15  Prefactor     58.416        114.86        .28244E-03   -1.4178    
  16  norm          4.9157        9.9944        .17894E-03   -1.5265    
  17  Prefactor     69.324        79.474        .48967E-04   -1.4041    
  18  Prefactor     .10003E-03    241.06        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     4.8895        28.323        .17439E-03   -1.5266    
  20  Prefactor     8.6666        11.462        .68342E-03   -1.5119    
  21  Prefactor     .14656E-03    133.55        .15129       -1.5709    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     133.41        177.25        .17697E-03   -1.3393    
  23  norm          .10000E-03    .82087        .71094E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  norm          87.631        87.950        .20968E-03   -1.3833    
  25  norm          21.729        12.010        .85867E-04   -1.4775    
  26  Prefactor     .67593        10.238        .23681E-02   -1.5544    
  27  Prefactor     1.6549        5.5385        .16459E-02   -1.5451    
  28  Normalizat    .95957        .28968        .33699E-03   -.94398    
  29  Prefactor     .99243        .17189        .20340E-03   -.92982    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.09125e-09
Minuit parameter uncertainties:
  1  35.6058
  2  1.43238
  3  1.40566
  4  1.76492e-05
  5  1.65386
  6  0.99991
  7  8.83388e-06
  8  1.52637e-08
  9  2.18938e-05
  10  3.25517e-06
  11  6.45359
  12  88.6185
  13  8.16794
  14  66.3527
  15  115.296
  16  9.99776
  17  79.5959
  18  0.00578001
  19  23.5525
  20  11.4649
  21  0.158065
  22  177.964
  23  5.79456e-06
  24  88.0806
  25  12.0112
  26  5.26187
  27  5.54019
  28  0.290158
  29  0.171989
Done.

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

Extracting fit parameters...

4FGL J1738.2+4000
   Spectrum: PowerLaw
326    Prefactor:  2.869e+01  6.635e+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.924e-01  1.720e-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.596e-01  2.902e-01  1.000e-02  1.000e+01 ( 1.000e+00)


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

Saving results to:
/scratch/kocevski/944021/likelihoodResults_425433601_425692801_4FGL_J1738.2+4000_daily_bin718.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) = 6556.18201168
delta logL = 0.000634531900687

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6556.18133256
delta logL = 0.00131365601919

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    31.962       1.0000         .10000E-03   10000.    
     2 'Index     '    2.4454       1.0000          .0000       10.000    
     3 'Normalizat'    .96052       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .99185       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.

 FCN=   6556.181     FROM MIGRAD    STATUS=CONVERGED     80 CALLS      253 TOTAL
                     EDM=   .12E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     31.997        103.97        .70875E-04    .37718E-03
   2  Index         2.4384        1.6677        .10435E-01    .35373E-03
   3  Normalizat    .96103        .27258        .33676E-03    .13549E-02
   4  Prefactor     .99175        .16729        .20346E-03    .23084E-02
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 31.9965
  Index      = 2.43844
  Normalizat = 0.961026
  Prefactor  = 0.991751
 **********
 **   18 **HESSE 
 **********

 FCN=   6556.181     FROM HESSE     STATUS=OK            23 CALLS      276 TOTAL
                     EDM=   .11E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     31.997        90.825        .14175E-04   -1.4576    
   2  Index         2.4384        1.4638        .41740E-03   -.53788    
   3  Normalizat    .96103        .27234        .67352E-04   -.94348    
   4  Prefactor     .99175        .16719        .40693E-04   -.93005    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.05458e-08
Minuit parameter uncertainties:
  1  91.221
  2  1.49377
  3  0.272735
  4  0.167278
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/944021': 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) = 6556.18131194
delta logL = 0.00133427593755

Extracting fit parameters...

4FGL J1738.2+4000
   Spectrum: PowerLaw
326    Prefactor:  3.200e+01  9.122e+01  1.000e-04  1.000e+04 ( 1.000e-14)
327        Index:  2.438e+00  1.494e+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.918e-01  1.673e-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.610e-01  2.727e-01  1.000e-02  1.000e+01 ( 1.000e+00)


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

Creating a high resolution counts map...
INFO: Auto-setting vmin to  0.000e+00 [aplpy.core]
INFO: Auto-setting vmax to  0.000e+00 [aplpy.core]
Saving /scratch/kocevski/944021/cmap_HighResolution_425433601_425692801_4FGL_J1738.2+4000_daily_bin718.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='8.95e-03', job_status='DONE', photon_flux_upper_limit='1.15e-07', time_completed='2021-09-18 01:10:41.710259', job_id='944021', GAL2='0.99', fit_tolerance='1e-08', EG2='0.96', EG='0.96', time_epoch_completed='1631952641.71', return_code2='0', ts='0.28', comment='SUCCESS', return_code='0', GAL='0.99', dlogl='1.33e-03', ts2='0.29', photon_index_error='0.00', photon_index='2.52' WHERE bin_id='718' AND source_name='4FGL J1738.2+4000' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep 18 01:10:41 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0259>
Subject: Job 944021: <4FGL_J1738.2+4000_daily_bin718> in cluster <slac> Done

Job <4FGL_J1738.2+4000_daily_bin718> was submitted from host <rhel6-64p> by user <kocevski> in cluster <slac> at Sat Sep 18 00:55:40 2021
Job was executed on host(s) <bullet0259>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Sep 18 00:55:42 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:55:42 2021
Terminated at Sat Sep 18 01:10:42 2021
Results reported at Sat Sep 18 01:10:42 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1738.2+4000_daily_bin718 264.56 40.0099 425433601 425692801 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 :                                   883.00 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             331.00 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   899 sec.
    Turnaround time :                            902 sec.

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

