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


Performing analysis on: 4FGL_J1740.0+4737_monthly_bin102
RA = 265.023, Dec = 47.6198
tmin = 501379201, tmax = 503971201
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='728198', job_status='RUN', time_executed='2021-10-31 09:57:47.287553', time_epoch_executed='1635699467.29' WHERE source_name='4FGL J1740.0+4737' and cadence='monthly' and bin_id='102'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/728198

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

Retrieving the FT1 file...

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

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

Retrieving 455 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/728198/ft1_4FGL_J1740.0+4737_monthly_bin102.fits


Retrieving the FT1 file...

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

Retrieving 455 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/728198/ft2_4FGL_J1740.0+4737_monthly_bin102.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/728198/ft1_4FGL_J1740.0+4737_monthly_bin102.fits outfile=/scratch/kocevski/728198/ft1_filteredMKT_4FGL_J1740.0+4737_monthly_bin102.fits ra=265.023 dec=47.6198 rad=12.0 tmin=501379201.0 tmax=503971201.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.81
user 37.75
sys 0.92

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/728198/ft2_4FGL_J1740.0+4737_monthly_bin102.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/728198/ft2_4FGL_J1740.0+4737_monthly_bin102.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/728198/ft1_filteredMKT_4FGL_J1740.0+4737_monthly_bin102.fits evtable="EVENTS" outfile="/scratch/kocevski/728198/ft1_filtered_4FGL_J1740.0+4737_monthly_bin102.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.67
sys 0.17

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/728198/ft1_filtered_4FGL_J1740.0+4737_monthly_bin102.fits" evtable="EVENTS" scfile=/scratch/kocevski/728198/ft2_4FGL_J1740.0+4737_monthly_bin102.fits sctable="SC_DATA" outfile=/scratch/kocevski/728198/ltcube_501379201_503971201_4FGL_J1740.0+4737_monthly_bin102.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/728198/ft2_4FGL_J1740.0+4737_monthly_bin102.fits
.....................!
real 147.84
user 147.02
sys 0.37

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/728198/ft1_filtered_4FGL_J1740.0+4737_monthly_bin102.fits evtable="EVENTS" scfile=/scratch/kocevski/728198/ft2_4FGL_J1740.0+4737_monthly_bin102.fits sctable="SC_DATA" expcube=/scratch/kocevski/728198/ltcube_501379201_503971201_4FGL_J1740.0+4737_monthly_bin102.fits outfile=/scratch/kocevski/728198/expmap_501379201_503971201_4FGL_J1740.0+4737_monthly_bin102.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/728198/ltcube_501379201_503971201_4FGL_J1740.0+4737_monthly_bin102.fits
.....................!
real 194.42
user 188.61
sys 5.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 214 point sources and 0 extended sources

Setting source of interest to:
4FGL J1740.0+4737 @ 265.023 47.6198

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/728198/ft1_filtered_4FGL_J1740.0+4737_monthly_bin102.fits scfile=/scratch/kocevski/728198/ft2_4FGL_J1740.0+4737_monthly_bin102.fits outfile=/scratch/kocevski/728198/cmap_501379201_503971201_4FGL_J1740.0+4737_monthly_bin102.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.023 yref=47.6198 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.80
user 0.63
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/728198/ft1_filtered_4FGL_J1740.0+4737_monthly_bin102.fits scfile=/scratch/kocevski/728198/ft2_4FGL_J1740.0+4737_monthly_bin102.fits outfile=/scratch/kocevski/728198/cmap_HighResolution_501379201_503971201_4FGL_J1740.0+4737_monthly_bin102.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.023 yref=47.6198 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.80
user 0.63
sys 0.16

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/728198/ft1_filtered_4FGL_J1740.0+4737_monthly_bin102.fits evtable="EVENTS" scfile=/scratch/kocevski/728198/ft2_4FGL_J1740.0+4737_monthly_bin102.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/728198/Model_4FGL_J1740.0+4737_monthly_bin102.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/728198/ft1_filtered_4FGL_J1740.0+4737_monthly_bin102.fits.....................!
real 622.24
user 618.39
sys 1.32

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/728198/ft1_filtered_4FGL_J1740.0+4737_monthly_bin102.fits', '/scratch/kocevski/728198/ft2_4FGL_J1740.0+4737_monthly_bin102.fits', expMap='/scratch/kocevski/728198/expmap_501379201_503971201_4FGL_J1740.0+4737_monthly_bin102.fits', expCube='/scratch/kocevski/728198/ltcube_501379201_503971201_4FGL_J1740.0+4737_monthly_bin102.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/728198/Model_4FGL_J1740.0+4737_monthly_bin102.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1740.0+4737'

4FGL J1740.0+4737
   Spectrum: PowerLaw
