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


Performing analysis on: 4FGL_J2040.5-1705_daily_bin1648
RA = 310.136, Dec = -17.0901
tmin = 666489601, tmax = 666748801
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='44250', job_status='RUN', time_executed='2022-02-17 02:29:26.417115', time_epoch_executed='1645093766.42' WHERE source_name='4FGL J2040.5-1705' and cadence='daily' and bin_id='1648'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/44250

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/44250/ft1_4FGL_J2040.5-1705_daily_bin1648.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/44250/ft2_4FGL_J2040.5-1705_daily_bin1648.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/44250/ft1_4FGL_J2040.5-1705_daily_bin1648.fits outfile=/scratch/kocevski/44250/ft1_filteredMKT_4FGL_J2040.5-1705_daily_bin1648.fits ra=310.136 dec=-17.0901 rad=12.0 tmin=666489601.0 tmax=666748801.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.15
user 2.91
sys 0.23

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/44250/ft2_4FGL_J2040.5-1705_daily_bin1648.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/44250/ft1_filteredMKT_4FGL_J2040.5-1705_daily_bin1648.fits evtable="EVENTS" outfile="/scratch/kocevski/44250/ft1_filtered_4FGL_J2040.5-1705_daily_bin1648.fits" apply_filter=yes overwrite=yes header_obstimes=yes tstart=0.0 tstop=0.0 gtifile="default" chatter=3 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

