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


Performing analysis on: 4FGL_J1740.5+5211_monthly_bin97
RA = 265.136, Dec = 52.1927
tmin = 488419201, tmax = 491011201
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='735443', job_status='RUN', time_executed='2021-10-31 10:25:48.535520', time_epoch_executed='1635701148.54' WHERE source_name='4FGL J1740.5+5211' and cadence='monthly' and bin_id='97'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/735443

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

Retrieving the FT1 file...

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

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

Retrieving 457 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/735443/ft1_4FGL_J1740.5+5211_monthly_bin97.fits


Retrieving the FT1 file...

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

Retrieving 457 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/735443/ft2_4FGL_J1740.5+5211_monthly_bin97.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/735443/ft1_4FGL_J1740.5+5211_monthly_bin97.fits outfile=/scratch/kocevski/735443/ft1_filteredMKT_4FGL_J1740.5+5211_monthly_bin97.fits ra=265.136 dec=52.1927 rad=12.0 tmin=488419201.0 tmax=491011201.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 34.88
user 33.93
sys 0.87

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/735443/ft2_4FGL_J1740.5+5211_monthly_bin97.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/735443/ft2_4FGL_J1740.5+5211_monthly_bin97.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/735443/ft1_filteredMKT_4FGL_J1740.5+5211_monthly_bin97.fits evtable="EVENTS" outfile="/scratch/kocevski/735443/ft1_filtered_4FGL_J1740.5+5211_monthly_bin97.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.75
user 0.54
sys 0.17

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/735443/ft1_filtered_4FGL_J1740.5+5211_monthly_bin97.fits" evtable="EVENTS" scfile=/scratch/kocevski/735443/ft2_4FGL_J1740.5+5211_monthly_bin97.fits sctable="SC_DATA" outfile=/scratch/kocevski/735443/ltcube_488419201_491011201_4FGL_J1740.5+5211_monthly_bin97.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/735443/ft2_4FGL_J1740.5+5211_monthly_bin97.fits
.....................!
real 100.15
user 99.66
sys 0.28

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/735443/ft1_filtered_4FGL_J1740.5+5211_monthly_bin97.fits evtable="EVENTS" scfile=/scratch/kocevski/735443/ft2_4FGL_J1740.5+5211_monthly_bin97.fits sctable="SC_DATA" expcube=/scratch/kocevski/735443/ltcube_488419201_491011201_4FGL_J1740.5+5211_monthly_bin97.fits outfile=/scratch/kocevski/735443/expmap_488419201_491011201_4FGL_J1740.5+5211_monthly_bin97.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/735443/ltcube_488419201_491011201_4FGL_J1740.5+5211_monthly_bin97.fits
.....................!
real 158.11
user 152.94
sys 4.22

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

Setting source of interest to:
4FGL J1740.5+5211 @ 265.136 52.1927

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/735443/ft1_filtered_4FGL_J1740.5+5211_monthly_bin97.fits scfile=/scratch/kocevski/735443/ft2_4FGL_J1740.5+5211_monthly_bin97.fits outfile=/scratch/kocevski/735443/cmap_488419201_491011201_4FGL_J1740.5+5211_monthly_bin97.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=265.136 yref=52.1927 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.68
user 0.51
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/735443/ft1_filtered_4FGL_J1740.5+5211_monthly_bin97.fits scfile=/scratch/kocevski/735443/ft2_4FGL_J1740.5+5211_monthly_bin97.fits outfile=/scratch/kocevski/735443/cmap_HighResolution_488419201_491011201_4FGL_J1740.5+5211_monthly_bin97.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=265.136 yref=52.1927 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.68
user 0.51
sys 0.16

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/735443/ft1_filtered_4FGL_J1740.5+5211_monthly_bin97.fits evtable="EVENTS" scfile=/scratch/kocevski/735443/ft2_4FGL_J1740.5+5211_monthly_bin97.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/735443/Model_4FGL_J1740.5+5211_monthly_bin97.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/735443/ft1_filtered_4FGL_J1740.5+5211_monthly_bin97.fits.....................!
real 596.85
user 542.66
sys 1.07

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/735443/ft1_filtered_4FGL_J1740.5+5211_monthly_bin97.fits', '/scratch/kocevski/735443/ft2_4FGL_J1740.5+5211_monthly_bin97.fits', expMap='/scratch/kocevski/735443/expmap_488419201_491011201_4FGL_J1740.5+5211_monthly_bin97.fits', expCube='/scratch/kocevski/735443/ltcube_488419201_491011201_4FGL_J1740.5+5211_monthly_bin97.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/735443/Model_4FGL_J1740.5+5211_monthly_bin97.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1740.5+5211'

