/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 29 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 = 7450
number of fields = 22
No RA_SUN column yet. Adding RA_SUN/DEC_SUN columns.
Done.


Performing analysis on: 4FGL_J1738.2+4000_daily_bin50
RA = 264.56, Dec = 40.0099
tmin = 252288001, tmax = 252547201
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='939948', job_status='RUN', time_executed='2021-09-18 00:45:59.198242', time_epoch_executed='1631951159.2' WHERE source_name='4FGL J1738.2+4000' and cadence='daily' and bin_id='50'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/939948

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/939948/ft1_4FGL_J1738.2+4000_daily_bin50.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/939948/ft2_4FGL_J1738.2+4000_daily_bin50.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/939948/ft1_4FGL_J1738.2+4000_daily_bin50.fits outfile=/scratch/kocevski/939948/ft1_filteredMKT_4FGL_J1738.2+4000_daily_bin50.fits ra=264.56 dec=40.0099 rad=12.0 tmin=252288001.0 tmax=252547201.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 2.60
user 2.41
sys 0.16

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/939948/ft2_4FGL_J1738.2+4000_daily_bin50.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/939948/ft1_filteredMKT_4FGL_J1738.2+4000_daily_bin50.fits evtable="EVENTS" outfile="/scratch/kocevski/939948/ft1_filtered_4FGL_J1738.2+4000_daily_bin50.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.50
user 0.32
sys 0.16

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/939948/ft1_filtered_4FGL_J1738.2+4000_daily_bin50.fits" evtable="EVENTS" scfile=/scratch/kocevski/939948/ft2_4FGL_J1738.2+4000_daily_bin50.fits sctable="SC_DATA" outfile=/scratch/kocevski/939948/ltcube_252288001_252547201_4FGL_J1738.2+4000_daily_bin50.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/939948/ft2_4FGL_J1738.2+4000_daily_bin50.fits
.....................!
real 13.01
user 12.67
sys 0.31

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/939948/ft1_filtered_4FGL_J1738.2+4000_daily_bin50.fits evtable="EVENTS" scfile=/scratch/kocevski/939948/ft2_4FGL_J1738.2+4000_daily_bin50.fits sctable="SC_DATA" expcube=/scratch/kocevski/939948/ltcube_252288001_252547201_4FGL_J1738.2+4000_daily_bin50.fits outfile=/scratch/kocevski/939948/expmap_252288001_252547201_4FGL_J1738.2+4000_daily_bin50.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/939948/ltcube_252288001_252547201_4FGL_J1738.2+4000_daily_bin50.fits
.....................!
real 189.79
user 184.69
sys 4.68

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/939948/ft1_filtered_4FGL_J1738.2+4000_daily_bin50.fits scfile=/scratch/kocevski/939948/ft2_4FGL_J1738.2+4000_daily_bin50.fits outfile=/scratch/kocevski/939948/cmap_252288001_252547201_4FGL_J1738.2+4000_daily_bin50.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.53
user 0.37
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/939948/ft1_filtered_4FGL_J1738.2+4000_daily_bin50.fits scfile=/scratch/kocevski/939948/ft2_4FGL_J1738.2+4000_daily_bin50.fits outfile=/scratch/kocevski/939948/cmap_HighResolution_252288001_252547201_4FGL_J1738.2+4000_daily_bin50.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.54
user 0.37
sys 0.15

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

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.1690       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10230E-03   1.0000         .10000E-03   10000.    
     5 'norm      '    4.2383       1.0000         .10000E-03   10000.    
     6 'norm      '    .56318       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    .92825       1.0000         .10000E-03   10000.    
     9 'norm      '    9.3459       1.0000         .10000E-03   10000.    
    10 'norm      '    1.7388       1.0000         .10000E-03   10000.    
    11 'Prefactor '    10.585       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    3.3356       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    .96373E-01   1.0000         .10000E-03   10000.    
    17 'Prefactor '    34.346       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10433E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10050E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    8.4242       1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10648E-03   1.0000         .10000E-03   10000.    
    23 'norm      '    .11116       1.0000         .10000E-03   10000.    
    24 'norm      '    35.496       1.0000         .10000E-03   10000.    
    25 'norm      '    .10002E-03   1.0000         .10000E-03   10000.    
    26 'Prefactor '    3.1114       1.0000         .10000E-03   10000.    
    27 'Prefactor '    9.1985       1.0000         .10000E-03   10000.    
    28 'Normalizat'    1.0924       1.0000         .10000E-01   10.000    
    29 'Prefactor '    .91612       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=   6648.907     FROM MIGRAD    STATUS=CONVERGED    759 CALLS     3269 TOTAL
                     EDM=   .51E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .3%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .10000E-03    11.169        .56761E-07** at limit **
   2  Prefactor     1.1691        1.1521       -.46802E-07   -.49026E-03
   3  Prefactor     .10000E-03    .67222       -.13822E-07** at limit **
   4  Prefactor     .10000E-03    1.4915       -.20292E-07** at limit **
   5  norm          4.2382        1.9164        .49770E-08    .87779E-04
   6  norm          .56312        .78508       -.42074E-07   -.57565E-03
   7  Prefactor     .10000E-03    5.6306        .15672E-08** at limit **
   8  norm          .92821        .78678       -.34093E-07   -.25267E-03
   9  norm          9.3453        8.4340        .73175E-07   -.44304E-04
  10  norm          1.7392        1.6843       -.42319E-06   -.42659E-03
  11  Prefactor     10.591        5.9385        .67331E-07    .59032E-03
  12  Prefactor     .10000E-03    28.894        .29872E-05** at limit **
  13  norm          3.3356        3.8728       -.75025E-07   -.10415E-03
  14  Prefactor     .10000E-03    19.748        .19163E-05** at limit **
  15  Prefactor     .10000E-03    61.067        .29162E-06** at limit **
  16  norm          .56555E-01    6.4767       -.21310E-05    .33180E-04
  17  Prefactor     34.359        43.961        .18394E-04   -.16256E-03
  18  Prefactor     .10000E-03    29.459       -.39863E-05** at limit **
  19  Prefactor     .10000E-03    18.642       -.71265E-06** at limit **
  20  Prefactor     8.4231        10.476       -.13315E-06   -.47958E-04
  21  Prefactor     .10000E-03    17.874       -.48309E-06** at limit **
  22  Prefactor     .10000E-03    175.84       -.39380E-05** at limit **
  23  norm          .11097        1.1229       -.60232E-06   -.55238E-03
  24  norm          35.502        40.589        .19806E-05   -.27713E-05
  25  norm          .10000E-03    2.8627       -.46231E-07** at limit **
  26  Prefactor     3.1095        6.8801       -.30722E-05   -.18908E-03
  27  Prefactor     9.1986        5.7065       -.17190E-05    .45032E-03
  28  Normalizat    1.0924        .21812       -.34474E-06    .32578E-03
  29  Prefactor     .91617        .13290        .68209E-06    .29996E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 0.0001
  Prefactor  = 1.16906
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 4.23818
  norm       = 0.563115
  Prefactor  = 0.0001
  norm       = 0.928212
  norm       = 9.34527
  norm       = 1.73919
  Prefactor  = 10.5909
  Prefactor  = 0.0001
  norm       = 3.33557
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0565551
  Prefactor  = 34.359
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 8.42312
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.110966
  norm       = 35.5017
  norm       = 0.0001
  Prefactor  = 3.1095
  Prefactor  = 9.19855
  Normalizat = 1.09242
  Prefactor  = 0.916165
 **********
 **   18 **HESSE 
 **********

 FCN=   6648.907     FROM HESSE     STATUS=OK           565 CALLS     3834 TOTAL
                     EDM=   .11E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .10000E-03    11.169        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     1.1691        1.0426        .77199E-04   -1.5492    
   3  Prefactor     .10000E-03    .89539        .11929E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    3.5705        .19251E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          4.2382        1.9098        .73094E-04   -1.5296    
   6  norm          .56312        .68016        .82183E-03   -1.5558    
   7  Prefactor     .10000E-03    5.6859        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .92821        .77148        .63341E-04   -1.5515    
   9  norm          9.3453        8.4270        .13109E-03   -1.5096    
  10  norm          1.7392        1.6729        .99096E-04   -1.5444    
  11  Prefactor     10.591        5.9712        .12315E-03   -1.5057    
  12  Prefactor     .10000E-03    28.905        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          3.3356        3.8656        .16667E-03   -1.5343    
  14  Prefactor     .10000E-03    19.746        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .10000E-03    61.126        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          .56555E-01    8.8934        .56459E-01   -1.5660    
  17  Prefactor     34.359        43.833        .68378E-04   -1.4535    
  18  Prefactor     .10000E-03    29.601        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .10000E-03    19.270        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     8.4231        10.476        .13812E-03   -1.5127    
  21  Prefactor     .10000E-03    17.912        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     .10000E-03    177.18        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  norm          .11097        2.9537        .16838E-02   -1.5641    
  24  norm          35.502        40.580        .67264E-04   -1.4516    
  25  norm          .10000E-03    2.8683        .13472E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  Prefactor     3.1095        6.9612        .22988E-03   -1.5355    
  27  Prefactor     9.1986        5.6859        .13214E-03   -1.5101    
  28  Normalizat    1.0924        .26033        .29970E-03   -.89996    
  29  Prefactor     .91617        .16011        .20515E-03   -.95579    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.10348e-09