This is gtmktime version HEAD
Applying GTI filter:
IN_SAA!=T && LIVETIME>0 && gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nogrb.gti',(START+STOP)/2) && (angsep(RA_SUN,DEC_SUN,RA_ZENITH,DEC_ZENITH)>115 || gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nosolarflares.gti',(START+STOP)/2))
real 0.50
user 0.34
sys 0.14

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/44250/ft1_filtered_4FGL_J2040.5-1705_daily_bin1648.fits" evtable="EVENTS" scfile=/scratch/kocevski/44250/ft2_4FGL_J2040.5-1705_daily_bin1648.fits sctable="SC_DATA" outfile=/scratch/kocevski/44250/ltcube_666489601_666748801_4FGL_J2040.5-1705_daily_bin1648.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/44250/ft2_4FGL_J2040.5-1705_daily_bin1648.fits
.....................!
real 12.99
user 12.64
sys 0.30

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/44250/ft1_filtered_4FGL_J2040.5-1705_daily_bin1648.fits evtable="EVENTS" scfile=/scratch/kocevski/44250/ft2_4FGL_J2040.5-1705_daily_bin1648.fits sctable="SC_DATA" expcube=/scratch/kocevski/44250/ltcube_666489601_666748801_4FGL_J2040.5-1705_daily_bin1648.fits outfile=/scratch/kocevski/44250/expmap_666489601_666748801_4FGL_J2040.5-1705_daily_bin1648.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/44250/ltcube_666489601_666748801_4FGL_J2040.5-1705_daily_bin1648.fits
.....................!
real 191.83
user 186.23
sys 5.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/44250/ft1_filtered_4FGL_J2040.5-1705_daily_bin1648.fits scfile=/scratch/kocevski/44250/ft2_4FGL_J2040.5-1705_daily_bin1648.fits outfile=/scratch/kocevski/44250/cmap_666489601_666748801_4FGL_J2040.5-1705_daily_bin1648.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.54
user 0.37
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/44250/ft1_filtered_4FGL_J2040.5-1705_daily_bin1648.fits scfile=/scratch/kocevski/44250/ft2_4FGL_J2040.5-1705_daily_bin1648.fits outfile=/scratch/kocevski/44250/cmap_HighResolution_666489601_666748801_4FGL_J2040.5-1705_daily_bin1648.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/44250/ft1_filtered_4FGL_J2040.5-1705_daily_bin1648.fits evtable="EVENTS" scfile=/scratch/kocevski/44250/ft2_4FGL_J2040.5-1705_daily_bin1648.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/44250/Model_4FGL_J2040.5-1705_daily_bin1648.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/44250/ft1_filtered_4FGL_J2040.5-1705_daily_bin1648.fits.....................!
real 53.80
user 52.41
sys 1.19

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10011E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10021E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    1.4474       1.0000         .10000E-03   10000.    
     4 'Prefactor '    14.002       1.0000         .10000E-03   10000.    
     5 'norm      '    .10005E-03   1.0000         .10000E-03   10000.    
     6 'norm      '    .10017E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    .10003E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    47.902       1.0000         .10000E-03   10000.    
    10 'norm      '    .10090E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10224E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10009E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    3.7203       1.0000         .10000E-03   10000.    
    14 'Prefactor '    18.782       1.0000         .10000E-03   10000.    
    15 'Prefactor '    .11637E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    29.614       1.0000         .10000E-03   10000.    
    17 'Prefactor '    14.611       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10010E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10640E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10437E-03   1.0000         .10000E-03   10000.    
    21 'Normalizat'    .77637       1.0000         .10000E-01   10.000    
    22 'Prefactor '    1.1355       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=   5076.958     FROM MIGRAD    STATUS=CONVERGED    486 CALLS     2438 TOTAL
                     EDM=   .65E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .4%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    47.884       -.29482E-04** at limit **
   2  Prefactor     .10000E-03    20.418        .28163E-05** at limit **
   3  Prefactor     1.4554        3.5223        .40240E-05    .43392E-03
   4  Prefactor     13.922        32.338       -.20446E-04   -.65388E-04
   5  norm          .10000E-03    48.748       -.35588E-04** at limit **
   6  norm          .10000E-03    3.9972        .66723E-07** at limit **
   7  Prefactor     .10000E-03    106.41        .60591E-04** at limit **
   8  norm          .10000E-03    9.2368       -.46449E-06** at limit **
   9  norm          47.901        44.896       -.36754E-05   -.15680E-04
  10  norm          .10000E-03    .66196       -.59151E-06** at limit **
  11  Prefactor     .10000E-03    39.447        .40258E-04** at limit **
  12  Prefactor     .10000E-03    4.5934        .82948E-08** at limit **
  13  norm          3.7202        5.0813       -.75883E-06   -.33553E-03
  14  Prefactor     18.780        10.054       -.85828E-06    .11544E-04
  15  Prefactor     .10000E-03    108.12        .61087E-04** at limit **
  16  norm          29.575        46.377       -.33139E-04   -.38046E-04
  17  Prefactor     14.609        24.448       -.36079E-05    .20316E-04
  18  Prefactor     .10000E-03    21.890       -.68424E-05** at limit **
  19  Prefactor     .10000E-03    182.54       -.13739E-03** at limit **
  20  Prefactor     .10000E-03    134.23        .10966E-04** at limit **
  21  Normalizat    .77669        .41404        .83074E-05    .18042E-03
  22  Prefactor     1.1354        .15183        .10564E-05    .37254E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 1.45537
  Prefactor  = 13.9222
  norm       = 0.000100002
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 47.9005
  norm       = 0.0001
  Prefactor  = 0.000100004
  Prefactor  = 0.0001
  norm       = 3.72021
  Prefactor  = 18.7796
  Prefactor  = 0.000100002
  norm       = 29.5752
  Prefactor  = 14.6094
  Prefactor  = 0.0001
  Prefactor  = 0.000100005
  Prefactor  = 0.000100003
  Normalizat = 0.776692
  Prefactor  = 1.13544
 **********
 **   18 **HESSE 
 **********

 FCN=   5076.958     FROM HESSE     STATUS=OK           336 CALLS     2774 TOTAL
                     EDM=   .14E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    48.036        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    20.433        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     1.4554        3.2690        .14173E-03   -1.5467    
   4  Prefactor     13.922        30.423        .10704E-03   -1.4962    
   5  norm          .10000E-03    49.730        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  norm          .10000E-03    4.0033        .13910E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    106.39        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .10000E-03    9.2549        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          47.901        44.949        .57936E-04   -1.4323    
  10  norm          .10000E-03    1.0452        .11161E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    39.965        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    4.6026        .14913E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          3.7202        5.0670        .18006E-03   -1.5322    
  14  Prefactor     18.780        10.057        .92418E-04   -1.4841    
  15  Prefactor     .10000E-03    108.49        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          29.575        46.469        .73624E-04   -1.4620    
  17  Prefactor     14.609        24.429        .10478E-03   -1.4943    
  18  Prefactor     .10000E-03    22.106        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .10000E-03    184.49        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10000E-03    139.09        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Normalizat    .77669        .46544        .50802E-03   -1.0094    
  22  Prefactor     1.1354        .17520        .16315E-03   -.88342    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.40013e-09
Minuit parameter uncertainties:
  1  0.00014508
  2  2.85969e-05
  3  3.26936
  4  30.4568
  5  0.000575573
  6  2.07356e-05
  7  4.66685e-05
  8  1.92449e-05
  9  44.9811
  10  4.54169e-05
  11  0.000779877
  12  1.42387e-05
  13  5.06756
  14  10.0579
  15  0.00103333
  16  46.5256
  17  24.4461
  18  7.07169e-05
  19  0.00192001
  20  0.00135687
  21  0.467854
  22  0.175292
