/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 119 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 = 7554
number of fields = 27
No RA_SUN column yet. Adding RA_SUN/DEC_SUN columns.
Done.


Performing analysis on: 4FGL_J2040.5-1705_daily_bin335
RA = 310.136, Dec = -17.0901
tmin = 326160001, tmax = 326419201
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='107190', job_status='RUN', time_executed='2021-09-25 15:44:01.516453', time_epoch_executed='1632609841.52' WHERE source_name='4FGL J2040.5-1705' and cadence='daily' and bin_id='335'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/107190

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/107190/ft1_4FGL_J2040.5-1705_daily_bin335.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/107190/ft2_4FGL_J2040.5-1705_daily_bin335.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/107190/ft1_4FGL_J2040.5-1705_daily_bin335.fits outfile=/scratch/kocevski/107190/ft1_filteredMKT_4FGL_J2040.5-1705_daily_bin335.fits ra=310.136 dec=-17.0901 rad=12.0 tmin=326160001.0 tmax=326419201.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.56
user 3.29
sys 0.22

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/107190/ft2_4FGL_J2040.5-1705_daily_bin335.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/107190/ft2_4FGL_J2040.5-1705_daily_bin335.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/107190/ft1_filteredMKT_4FGL_J2040.5-1705_daily_bin335.fits evtable="EVENTS" outfile="/scratch/kocevski/107190/ft1_filtered_4FGL_J2040.5-1705_daily_bin335.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.55
user 0.35
sys 0.15

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/107190/ft1_filtered_4FGL_J2040.5-1705_daily_bin335.fits" evtable="EVENTS" scfile=/scratch/kocevski/107190/ft2_4FGL_J2040.5-1705_daily_bin335.fits sctable="SC_DATA" outfile=/scratch/kocevski/107190/ltcube_326160001_326419201_4FGL_J2040.5-1705_daily_bin335.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/107190/ft2_4FGL_J2040.5-1705_daily_bin335.fits
.....................!
real 14.68
user 14.22
sys 0.33

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/107190/ft1_filtered_4FGL_J2040.5-1705_daily_bin335.fits evtable="EVENTS" scfile=/scratch/kocevski/107190/ft2_4FGL_J2040.5-1705_daily_bin335.fits sctable="SC_DATA" expcube=/scratch/kocevski/107190/ltcube_326160001_326419201_4FGL_J2040.5-1705_daily_bin335.fits outfile=/scratch/kocevski/107190/expmap_326160001_326419201_4FGL_J2040.5-1705_daily_bin335.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/107190/ltcube_326160001_326419201_4FGL_J2040.5-1705_daily_bin335.fits
.....................!
real 191.69
user 186.12
sys 4.20

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