358    Prefactor:  7.827e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-14)
359        Index:  2.090e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
360        Scale:  2.179e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/728198/ft1_filtered_4FGL_J1740.0+4737_monthly_bin102.fits
Spacecraft file(s): /scratch/kocevski/728198/ft2_4FGL_J1740.0+4737_monthly_bin102.fits
Exposure map: /scratch/kocevski/728198/expmap_501379201_503971201_4FGL_J1740.0+4737_monthly_bin102.fits
Exposure cube: /scratch/kocevski/728198/ltcube_501379201_503971201_4FGL_J1740.0+4737_monthly_bin102.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/728198/Model_4FGL_J1740.0+4737_monthly_bin102.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) = 87327.2596666

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .11254E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    2.5956       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .95235       1.0000         .10000E-03   10000.    
     4 'Prefactor '    6.8648       1.0000         .10000E-03   10000.    
     5 'norm      '    2.4248       1.0000         .10000E-03   10000.    
     6 'norm      '    .94540       1.0000         .10000E-03   10000.    
     7 'Prefactor '    15.183       1.0000         .10000E-03   10000.    
     8 'norm      '    .23831       1.0000         .10000E-03   10000.    
     9 'norm      '    .85027       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .92309       1.0000         .10000E-03   10000.    
    11 'norm      '    .80329       1.0000         .10000E-03   10000.    
    12 'Prefactor '    1.6286       1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10027E-03   1.0000         .10000E-03   10000.    
    14 'norm      '    8.1970       1.0000         .10000E-03   10000.    
    15 'Prefactor '    .39243E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    3.5726       1.0000         .10000E-03   10000.    
    17 'Prefactor '    11.557       1.0000         .10000E-03   10000.    
    18 'Prefactor '    3.4005       1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10027E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .36188E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    5.2150       1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10530E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    5.5386       1.0000         .10000E-03   10000.    
    24 'norm      '    31.232       1.0000         .10000E-03   10000.    
    25 'Prefactor '    1.9952       1.0000         .10000E-03   10000.    
    26 'norm      '    8.0456       1.0000         .10000E-03   10000.    
    27 'Prefactor '    .26005       1.0000         .10000E-03   10000.    
    28 'norm      '    5.8411       1.0000         .10000E-03   10000.    
    29 'norm      '    8.1826       1.0000         .10000E-03   10000.    
    30 'Normalizat'    1.0265       1.0000         .10000E-01   10.000    
    31 'Prefactor '    1.0409       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .7030E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   87327.14     FROM MIGRAD    STATUS=CONVERGED    814 CALLS     3603 TOTAL
                     EDM=   .15E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .6%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    .24592        .50577E-08** at limit **
   2  Prefactor     2.5952        .87151        .12645E-07   -.14416E-04
   3  Prefactor     .95216        .69579        .14331E-07    .98185E-04
   4  Prefactor     6.8658        2.4414       -.37006E-07   -.67388E-05
   5  norm          2.4248        .48226        .30581E-08   -.26014E-04
   6  norm          .94524        .28093        .18940E-08   -.22909E-04
   7  Prefactor     15.187        2.6087       -.31124E-07   -.26777E-04
   8  norm          .23824        .18188        .95743E-08    .53985E-03
   9  norm          .84978        1.0272        .36545E-08    .34360E-04
  10  Prefactor     .91377        .40831        .27781E-07   -.31644E-03
  11  norm          .80329        .38915       -.46713E-07   -.61540E-03
  12  Prefactor     1.6287        .82767       -.12471E-07   -.54998E-04
  13  Prefactor     .10000E-03    4.7506        .22630E-06** at limit **
  14  norm          8.2004        1.7511        .20267E-08    .13472E-03
  15  Prefactor     .10000E-03    10.091       -.16175E-05** at limit **
  16  norm          3.5729        1.4808       -.99361E-07   -.15201E-03
  17  Prefactor     11.541        9.7911        .61002E-05    .47226E-04
  18  Prefactor     3.4015        1.3234        .25383E-08    .30463E-04
  19  Prefactor     .10000E-03    8.0050       -.76628E-06** at limit **
  20  Prefactor     .10000E-03    16.925        .25728E-05** at limit **
  21  Prefactor     5.1533        8.5438       -.27591E-05   -.75629E-04
  22  Prefactor     .10000E-03    1.0631       -.17400E-08** at limit **
  23  Prefactor     5.5337        4.2161        .13057E-06   -.57923E-05
  24  norm          31.236        3.4023        .13617E-06    .35489E-04
  25  Prefactor     1.9980        3.8021        .73345E-07   -.33415E-04
  26  norm          8.0449        2.1891        .64990E-07    .98493E-06
  27  Prefactor     .25369        3.7218       -.90947E-06    .25147E-04
  28  norm          5.8412        2.4851       -.18817E-06    .92153E-05
  29  norm          8.1833        2.6845       -.13901E-06    .11004E-04
  30  Normalizat    1.0265        .64086E-01   -.10740E-06    .65138E-04
  31  Prefactor     1.0410        .41307E-01   -.18203E-08    .25797E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 2.5952
  Prefactor  = 0.952157
  Prefactor  = 6.86576
  norm       = 2.42476
  norm       = 0.945239
  Prefactor  = 15.1875
  norm       = 0.238236
  norm       = 0.849777
  Prefactor  = 0.913766
  norm       = 0.80329
  Prefactor  = 1.6287
  Prefactor  = 0.0001
  norm       = 8.20041
  Prefactor  = 0.0001
  norm       = 3.57289
  Prefactor  = 11.5408
  Prefactor  = 3.40147
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 5.15328
  Prefactor  = 0.0001
  Prefactor  = 5.53369
  norm       = 31.2356
  Prefactor  = 1.99799
  norm       = 8.04493
  Prefactor  = 0.253693
  norm       = 5.84123
  norm       = 8.1833
  Normalizat = 1.02652
  Prefactor  = 1.04096
 **********
 **   18 **HESSE 
 **********

 FCN=   87327.14     FROM HESSE     STATUS=OK           658 CALLS     4261 TOTAL
                     EDM=   .89E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    .23856        .47684E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     2.5952        .86577        .14956E-03   -1.5386    
   3  Prefactor     .95216        .62255        .20028E-02   -1.5513    
   4  Prefactor     6.8658        2.4407        .15313E-03   -1.5184    
   5  norm          2.4248        .48200        .88972E-04   -1.5397    
   6  norm          .94524        .26933        .78544E-03   -1.5514    
   7  Prefactor     15.187        2.5534        .10279E-03   -1.4928    
   8  norm          .23824        .14429        .10171E-02   -1.5610    
   9  norm          .84978        1.1238        .31359E-02   -1.5524    
  10  Prefactor     .91377        2.0093        .25782E-02   -1.5517    
  11  norm          .80329        .37983        .12152E-03   -1.5529    
  12  Prefactor     1.6287        .82261        .18447E-03   -1.5453    
  13  Prefactor     .10000E-03    4.7722        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          8.2004        1.7352        .14003E-03   -1.5135    
  15  Prefactor     .10000E-03    10.160        .21272E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          3.5729        1.4835        .10691E-02   -1.5330    
  17  Prefactor     11.541        9.7970        .11784E-03   -1.5028    
  18  Prefactor     3.4015        1.3181        .19881E-03   -1.5339    
  19  Prefactor     .10000E-03    8.1183        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10000E-03    17.108        .21309E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     5.1533        8.5363        .17603E-03   -1.5254    
  22  Prefactor     .10000E-03    1.0946        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     5.5337        4.2132        .17072E-03   -1.5237    
  24  norm          31.236        3.4042        .71696E-04   -1.4590    
  25  Prefactor     1.9980        3.8625        .14663E-02   -1.5425    
  26  norm          8.0449        2.1880        .70676E-03   -1.5141    
  27  Prefactor     .25369        3.8928        .40994E-03   -1.5607    
  28  norm          5.8412        2.4825        .16617E-03   -1.5225    
  29  norm          8.1833        2.6851        .14016E-03   -1.5136    
  30  Normalizat    1.0265        .75732E-01    .31325E-03   -.92147    
  31  Prefactor     1.0410        .49091E-01    .21290E-03   -.91376    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 8.9398e-08
