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


Performing analysis on: 4FGL_J2040.5-1705_daily_bin1646
RA = 310.136, Dec = -17.0901
tmin = 665971201, tmax = 666230401
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='677335', job_status='RUN', time_executed='2022-02-11 00:37:55.371909', time_epoch_executed='1644568675.37' WHERE source_name='4FGL J2040.5-1705' and cadence='daily' and bin_id='1646'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/677335

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/677335/ft1_4FGL_J2040.5-1705_daily_bin1646.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/677335/ft2_4FGL_J2040.5-1705_daily_bin1646.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/677335/ft1_4FGL_J2040.5-1705_daily_bin1646.fits outfile=/scratch/kocevski/677335/ft1_filteredMKT_4FGL_J2040.5-1705_daily_bin1646.fits ra=310.136 dec=-17.0901 rad=12.0 tmin=665971201.0 tmax=666230401.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 4.54
user 4.30
sys 0.22

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/677335/ft1_filtered_4FGL_J2040.5-1705_daily_bin1646.fits" evtable="EVENTS" scfile=/scratch/kocevski/677335/ft2_4FGL_J2040.5-1705_daily_bin1646.fits sctable="SC_DATA" outfile=/scratch/kocevski/677335/ltcube_665971201_666230401_4FGL_J2040.5-1705_daily_bin1646.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/677335/ft2_4FGL_J2040.5-1705_daily_bin1646.fits
.....................!
real 12.25
user 11.93
sys 0.29

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/677335/ft1_filtered_4FGL_J2040.5-1705_daily_bin1646.fits evtable="EVENTS" scfile=/scratch/kocevski/677335/ft2_4FGL_J2040.5-1705_daily_bin1646.fits sctable="SC_DATA" expcube=/scratch/kocevski/677335/ltcube_665971201_666230401_4FGL_J2040.5-1705_daily_bin1646.fits outfile=/scratch/kocevski/677335/expmap_665971201_666230401_4FGL_J2040.5-1705_daily_bin1646.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/677335/ltcube_665971201_666230401_4FGL_J2040.5-1705_daily_bin1646.fits
.....................!
real 189.99
user 185.41
sys 4.26

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/677335/ft1_filtered_4FGL_J2040.5-1705_daily_bin1646.fits scfile=/scratch/kocevski/677335/ft2_4FGL_J2040.5-1705_daily_bin1646.fits outfile=/scratch/kocevski/677335/cmap_665971201_666230401_4FGL_J2040.5-1705_daily_bin1646.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.53
user 0.39
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/677335/ft1_filtered_4FGL_J2040.5-1705_daily_bin1646.fits scfile=/scratch/kocevski/677335/ft2_4FGL_J2040.5-1705_daily_bin1646.fits outfile=/scratch/kocevski/677335/cmap_HighResolution_665971201_666230401_4FGL_J2040.5-1705_daily_bin1646.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.55
user 0.38
sys 0.16

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/677335/ft1_filtered_4FGL_J2040.5-1705_daily_bin1646.fits evtable="EVENTS" scfile=/scratch/kocevski/677335/ft2_4FGL_J2040.5-1705_daily_bin1646.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/677335/Model_4FGL_J2040.5-1705_daily_bin1646.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/677335/ft1_filtered_4FGL_J2040.5-1705_daily_bin1646.fits....................!
real 74.60
user 73.26
sys 1.20

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/677335/ft1_filtered_4FGL_J2040.5-1705_daily_bin1646.fits', '/scratch/kocevski/677335/ft2_4FGL_J2040.5-1705_daily_bin1646.fits', expMap='/scratch/kocevski/677335/expmap_665971201_666230401_4FGL_J2040.5-1705_daily_bin1646.fits', expCube='/scratch/kocevski/677335/ltcube_665971201_666230401_4FGL_J2040.5-1705_daily_bin1646.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/677335/Model_4FGL_J2040.5-1705_daily_bin1646.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/677335/ft1_filtered_4FGL_J2040.5-1705_daily_bin1646.fits
Spacecraft file(s): /scratch/kocevski/677335/ft2_4FGL_J2040.5-1705_daily_bin1646.fits
Exposure map: /scratch/kocevski/677335/expmap_665971201_666230401_4FGL_J2040.5-1705_daily_bin1646.fits
Exposure cube: /scratch/kocevski/677335/ltcube_665971201_666230401_4FGL_J2040.5-1705_daily_bin1646.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/677335/Model_4FGL_J2040.5-1705_daily_bin1646.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) = 8331.33940135

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .38264E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    31.887       1.0000         .10000E-03   10000.    
     3 'Prefactor '    1.5632       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10006E-03   1.0000         .10000E-03   10000.    
     5 'norm      '    13.329       1.0000         .10000E-03   10000.    
     6 'norm      '    .10009E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    .10015E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    33.404       1.0000         .10000E-03   10000.    
    10 'norm      '    .10032E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .26708E-02   1.0000         .10000E-03   10000.    
    13 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10008E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10087E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    .10010E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    .41765       1.0000         .10000E-03   10000.    
    18 'Prefactor '    3.0061       1.0000         .10000E-03   10000.    
    19 'Prefactor '    .84241E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    23.256       1.0000         .10000E-03   10000.    
    21 'Normalizat'    .88754       1.0000         .10000E-01   10.000    
    22 'Prefactor '    1.3092       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=   8331.303     FROM MIGRAD    STATUS=CONVERGED    485 CALLS     2411 TOTAL
                     EDM=   .75E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  7.5%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10002E-03    100.48        .44467E-05** at limit **
   2  Prefactor     31.838        50.848       -.33399E-05   -.50934E-05
   3  Prefactor     1.5614        1.6704        .19247E-06    .58372E-03
   4  Prefactor     .10000E-03    7.5316        .18304E-06** at limit **
   5  norm          13.325        16.206       -.10404E-06   -.42167E-05
   6  norm          .10000E-03    7.8809        .77033E-06** at limit **
   7  Prefactor     .10000E-03    95.501       -.53102E-06** at limit **
   8  norm          .10000E-03    23.452       -.22345E-06** at limit **
   9  norm          33.401        30.132        .10479E-07    .31577E-04
  10  norm          .10000E-03    .46271       -.10905E-06** at limit **
  11  Prefactor     .10000E-03    16.909       -.31000E-06** at limit **
  12  Prefactor     .10002E-03    20.793        .17006E-04** at limit **
  13  norm          .10000E-03    1.2300       -.69755E-08** at limit **
  14  Prefactor     .10000E-03    4.4323       -.13070E-07** at limit **
  15  Prefactor     .10000E-03    74.558        .19051E-05** at limit **
  16  norm          .10000E-03    17.291        .12423E-06** at limit **
  17  Prefactor     .37627        39.875       -.20601E-04    .29112E-03
  18  Prefactor     2.9987        9.2334       -.49290E-05    .14042E-03
  19  Prefactor     .10003E-03    15.894       -.53962E-05** at limit **
  20  Prefactor     23.252        19.909       -.56315E-06    .34367E-04
  21  Normalizat    .88800        .29025        .83366E-05    .16387E-03
  22  Prefactor     1.3092        .12284       -.21214E-05   -.14045E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100017
  Prefactor  = 31.838
  Prefactor  = 1.56138
  Prefactor  = 0.0001
  norm       = 13.3248
  norm       = 0.000100001
  Prefactor  = 0.000100001
  norm       = 0.0001
  norm       = 33.4013
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.000100019
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.376274
  Prefactor  = 2.99872
  Prefactor  = 0.000100025
  Prefactor  = 23.2523
  Normalizat = 0.887998
  Prefactor  = 1.30918
 **********
 **   18 **HESSE 
 **********

 FCN=   8331.303     FROM HESSE     STATUS=OK           358 CALLS     2769 TOTAL
                     EDM=   .36E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10002E-03    103.95        .42568E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     31.838        51.074        .70958E-04   -1.4579    
   3  Prefactor     1.5614        1.6575        .11752E-03   -1.5458    
   4  Prefactor     .10000E-03    7.5575        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          13.325        16.243        .10971E-03   -1.4978    
   6  norm          .10000E-03    7.9686        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    95.500        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .10000E-03    23.663        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          33.401        30.149        .69332E-04   -1.4551    
  10  norm          .10000E-03    .83303        .12049E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    17.148        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10002E-03    23.902        .33946E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .10000E-03    1.2352        .98851E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10000E-03    4.5423        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .10000E-03    74.600        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          .10000E-03    17.320        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     .37627        16.088        .99107E-01   -1.5585    
  18  Prefactor     2.9987        9.3296        .11705E-02   -1.5362    
  19  Prefactor     .10003E-03    13.107        .11346       -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     23.252        19.897        .83062E-04   -1.4743    
  21  Normalizat    .88800        .31598        .46294E-03   -.96883    
  22  Prefactor     1.3092        .13828        .16926E-03   -.83034    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.59171e-09