Setting source of interest to:
4FGL J2040.5-1705 @ 310.136 -17.0901

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/107190/ft1_filtered_4FGL_J2040.5-1705_daily_bin335.fits scfile=/scratch/kocevski/107190/ft2_4FGL_J2040.5-1705_daily_bin335.fits outfile=/scratch/kocevski/107190/cmap_326160001_326419201_4FGL_J2040.5-1705_daily_bin335.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=310.136 yref=-17.0901 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.55
user 0.39
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/107190/ft1_filtered_4FGL_J2040.5-1705_daily_bin335.fits scfile=/scratch/kocevski/107190/ft2_4FGL_J2040.5-1705_daily_bin335.fits outfile=/scratch/kocevski/107190/cmap_HighResolution_326160001_326419201_4FGL_J2040.5-1705_daily_bin335.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=310.136 yref=-17.0901 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.56
user 0.40
sys 0.15

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/107190/ft1_filtered_4FGL_J2040.5-1705_daily_bin335.fits evtable="EVENTS" scfile=/scratch/kocevski/107190/ft2_4FGL_J2040.5-1705_daily_bin335.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/107190/Model_4FGL_J2040.5-1705_daily_bin335.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/107190/ft1_filtered_4FGL_J2040.5-1705_daily_bin335.fits.....................!
real 65.98
user 64.29
sys 1.18

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/107190/ft1_filtered_4FGL_J2040.5-1705_daily_bin335.fits', '/scratch/kocevski/107190/ft2_4FGL_J2040.5-1705_daily_bin335.fits', expMap='/scratch/kocevski/107190/expmap_326160001_326419201_4FGL_J2040.5-1705_daily_bin335.fits', expCube='/scratch/kocevski/107190/ltcube_326160001_326419201_4FGL_J2040.5-1705_daily_bin335.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/107190/Model_4FGL_J2040.5-1705_daily_bin335.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J2040.5-1705'

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  1.223e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-12)
324        Index:  2.541e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
325        Scale:  7.724e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/107190/ft1_filtered_4FGL_J2040.5-1705_daily_bin335.fits
Spacecraft file(s): /scratch/kocevski/107190/ft2_4FGL_J2040.5-1705_daily_bin335.fits
Exposure map: /scratch/kocevski/107190/expmap_326160001_326419201_4FGL_J2040.5-1705_daily_bin335.fits
Exposure cube: /scratch/kocevski/107190/ltcube_326160001_326419201_4FGL_J2040.5-1705_daily_bin335.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/107190/Model_4FGL_J2040.5-1705_daily_bin335.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) = 7076.19659913

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10891E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    134.11       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .11108E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .11404E-03   1.0000         .10000E-03   10000.    
     5 'norm      '    .78035E-03   1.0000         .10000E-03   10000.    
     6 'norm      '    6.9952       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .13286E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    1.4168       1.0000         .10000E-03   10000.    
     9 'norm      '    14.841       1.0000         .10000E-03   10000.    
    10 'norm      '    1.4921       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10008E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    4.8909       1.0000         .10000E-03   10000.    
    13 'norm      '    3.9710       1.0000         .10000E-03   10000.    
    14 'Prefactor '    12.007       1.0000         .10000E-03   10000.    
    15 'Prefactor '    .22271E-02   1.0000         .10000E-03   10000.    
    16 'norm      '    .10623E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    .10462E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    7.0988       1.0000         .10000E-03   10000.    
    19 'Prefactor '    13.688       1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    21 'Normalizat'    .51658       1.0000         .10000E-01   10.000    
    22 'Prefactor '    1.1595       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5990E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   7076.174     FROM MIGRAD    STATUS=CONVERGED    486 CALLS     2411 TOTAL
                     EDM=   .12E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  5.0%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    39.133        .40867E-05** at limit **
   2  Prefactor     134.12        55.134       -.12655E-05   -.11735E-03
   3  Prefactor     .10000E-03    1.2684        .37696E-06** at limit **
   4  Prefactor     .10000E-03    41.568        .52731E-06** at limit **
   5  norm          .10115E-03    14.379        .97592E-05** at limit **
   6  norm          6.9814        9.5491        .11098E-05   -.13444E-03
   7  Prefactor     .10000E-03    47.426       -.45572E-05** at limit **
   8  norm          1.4247        18.807        .20197E-04    .25499E-03
   9  norm          14.820        31.394        .15594E-05   -.12438E-04
  10  norm          1.4930        1.3313       -.10273E-06   -.35112E-03
  11  Prefactor     .10000E-03    14.081        .48309E-06** at limit **
  12  Prefactor     4.8950        6.0952        .35157E-07   -.93585E-04
  13  norm          3.9725        3.2769        .47998E-07   -.18657E-04
  14  Prefactor     12.008        5.6931        .29550E-06   -.14021E-03
  15  Prefactor     .10001E-03    176.46        .85452E-05** at limit **
  16  norm          .10000E-03    8.3511       -.49414E-07** at limit **
  17  Prefactor     .10000E-03    16.755       -.44939E-06** at limit **
  18  Prefactor     7.1067        6.8237        .14650E-06   -.15349E-03
  19  Prefactor     13.693        20.653        .56036E-06    .32365E-04
  20  Prefactor     .10000E-03    11.834       -.14310E-06** at limit **
  21  Normalizat    .51667        .28954        .10607E-05   -.34905E-03
  22  Prefactor     1.1593        .12413       -.12323E-05   -.12953E-02
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 134.125
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.000101152
  norm       = 6.98145
  Prefactor  = 0.0001
  norm       = 1.42468
  norm       = 14.8196
  norm       = 1.49296
  Prefactor  = 0.0001
  Prefactor  = 4.895
  norm       = 3.97255
  Prefactor  = 12.0081
  Prefactor  = 0.000100011
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 7.10673
  Prefactor  = 13.6925
  Prefactor  = 0.0001
  Normalizat = 0.516666
  Prefactor  = 1.15929
 **********
 **   18 **HESSE 
 **********

 FCN=   7076.174     FROM HESSE     STATUS=OK           348 CALLS     2759 TOTAL
                     EDM=   .14E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    39.300        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     134.12        55.199        .17388E-03   -1.3387    
   3  Prefactor     .10000E-03    2.2222        .18020E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    42.570        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          .10115E-03    85.913        .50336E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  norm          6.9814        9.4665        .75841E-03   -1.5179    
   7  Prefactor     .10000E-03    47.424        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          1.4247        19.538        .18182E-02   -1.5469    
   9  norm          14.820        31.398        .10397E-03   -1.4938    
  10  norm          1.4930        1.3143        .87413E-04   -1.5464    
  11  Prefactor     .10000E-03    14.195        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     4.8950        6.0853        .18188E-03   -1.5265    
  13  norm          3.9725        3.2710        .13406E-03   -1.5309    
  14  Prefactor     12.008        5.6675        .11561E-03   -1.5015    
  15  Prefactor     .10001E-03    177.28        .20130E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          .10000E-03    8.3552        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     .10000E-03    16.956        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     7.1067        6.8024        .15056E-03   -1.5175    
  19  Prefactor     13.693        20.594        .10826E-03   -1.4968    
  20  Prefactor     .10000E-03    11.908        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Normalizat    .51667        .29958        .51680E-03   -1.1165    
  22  Prefactor     1.1593        .13123        .15608E-03   -.87593    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.39036e-08