4FGL J1740.5+5211
   Spectrum: PowerLaw
345    Prefactor:  5.805e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-12)
346        Index:  2.470e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
347        Scale:  6.751e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/735443/ft1_filtered_4FGL_J1740.5+5211_monthly_bin97.fits
Spacecraft file(s): /scratch/kocevski/735443/ft2_4FGL_J1740.5+5211_monthly_bin97.fits
Exposure map: /scratch/kocevski/735443/expmap_488419201_491011201_4FGL_J1740.5+5211_monthly_bin97.fits
Exposure cube: /scratch/kocevski/735443/ltcube_488419201_491011201_4FGL_J1740.5+5211_monthly_bin97.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/735443/Model_4FGL_J1740.5+5211_monthly_bin97.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) = 91034.9775698

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    12.731       1.0000         .10000E-03   10000.    
     2 'Prefactor '    2.4587       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .14322E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .86769       1.0000         .10000E-03   10000.    
     5 'Prefactor '    15.427       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     7 'norm      '    2.0273       1.0000         .10000E-03   10000.    
     8 'Prefactor '    1.0686       1.0000         .10000E-03   10000.    
     9 'norm      '    .20600       1.0000         .10000E-03   10000.    
    10 'Prefactor '    5.2721       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    12 'norm      '    .88860       1.0000         .10000E-03   10000.    
    13 'Prefactor '    1.1932       1.0000         .10000E-03   10000.    
    14 'Prefactor '    6.7594       1.0000         .10000E-03   10000.    
    15 'norm      '    5.3631       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    2.0306       1.0000         .10000E-03   10000.    
    18 'Prefactor '    11.514       1.0000         .10000E-03   10000.    
    19 'Prefactor '    31.006       1.0000         .10000E-03   10000.    
    20 'Prefactor '    6.6275       1.0000         .10000E-03   10000.    
    21 'Prefactor '    5.7391       1.0000         .10000E-03   10000.    
    22 'Prefactor '    9.0194       1.0000         .10000E-03   10000.    
    23 'norm      '    14.561       1.0000         .10000E-03   10000.    
    24 'Prefactor '    1.8158       1.0000         .10000E-03   10000.    
    25 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    26 'norm      '    4.9735       1.0000         .10000E-03   10000.    
    27 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    28 'norm      '    8.2208       1.0000         .10000E-03   10000.    
    29 'norm      '    8.0731       1.0000         .10000E-03   10000.    
    30 'Prefactor '    1.1346       1.0000         .10000E-03   10000.    
    31 'Normalizat'    1.1279       1.0000         .10000E-01   10.000    
    32 'Prefactor '    1.0047       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6600E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
 MACHINE ACCURACY LIMITS FURTHER IMPROVEMENT.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   91034.94     FROM MIGRAD    STATUS=CONVERGED    817 CALLS     4395 TOTAL
                     EDM=   .24E-04    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          12.731        4.9446         .0000       -.98252E-04
   2  Prefactor     2.4588        1.1321         .0000        .31987E-02
   3  Prefactor     .10000E-03    .33000         .0000    ** at limit **
   4  Prefactor     .86767        .63778         .0000        .26877E-02
   5  Prefactor     15.427        3.6702         .0000       -.69027E-03
   6  Prefactor     .10000E-03    1.5420         .0000    ** at limit **
   7  norm          2.0274        .34336         .0000        .26268E-02
   8  Prefactor     1.0689        2.4560         .0000        .28422    
   9  norm          .20607        .21892         .0000        .34422E-01
  10  Prefactor     5.2723        2.2122         .0000        .65540E-01
  11  Prefactor     .10000E-03    .67043         .0000    ** at limit **
  12  norm          .88872        .50899         .0000        .15810E-01
  13  Prefactor     1.1933        .67894         .0000        .13126E-02
  14  Prefactor     6.7593        17.481         .0000        .44929E-03
  15  norm          5.3630        1.8213         .0000        .54892E-01
  16  Prefactor     .10000E-03    8.6307         .0000    ** at limit **
  17  Prefactor     2.0313        1.3603         .0000        .83972E-02
  18  Prefactor     11.513        11.289         .0000        .24661E-02
  19  Prefactor     31.007        23.599         .0000       -.67213E-03
  20  Prefactor     6.6274        7.0128         .0000       -.25275E-02
  21  Prefactor     5.7393        2.3544         .0000        .15633E-01
  22  Prefactor     9.0194        4.7154         .0000        .11411E-03
  23  norm          14.561        2.9027         .0000        .91478E-02
  24  Prefactor     1.8160        2.4221         .0000        .81414E-01
  25  Prefactor     .10000E-03    1.4332         .0000    ** at limit **
  26  norm          4.9737        2.1989         .0000        .39903E-01
  27  Prefactor     .10000E-03    1.5388         .0000    ** at limit **
  28  norm          8.2211        2.8696         .0000        .97587E-03
  29  norm          8.0731        2.6326         .0000       -.41402E-02
  30  Prefactor     1.1347        .79675         .0000        .10705E-01
  31  Normalizat    1.1279        .66148E-01     .0000       -.68952E-03
  32  Prefactor     1.0047        .44127E-01     .0000       -.86534E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 12.7308
  Prefactor  = 2.4588
  Prefactor  = 0.0001
  Prefactor  = 0.867668
  Prefactor  = 15.4274
  Prefactor  = 0.0001
  norm       = 2.02736
  Prefactor  = 1.0689
  norm       = 0.206065
  Prefactor  = 5.27231
  Prefactor  = 0.0001
  norm       = 0.888717
  Prefactor  = 1.19325
  Prefactor  = 6.75926
  norm       = 5.36303
  Prefactor  = 0.0001
  Prefactor  = 2.03127
  Prefactor  = 11.5127
  Prefactor  = 31.0066
  Prefactor  = 6.62745
  Prefactor  = 5.73926
  Prefactor  = 9.01939
  norm       = 14.5614
  Prefactor  = 1.81604
  Prefactor  = 0.0001
  norm       = 4.97367
  Prefactor  = 0.0001
  norm       = 8.22107
  norm       = 8.07314
  Prefactor  = 1.13466
  Normalizat = 1.12786
  Prefactor  = 1.00474
 **********
 **   18 **HESSE 
 **********

 FCN=   91034.94     FROM HESSE     STATUS=OK           675 CALLS     5070 TOTAL
                     EDM=   .82E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          12.731        4.9440        .11227E-03   -1.4994    
   2  Prefactor     2.4588        1.1280        .20941E-03   -1.5394    
   3  Prefactor     .10000E-03    1.8479        .33332E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .86767        .63144        .19546E-03   -1.5522    
   5  Prefactor     15.427        3.6677        .10197E-03   -1.4922    
   6  Prefactor     .10000E-03    1.5592        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  norm          2.0274        .33706        .66463E-04   -1.5423    
   8  Prefactor     1.0689        2.3591        .23531E-02   -1.5501    
   9  norm          .20607        .20512        .13067E-03   -1.5617    
  10  Prefactor     5.2723        2.1895        .87526E-03   -1.5249    
  11  Prefactor     .10000E-03    .69201        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm          .88872        .49103        .15112E-03   -1.5519    
  13  Prefactor     1.1933        .67805        .18104E-03   -1.5489    
  14  Prefactor     6.7593        17.258        .15433E-03   -1.5188    
  15  norm          5.3630        1.8105        .86767E-03   -1.5245    
  16  Prefactor     .10000E-03    8.7453        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     2.0313        1.3434        .26427E-03   -1.5423    
  18  Prefactor     11.513        11.247        .11806E-03   -1.5029    
  19  Prefactor     31.007        23.603        .71956E-04   -1.4594    
  20  Prefactor     6.6274        6.9995        .15588E-03   -1.5193    
  21  Prefactor     5.7393        2.3520        .83831E-03   -1.5229    
  22  Prefactor     9.0194        4.7143        .13346E-03   -1.5107    
  23  norm          14.561        2.9012        .52481E-03   -1.4945    
  24  Prefactor     1.8160        2.4096        .15498E-02   -1.5438    
  25  Prefactor     .10000E-03    1.4464        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  norm          4.9737        2.1957        .90165E-03   -1.5262    
  27  Prefactor     .10000E-03    1.5440        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  norm          8.2211        2.8647        .13983E-03   -1.5134    
  29  norm          8.0731        2.6320        .70555E-03   -1.5140    
  30  Prefactor     1.1347        .78070        .21587E-03   -1.5495    
  31  Normalizat    1.1279        .77713E-01    .31801E-03   -.88862    
  32  Prefactor     1.0047        .52497E-01    .23832E-03   -.92572    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 8.1844e-08