Minuit parameter uncertainties:
  1  1.22993e-06
  2  1.04258
  3  4.25734e-06
  4  3.19873e-06
  5  1.90984
  6  0.680173
  7  5.46347e-08
  8  0.771488
  9  8.42802
  10  1.67298
  11  5.97157
  12  0.000131938
  13  3.86589
  14  6.90108e-05
  15  1.18488e-05
  16  1.41737
  17  43.8746
  18  0.000150447
  19  4.85625e-05
  20  10.4787
  21  2.95598e-05
  22  0.000590328
  23  1.14456
  24  40.6116
  25  2.51737e-06
  26  6.96299
  27  5.6862
  28  0.260635
  29  0.160193
Done.

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

Extracting fit parameters...

4FGL J1738.2+4000
   Spectrum: PowerLaw
326    Prefactor:  1.000e-04  6.901e-05  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.162e-01  1.602e-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:  1.092e+00  2.606e-01  1.000e-02  1.000e+01 ( 1.000e+00)


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

Saving results to:
/scratch/kocevski/939948/likelihoodResults_252288001_252547201_4FGL_J1738.2+4000_daily_bin50.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): 102
logL (Free Index) = 6648.9074272
delta logL = -0.000241225943682

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 6648.90718717
delta logL = -1.18785828818e-06

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10006E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.7697       1.0000          .0000       10.000    
     3 'Normalizat'    1.0924       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .91617       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=   6648.907     FROM MIGRAD    STATUS=CONVERGED     94 CALLS      282 TOTAL
                     EDM=   .43E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10295E-03    5.5618        .18142E-01** at limit **
   2  Index         2.6906        6.3804        .50000        .23528E-04
   3  Normalizat    1.0924        .31522E-02    .29970E-03    .11418E-04
   4  Prefactor     .91617        .20065E-02    .20515E-03   -.30202E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000102952
  Index      = 2.69061
  Normalizat = 1.09242
  Prefactor  = 0.916166
 **********
 **   18 **HESSE 
 **********

 FCN=   6648.907     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      311 TOTAL
                     EDM=   .37E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10295E-03    48.519        .31078E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.6906        8.5882        .50000       -.48011    
   3  Normalizat    1.0924        .93333E-02    .11988E-04   -.89996    
   4  Prefactor     .91617        .59410E-02    .82061E-05   -.95578    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 3.67551e-09