Minuit parameter uncertainties:
  1  5.17e-05
  2  55.2203
  3  9.90092e-06
  4  1.30267e-06
  5  0.0199244
  6  9.46856
  7  0.000292616
  8  10.5557
  9  31.4331
  10  1.31434
  11  4.39237e-05
  12  6.08605
  13  3.27114
  14  5.66776
  15  0.0028019
  16  7.62289e-06
  17  9.26458e-05
  18  6.80311
  19  20.6044
  20  9.84523e-06
  21  0.300525
  22  0.131268
Done.

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

Extracting fit parameters...

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  1.201e+01  5.668e+00  1.000e-04  1.000e+04 ( 1.000e-12)
324        Index:  2.541e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
325        Scale:  7.724e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
596    Prefactor:  1.159e+00  1.313e-01  0.000e+00  1.000e+01 ( 1.000e+00)
597        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
598        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
595   Normalization:  5.167e-01  3.005e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 7.63
Ra Dec: 310.136 -17.090
Photon Index (Fixed Index): 2.54 +/- 0.00
Photon Flux (Fixed Index): 1.41e-07 +/- 6.63e-08
Energy Flux (Fixed Index): 3.91e-05 +/- 1.84e-05

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) = 7075.78643548
delta logL = 0.387948444736

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 7075.78139016
delta logL = 0.392993763071

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    6.7027       1.0000         .10000E-03   10000.    
     2 'Index     '    3.0616       1.0000          .0000       10.000    
     3 'Normalizat'    .47252       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.1746       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5990E+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=   7075.781     FROM MIGRAD    STATUS=CONVERGED     86 CALLS      299 TOTAL
                     EDM=   .10E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     6.7033        8.1198        .92189E-04   -.23702E-03
   2  Index         3.0616        .79672        .46007E-02    .53160E-03
   3  Normalizat    .47257        .29753        .53906E-03    .31171E-04
   4  Prefactor     1.1745        .12982        .15517E-03    .19256E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 6.70331
  Index      = 3.06155
  Normalizat = 0.472565
  Prefactor  = 1.17453
 **********
 **   18 **HESSE 
 **********

 FCN=   7075.781     FROM HESSE     STATUS=OK            25 CALLS      324 TOTAL
                     EDM=   .29E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     6.7033        6.8680        .36876E-05   -1.5190    
   2  Index         3.0616        .67439        .92014E-03   -.39812    
   3  Normalizat    .47257        .29689        .21562E-04   -1.1370    
   4  Prefactor     1.1745        .12946        .31034E-04   -.87119    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.85981e-11