Minuit parameter uncertainties:
  1  4.94414
  2  1.12797
  3  4.46107e-05
  4  0.631445
  5  3.66771
  6  2.00572e-05
  7  0.337056
  8  2.35927
  9  0.205123
  10  2.18956
  11  2.16587e-05
  12  0.491028
  13  0.678053
  14  17.2707
  15  1.81051
  16  3.90862e-05
  17  1.34339
  18  11.2487
  19  23.6105
  20  7.00035
  21  2.35208
  22  4.71447
  23  2.90119
  24  2.40976
  25  4.97623e-05
  26  2.19576
  27  5.86948e-06
  28  2.86471
  29  2.63201
  30  0.780704
  31  0.0777206
  32  0.0524993
Done.

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

Extracting fit parameters...

4FGL J1740.5+5211
   Spectrum: PowerLaw
345    Prefactor:  2.031e+00  1.343e+00  1.000e-04  1.000e+04 ( 1.000e-12)
346        Index:  2.470e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
347        Scale:  6.751e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
657    Prefactor:  1.005e+00  5.250e-02  0.000e+00  1.000e+01 ( 1.000e+00)
658        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
659        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
656   Normalization:  1.128e+00  7.772e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 3.40
Ra Dec: 265.136 52.193
Photon Index (Fixed Index): 2.47 +/- 0.00
Photon Flux (Fixed Index): 1.55e-08 +/- 1.02e-08
Energy Flux (Fixed Index): 4.65e-06 +/- 3.07e-06