Minuit parameter uncertainties:
  1  0.00268566
  2  51.1446
  3  1.65752
  4  3.4385e-05
  5  16.2483
  6  0.000135403
  7  0.000557732
  8  0.000211978
  9  30.1627
  10  5.52372e-06
  11  6.02672e-05
  12  0.00134679
  13  1.72604e-07
  14  1.41746e-05
  15  0.000152741
  16  2.69098e-05
  17  4.92154
  18  9.33412
  19  0.00114533
  20  19.9032
  21  0.316638
  22  0.138321
Done.

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

Extracting fit parameters...

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  1.000e-04  1.417e-05  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.309e+00  1.383e-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:  8.880e-01  3.166e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 310.136 -17.090
Photon Flux Upper Limit: 1.24e-07 ph cm-2 s-1
Energy Flux Upper Limit: 9.67e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/677335/likelihoodResults_665971201_666230401_4FGL_J2040.5-1705_daily_bin1646.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) = 8331.30446075
delta logL = -0.00105033981527

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 8331.30341093
delta logL = -5.18335582456e-07

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10082E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.5543       1.0000          .0000       10.000    
     3 'Normalizat'    .88772       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.3093       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=   8331.303     FROM MIGRAD    STATUS=CONVERGED     91 CALLS      250 TOTAL
                     EDM=   .86E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    10.222        .36285E-03** at limit **
   2  Index         2.5676        6.0582        .50000       -.27079E-04
   3  Normalizat    .88799        .29936        .46295E-03    .61246E-04
   4  Prefactor     1.3092        .13134        .16926E-03    .13017E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100003
  Index      = 2.56757
  Normalizat = 0.887991
  Prefactor  = 1.30919
 **********
 **   18 **HESSE 
 **********

 FCN=   8331.303     FROM HESSE     STATUS=OK            29 CALLS      279 TOTAL
                     EDM=   .13E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    4.7095        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.5676        6.2805        .50000       -.50806    
   3  Normalizat    .88799        .29959        .18518E-04   -.96883    
   4  Prefactor     1.3092        .13144        .67705E-05   -.83034    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.30009e-09