Minuit parameter uncertainties:
  1  1.79589e-06
  2  0.865773
  3  0.622559
  4  2.44072
  5  0.482006
  6  0.269326
  7  2.55341
  8  0.144288
  9  1.1238
  10  2.00948
  11  0.379826
  12  0.82262
  13  4.30286e-07
  14  1.73518
  15  4.74389e-06
  16  1.48352
  17  9.7984
  18  1.31807
  19  3.4725e-06
  20  1.05885e-05
  21  8.53831
  22  1.58746e-06
  23  4.21342
  24  3.40422
  25  3.863
  26  2.18803
  27  1.9873
  28  2.48258
  29  2.68512
  30  0.0757397
  31  0.0490933
Done.

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

Extracting fit parameters...

4FGL J1740.0+4737
   Spectrum: PowerLaw
358    Prefactor:  1.154e+01  9.798e+00  1.000e-04  1.000e+04 ( 1.000e-14)
359        Index:  2.090e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
360        Scale:  2.179e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
700    Prefactor:  1.041e+00  4.909e-02  0.000e+00  1.000e+01 ( 1.000e+00)
701        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
702        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
699   Normalization:  1.027e+00  7.574e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 3.45
Ra Dec: 265.023 47.620
Photon Index (Fixed Index): 2.09 +/- 0.00
Photon Flux (Fixed Index): 6.63e-09 +/- 5.62e-09
Energy Flux (Fixed Index): 3.72e-06 +/- 3.16e-06