TS (Fixed Index): 3.40
Ra Dec: 265.136 52.193
Photon Flux Upper Limit: 3.43e-08 ph cm-2 s-1
Energy Flux Upper Limit: 2.67e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/735443/likelihoodResults_488419201_491011201_4FGL_J1740.5+5211_monthly_bin97.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) = 91034.8685278
delta logL = 0.0697803851363

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 91034.8620554
delta logL = 0.076252795654

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    1.8996       1.0000         .10000E-03   10000.    
     2 'Index     '    2.6968       1.0000          .0000       10.000    
     3 'Normalizat'    1.1223       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0072       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6600E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
 MACHINE ACCURACY LIMITS FURTHER IMPROVEMENT.

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   91034.86     FROM MIGRAD    STATUS=CONVERGED     99 CALLS      270 TOTAL
                     EDM=   .35E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     1.8979        1.3808        .24067E-03    .41570E-04
   2  Index         2.6981        .63601        .72629E-02    .12623E-04
   3  Normalizat    1.1223        .73617E-01    .31870E-03   -.39953E-04
   4  Prefactor     1.0072        .51741E-01    .23807E-03   -.23686E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 1.89786
  Index      = 2.69812
  Normalizat = 1.12233
  Prefactor  = 1.00716
 **********
 **   18 **HESSE 
 **********

 FCN=   91034.86     FROM HESSE     STATUS=OK            25 CALLS      295 TOTAL
                     EDM=   .48E-12    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     1.8979        1.3225        .96266E-05   -1.5432    
   2  Index         2.6981        .60863        .29051E-03   -.47842    
   3  Normalizat    1.1223        .73621E-01    .12748E-04   -.89038    
   4  Prefactor     1.0072        .51750E-01    .95228E-05   -.92491    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.77837e-13