Minuit parameter uncertainties:
  1  6.8688
  2  0.676818
  3  0.297888
  4  0.129497
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/107190': 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) = 7075.78138982
delta logL = 0.392994099308

Extracting fit parameters...

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  6.703e+00  6.869e+00  1.000e-04  1.000e+04 ( 1.000e-12)
324        Index:  3.062e+00  6.768e-01  0.000e+00  1.000e+01 (-1.000e+00)
325        Scale:  7.724e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
596    Prefactor:  1.175e+00  1.295e-01  0.000e+00  1.000e+01 ( 1.000e+00)
597        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
598        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
595   Normalization:  4.726e-01  2.979e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 8.54
Ra Dec: 310.136 -17.090
Photon Index (Free Index): 3.06 +/- 0.68
Photon Flux (Free Index): 1.70e-07 +/- 8.01e-08
Energy Flux (Free Index): 3.30e-05 +/- 1.59e-05

Creating a high resolution counts map...
INFO: Auto-setting vmin to -1.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  1.110e+00 [aplpy.core]
Saving /scratch/kocevski/107190/cmap_HighResolution_326160001_326419201_4FGL_J2040.5-1705_daily_bin335.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='1.41e-07', energy_flux2='3.30e-05', photon_flux_error='6.63e-08', dlogl='3.93e-01', energy_flux='3.91e-05', photon_flux2='1.70e-07', job_status='DONE', time_completed='2021-09-25 15:54:46.926002', photon_index_error2='0.68', photon_index2='3.06', ts='7.63', fit_tolerance='1e-08', GAL='1.16', photon_index_error='0.00', energy_flux_error2='1.59e-05', EG='0.52', time_epoch_completed='1632610486.93', return_code='0', job_id='107190', GAL2='1.17', EG2='0.47', return_code2='0', energy_flux_error='1.84e-05', photon_flux_error2='8.01e-08', ts2='8.54', photon_index='2.54' WHERE bin_id='335' AND source_name='4FGL J2040.5-1705' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep 25 15:54:46 PDT 2021


------------------------------------------------------------
Sender: LSF System <scs@bullet0185>
Subject: Job 107190: <4FGL_J2040.5-1705_daily_bin335> in cluster <slac> Done

Job <4FGL_J2040.5-1705_daily_bin335> was submitted from host <rhel6-64j> by user <kocevski> in cluster <slac> at Sat Sep 25 15:40:35 2021
Job was executed on host(s) <bullet0185>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Sep 25 15:41:53 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Sat Sep 25 15:41:53 2021
Terminated at Sat Sep 25 15:54:47 2021
Results reported at Sat Sep 25 15:54:47 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2040.5-1705_daily_bin335 310.136 -17.0901 326160001 326419201 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J2040.5-1705 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   641.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             290.15 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   774 sec.
    Turnaround time :                            852 sec.

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