Done.

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

Extracting fit parameters...

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  1.878e+01  1.006e+01  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.135e+00  1.753e-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:  7.767e-01  4.679e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 6.11
Ra Dec: 310.136 -17.090
Photon Index (Fixed Index): 2.54 +/- 0.00
Photon Flux (Fixed Index): 2.20e-07 +/- 1.18e-07
Energy Flux (Fixed Index): 6.11e-05 +/- 3.27e-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) = 5076.7443342
delta logL = 0.213773342307

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5076.74078073
delta logL = 0.217326815177

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    14.379       1.0000         .10000E-03   10000.    
     2 'Index     '    2.9200       1.0000          .0000       10.000    
     3 'Normalizat'    .67346       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.1640       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.

 FCN=   5076.741     FROM MIGRAD    STATUS=CONVERGED     57 CALLS      265 TOTAL
                     EDM=   .37E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     14.387        109.25        .26407E-02    .16020E-03
   2  Index         2.9210        3.3159        .11819        .11825E-03
   3  Normalizat    .67342        .19159        .12234        .42134E-04
   4  Prefactor     1.1638        .58990E-01    .35544E-01    .52390E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 14.3867
  Index      = 2.92098
  Normalizat = 0.673419
  Prefactor  = 1.16378
 **********
 **   18 **HESSE 
 **********

 FCN=   5076.741     FROM HESSE     STATUS=OK            33 CALLS      298 TOTAL
                     EDM=   .81E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     14.387        12.066        .10563E-03   -1.4949    
   2  Index         2.9210        .66200        .46070E-02   -.42883    
   3  Normalizat    .67342        .48882        .54261E-03   -1.0495    
   4  Prefactor     1.1638        .18002        .16136E-03   -.87453    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 8.11425e-12
Minuit parameter uncertainties:
  1  12.0683
  2  0.664365
  3  0.492022
  4  0.180116
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/44250': 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) = 5076.74077207
delta logL = 0.217335474134

Extracting fit parameters...

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  1.439e+01  1.207e+01  1.000e-04  1.000e+04 ( 1.000e-12)
324        Index:  2.921e+00  6.644e-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.164e+00  1.801e-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:  6.734e-01  4.920e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 6.81
Ra Dec: 310.136 -17.090
Photon Index (Free Index): 2.92 +/- 0.66
Photon Flux (Free Index): 2.94e-07 +/- 1.74e-07
Energy Flux (Free Index): 6.12e-05 +/- 3.00e-05

Creating a high resolution counts map...
INFO: Auto-setting vmin to  0.000e+00 [aplpy.core]
INFO: Auto-setting vmax to  0.000e+00 [aplpy.core]
Saving /scratch/kocevski/44250/cmap_HighResolution_666489601_666748801_4FGL_J2040.5-1705_daily_bin1648.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='2.20e-07', energy_flux2='6.12e-05', photon_flux_error='1.18e-07', dlogl='2.17e-01', energy_flux='6.11e-05', photon_flux2='2.94e-07', job_status='DONE', time_completed='2022-02-17 02:38:27.256047', photon_index_error2='0.66', photon_index2='2.92', ts='6.11', fit_tolerance='1e-08', GAL='1.14', photon_index_error='0.00', energy_flux_error2='3.00e-05', EG='0.78', time_epoch_completed='1645094307.26', return_code='0', job_id='44250', GAL2='1.16', EG2='0.67', return_code2='0', energy_flux_error='3.27e-05', photon_flux_error2='1.74e-07', ts2='6.81', photon_index='2.54' WHERE bin_id='1648' AND source_name='4FGL J2040.5-1705' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Feb 17 02:38:27 PST 2022


------------------------------------------------------------
Sender: LSF System <lsf@bullet0172>
Subject: Job 44250: <4FGL_J2040.5-1705_daily_bin1648> in cluster <slac> Done

Job <4FGL_J2040.5-1705_daily_bin1648> was submitted from host <rhel6-64p> by user <kocevski> in cluster <slac> at Thu Feb 17 02:25:37 2022
Job was executed on host(s) <bullet0172>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Feb 17 02:29:08 2022
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Thu Feb 17 02:29:08 2022
Terminated at Thu Feb 17 02:38:28 2022
Results reported at Thu Feb 17 02:38:28 2022

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2040.5-1705_daily_bin1648 310.136 -17.0901 666489601 666748801 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 :                                   543.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             357.81 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   559 sec.
    Turnaround time :                            771 sec.

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