Minuit parameter uncertainties:
  1  1.32255
  2  0.610554
  3  0.0736281
  4  0.0517527
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/735443': 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) = 91034.8620527
delta logL = 0.0762554599933

Extracting fit parameters...

4FGL J1740.5+5211
   Spectrum: PowerLaw
345    Prefactor:  1.898e+00  1.323e+00  1.000e-04  1.000e+04 ( 1.000e-12)
346        Index:  2.698e+00  6.106e-01  0.000e+00  1.000e+01 (-1.000e+00)
347        Scale:  6.751e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
657    Prefactor:  1.007e+00  5.175e-02  0.000e+00  1.000e+01 ( 1.000e+00)
658        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
659        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
656   Normalization:  1.122e+00  7.363e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 3.60
Ra Dec: 265.136 52.193
Photon Index (Free Index): 2.70 +/- 0.61
Photon Flux (Free Index): 1.93e-08 +/- 1.48e-08
Energy Flux (Free Index): 4.66e-06 +/- 2.83e-06

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/735443/cmap_HighResolution_488419201_491011201_4FGL_J1740.5+5211_monthly_bin97.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='2.67e-03', comment='SUCCESS', photon_flux='1.55e-08', energy_flux2='4.66e-06', photon_flux_error='1.02e-08', dlogl='7.63e-02', energy_flux='4.65e-06', photon_flux2='1.93e-08', job_status='DONE', time_completed='2021-10-31 13:13:19.085500', photon_index_error2='0.61', photon_index2='2.70', ts='3.40', fit_tolerance='1e-08', GAL='1.00', photon_index_error='0.00', photon_flux_upper_limit='3.43e-08', energy_flux_error2='2.83e-06', EG='1.13', time_epoch_completed='1635711199.09', return_code='0', job_id='735443', GAL2='1.01', EG2='1.12', return_code2='0', energy_flux_error='3.07e-06', photon_flux_error2='1.48e-08', ts2='3.60', photon_index='2.47' WHERE bin_id='97' AND source_name='4FGL J1740.5+5211' AND cadence='monthly';

Database successfully updated.


Analysis Complete.


Sun Oct 31 13:13:19 PDT 2021


------------------------------------------------------------
Sender: LSF System <scs@bullet0168>
Subject: Job 735443: <4FGL_J1740.5+5211_monthly_bin97> in cluster <slac> Done

Job <4FGL_J1740.5+5211_monthly_bin97> was submitted from host <rhel6-64f> by user <kocevski> in cluster <slac> at Sun Oct 31 10:25:18 2021
Job was executed on host(s) <bullet0168>, in queue <medium>, as user <kocevski> in cluster <slac> at Sun Oct 31 10:25:31 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Sun Oct 31 10:25:31 2021
Terminated at Sun Oct 31 13:13:20 2021
Results reported at Sun Oct 31 13:13:20 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1740.5+5211_monthly_bin97 265.136 52.1927 488419201 491011201 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1740.5+5211 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   9187.00 sec.
    Max Memory :                                 633 MB
    Average Memory :                             436.68 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   10068 sec.
    Turnaround time :                            10082 sec.

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