Minuit parameter uncertainties:
  1  0.000255962
  2  4.42009
  3  0.300149
  4  0.131472
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/677335': 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) = 8331.30341025
delta logL = 1.57824615599e-07

Extracting fit parameters...

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  1.000e-04  2.560e-04  1.000e-04  1.000e+04 ( 1.000e-12)
324        Index:  2.568e+00  4.420e+00  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.309e+00  1.315e-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:  8.880e-01  3.001e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 310.136 -17.090

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/677335/cmap_HighResolution_665971201_666230401_4FGL_J2040.5-1705_daily_bin1646.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='9.67e-03', job_status='DONE', photon_flux_upper_limit='1.24e-07', time_completed='2022-02-11 00:50:41.690815', job_id='677335', GAL2='1.31', fit_tolerance='1e-08', EG2='0.89', EG='0.89', time_epoch_completed='1644569441.69', return_code2='0', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.31', dlogl='1.58e-07', ts2='-0.00', photon_index_error='0.00', photon_index='2.54' WHERE bin_id='1646' AND source_name='4FGL J2040.5-1705' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Fri Feb 11 00:50:41 PST 2022


------------------------------------------------------------
Sender: LSF System <lsf@bullet0243>
Subject: Job 677335: <4FGL_J2040.5-1705_daily_bin1646> in cluster <slac> Done

Job <4FGL_J2040.5-1705_daily_bin1646> was submitted from host <rhel6-64j> by user <kocevski> in cluster <slac> at Fri Feb 11 00:35:26 2022
Job was executed on host(s) <bullet0243>, in queue <medium>, as user <kocevski> in cluster <slac> at Fri Feb 11 00:35:28 2022
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Fri Feb 11 00:35:28 2022
Terminated at Fri Feb 11 00:50:42 2022
Results reported at Fri Feb 11 00:50:42 2022

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2040.5-1705_daily_bin1646 310.136 -17.0901 665971201 666230401 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 :                                   768.13 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             310.79 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   913 sec.
    Turnaround time :                            916 sec.

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