TS (Fixed Index): 3.45
Ra Dec: 265.023 47.620
Photon Flux Upper Limit: 1.89e-08 ph cm-2 s-1
Energy Flux Upper Limit: 1.43e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/728198/likelihoodResults_501379201_503971201_4FGL_J1740.0+4737_monthly_bin102.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) = 87327.0570704
delta logL = 0.0801143980498

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 87327.0362774
delta logL = 0.100907448083

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   87327.04     FROM MIGRAD    STATUS=CONVERGED     58 CALLS      221 TOTAL
                     EDM=   .15E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     10.100        74.036        .31526E-02    .11845E-03
   2  Index         2.3242        1.2134        .24207        .48710E-03
   3  Normalizat    1.0231        .12933E-01    .70905E-01    .22488E-03
   4  Prefactor     1.0420        .82404E-02    .40405E-01    .63116E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 10.1004
  Index      = 2.3242
  Normalizat = 1.02307
  Prefactor  = 1.04196
 **********
 **   18 **HESSE 
 **********

 FCN=   87327.04     FROM HESSE     STATUS=OK            33 CALLS      254 TOTAL
                     EDM=   .14E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     10.100        9.8085        .12610E-03   -1.5072    
   2  Index         2.3242        .55654        .11234E-01   -.56470    
   3  Normalizat    1.0231        .70475E-01    .31372E-03   -.92262    
   4  Prefactor     1.0420        .48078E-01    .21280E-03   -.91344    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.36091e-10
Minuit parameter uncertainties:
  1  9.81009
  2  0.55816
  3  0.0704812
  4  0.0480798
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/728198': 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) = 87327.0362769
delta logL = 0.100907940025

Extracting fit parameters...

4FGL J1740.0+4737
   Spectrum: PowerLaw
358    Prefactor:  1.010e+01  9.810e+00  1.000e-04  1.000e+04 ( 1.000e-14)
359        Index:  2.324e+00  5.582e-01  0.000e+00  1.000e+01 (-1.000e+00)
360        Scale:  2.179e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
700    Prefactor:  1.042e+00  4.808e-02  0.000e+00  1.000e+01 ( 1.000e+00)
701        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
702        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
699   Normalization:  1.023e+00  7.048e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 3.66
Ra Dec: 265.023 47.620
Photon Index (Free Index): 2.32 +/- 0.56
Photon Flux (Free Index): 9.84e-09 +/- 9.71e-09
Energy Flux (Free Index): 3.59e-06 +/- 2.71e-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/728198/cmap_HighResolution_501379201_503971201_4FGL_J1740.0+4737_monthly_bin102.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.43e-03', comment='SUCCESS', photon_flux='6.63e-09', energy_flux2='3.59e-06', photon_flux_error='5.62e-09', dlogl='1.01e-01', energy_flux='3.72e-06', photon_flux2='9.84e-09', job_status='DONE', time_completed='2021-10-31 12:42:51.595204', photon_index_error2='0.56', photon_index2='2.32', ts='3.45', fit_tolerance='1e-08', GAL='1.04', photon_index_error='0.00', photon_flux_upper_limit='1.89e-08', energy_flux_error2='2.71e-06', EG='1.03', time_epoch_completed='1635709371.6', return_code='0', job_id='728198', GAL2='1.04', EG2='1.02', return_code2='0', energy_flux_error='3.16e-06', photon_flux_error2='9.71e-09', ts2='3.66', photon_index='2.09' WHERE bin_id='102' AND source_name='4FGL J1740.0+4737' AND cadence='monthly';

Database successfully updated.


Analysis Complete.


Sun Oct 31 12:42:51 PDT 2021


------------------------------------------------------------
Sender: LSF System <scs@bullet0179>
Subject: Job 728198: <4FGL_J1740.0+4737_monthly_bin102> in cluster <slac> Done

Job <4FGL_J1740.0+4737_monthly_bin102> was submitted from host <rhel6-64p> by user <kocevski> in cluster <slac> at Sun Oct 31 09:55:14 2021
Job was executed on host(s) <bullet0179>, in queue <medium>, as user <kocevski> in cluster <slac> at Sun Oct 31 09:57:29 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Sun Oct 31 09:57:29 2021
Terminated at Sun Oct 31 12:42:52 2021
Results reported at Sun Oct 31 12:42:52 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1740.0+4737_monthly_bin102 265.023 47.6198 501379201 503971201 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1740.0+4737 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   9828.00 sec.
    Max Memory :                                 1263 MB
    Average Memory :                             441.15 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   9923 sec.
    Turnaround time :                            10058 sec.

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