Minuit parameter uncertainties:
  1  0.0239569
  2  157.065
  3  0.00933333
  4  0.00594103
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/939948': 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): 102
logL (Free Index) = 6648.90718682
delta logL = -8.41628207127e-07

Extracting fit parameters...

4FGL J1738.2+4000
   Spectrum: PowerLaw
326    Prefactor:  1.030e-04  2.396e-02  1.000e-04  1.000e+04 ( 1.000e-14)
327        Index:  2.691e+00  1.571e+02  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.162e-01  5.941e-03  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:  1.092e+00  9.333e-03  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
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/939948/cmap_HighResolution_252288001_252547201_4FGL_J1738.2+4000_daily_bin50.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='4.74e-03', job_status='DONE', photon_flux_upper_limit='6.08e-08', time_completed='2021-09-18 01:01:13.563010', job_id='939948', GAL2='0.92', fit_tolerance='1e-08', EG2='1.09', EG='1.09', time_epoch_completed='1631952073.56', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.92', dlogl='-8.42e-07', ts2='-0.00', photon_index_error='0.00', photon_index='2.52' WHERE bin_id='50' AND source_name='4FGL J1738.2+4000' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep 18 01:01:13 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0278>
Subject: Job 939948: <4FGL_J1738.2+4000_daily_bin50> in cluster <slac> Done

Job <4FGL_J1738.2+4000_daily_bin50> was submitted from host <rhel6-64f> by user <kocevski> in cluster <slac> at Sat Sep 18 00:45:20 2021
Job was executed on host(s) <bullet0278>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Sep 18 00:45:22 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:22 2021
Terminated at Sat Sep 18 01:01:14 2021
Results reported at Sat Sep 18 01:01:14 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1738.2+4000_daily_bin50 264.56 40.0099 252288001 252547201 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 :                                   903.00 sec.
    Max Memory :                                 1095 MB
    Average Memory :                             299.42 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   951 sec.
    Turnaround time :                            954 sec.

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

