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


Performing analysis on: 4FGL_J1043.2+2408_daily_bin972
RA = 160.805, Dec = 24.146
tmin = 491270401, tmax = 491529601
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='75861', job_status='RUN', time_executed='2021-09-02 09:05:49.730425', time_epoch_executed='1630598749.73' WHERE source_name='4FGL J1043.2+2408' and cadence='daily' and bin_id='972'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/75861

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/75861/ft1_4FGL_J1043.2+2408_daily_bin972.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/75861/ft2_4FGL_J1043.2+2408_daily_bin972.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/75861/ft1_4FGL_J1043.2+2408_daily_bin972.fits outfile=/scratch/kocevski/75861/ft1_filteredMKT_4FGL_J1043.2+2408_daily_bin972.fits ra=160.805 dec=24.146 rad=12.0 tmin=491270401.0 tmax=491529601.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.73
user 3.47
sys 0.21

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/75861/ft2_4FGL_J1043.2+2408_daily_bin972.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/75861/ft2_4FGL_J1043.2+2408_daily_bin972.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/75861/ft1_filteredMKT_4FGL_J1043.2+2408_daily_bin972.fits evtable="EVENTS" outfile="/scratch/kocevski/75861/ft1_filtered_4FGL_J1043.2+2408_daily_bin972.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.53
user 0.36
sys 0.17

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/75861/ft1_filtered_4FGL_J1043.2+2408_daily_bin972.fits" evtable="EVENTS" scfile=/scratch/kocevski/75861/ft2_4FGL_J1043.2+2408_daily_bin972.fits sctable="SC_DATA" outfile=/scratch/kocevski/75861/ltcube_491270401_491529601_4FGL_J1043.2+2408_daily_bin972.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/75861/ft2_4FGL_J1043.2+2408_daily_bin972.fits
.....................!
real 19.02
user 18.55
sys 0.31

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/75861/ft1_filtered_4FGL_J1043.2+2408_daily_bin972.fits evtable="EVENTS" scfile=/scratch/kocevski/75861/ft2_4FGL_J1043.2+2408_daily_bin972.fits sctable="SC_DATA" expcube=/scratch/kocevski/75861/ltcube_491270401_491529601_4FGL_J1043.2+2408_daily_bin972.fits outfile=/scratch/kocevski/75861/expmap_491270401_491529601_4FGL_J1043.2+2408_daily_bin972.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/75861/ltcube_491270401_491529601_4FGL_J1043.2+2408_daily_bin972.fits
.....................!
real 197.37
user 190.98
sys 5.03

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

Setting source of interest to:
4FGL J1043.2+2408 @ 160.805 24.146

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/75861/ft1_filtered_4FGL_J1043.2+2408_daily_bin972.fits scfile=/scratch/kocevski/75861/ft2_4FGL_J1043.2+2408_daily_bin972.fits outfile=/scratch/kocevski/75861/cmap_491270401_491529601_4FGL_J1043.2+2408_daily_bin972.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=160.805 yref=24.146 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.40
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/75861/ft1_filtered_4FGL_J1043.2+2408_daily_bin972.fits scfile=/scratch/kocevski/75861/ft2_4FGL_J1043.2+2408_daily_bin972.fits outfile=/scratch/kocevski/75861/cmap_HighResolution_491270401_491529601_4FGL_J1043.2+2408_daily_bin972.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=160.805 yref=24.146 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.59
user 0.40
sys 0.15

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/75861/ft1_filtered_4FGL_J1043.2+2408_daily_bin972.fits evtable="EVENTS" scfile=/scratch/kocevski/75861/ft2_4FGL_J1043.2+2408_daily_bin972.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/75861/Model_4FGL_J1043.2+2408_daily_bin972.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/75861/ft1_filtered_4FGL_J1043.2+2408_daily_bin972.fits.....................!
real 50.74
user 49.21
sys 1.30

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/75861/ft1_filtered_4FGL_J1043.2+2408_daily_bin972.fits', '/scratch/kocevski/75861/ft2_4FGL_J1043.2+2408_daily_bin972.fits', expMap='/scratch/kocevski/75861/expmap_491270401_491529601_4FGL_J1043.2+2408_daily_bin972.fits', expCube='/scratch/kocevski/75861/ltcube_491270401_491529601_4FGL_J1043.2+2408_daily_bin972.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/75861/Model_4FGL_J1043.2+2408_daily_bin972.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1043.2+2408'

4FGL J1043.2+2408
   Spectrum: PowerLaw
247    Prefactor:  1.079e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-12)
248        Index:  2.323e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
249        Scale:  9.688e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/75861/ft1_filtered_4FGL_J1043.2+2408_daily_bin972.fits
Spacecraft file(s): /scratch/kocevski/75861/ft2_4FGL_J1043.2+2408_daily_bin972.fits
Exposure map: /scratch/kocevski/75861/expmap_491270401_491529601_4FGL_J1043.2+2408_daily_bin972.fits
Exposure cube: /scratch/kocevski/75861/ltcube_491270401_491529601_4FGL_J1043.2+2408_daily_bin972.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/75861/Model_4FGL_J1043.2+2408_daily_bin972.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) = 5457.24976737

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    15.990       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .37906       1.0000         .10000E-03   10000.    
     3 'norm      '    9.7600       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10076E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .26745E-02   1.0000         .10000E-03   10000.    
     6 'Prefactor '    3.7167       1.0000         .10000E-03   10000.    
     7 'Prefactor '    1.8951       1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10014E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    .16280E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10107E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10073E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    2.5625       1.0000         .10000E-03   10000.    
    13 'Prefactor '    2.1163       1.0000         .10000E-03   10000.    
    14 'Prefactor '    1.2470       1.0000         .10000E-03   10000.    
    15 'Prefactor '    .12517E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    .11371E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    .11787E-03   1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.1081       1.0000         .10000E-01   10.000    
    19 'Prefactor '    .92114       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5520E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   5457.207     FROM MIGRAD    STATUS=CONVERGED    399 CALLS     1608 TOTAL
                     EDM=   .17E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  3.8%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     16.002        9.8385       -.64973E-06    .88701E-04
   2  Prefactor     .37310        5.8125        .45994E-05   -.56161E-04
   3  norm          9.8022        11.027       -.19650E-06    .22208E-04
   4  Prefactor     .10000E-03    11.534        .33959E-06** at limit **
   5  Prefactor     .10000E-03    48.337        .24897E-05** at limit **
   6  Prefactor     3.7696        6.4457        .62154E-07   -.62178E-03
   7  Prefactor     1.8933        1.7298       -.13637E-08    .42246E-05
   8  Prefactor     .10000E-03    9.1538       -.56325E-06** at limit **
   9  Prefactor     .10000E-03    2.1476       -.42623E-07** at limit **
  10  Prefactor     .10000E-03    26.299       -.12393E-05** at limit **
  11  Prefactor     .10000E-03    3.3756       -.10774E-06** at limit **
  12  Prefactor     2.6193        18.132        .16821E-05    .65787E-04
  13  Prefactor     2.1263        5.7755       -.59018E-07   -.55228E-03
  14  Prefactor     1.2494        3.8636       -.64794E-06   -.31730E-03
  15  Prefactor     .10000E-03    1.8576       -.16853E-07** at limit **
  16  norm          .10000E-03    5.8196        .94125E-08** at limit **
  17  Prefactor     .10000E-03    3.6416        .54403E-07** at limit **
  18  Normalizat    1.1077        .19233       -.93652E-06    .57174E-04
  19  Prefactor     .92106        .19293        .12673E-05    .11873E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 16.0025
  Prefactor  = 0.373101
  norm       = 9.80224
  Prefactor  = 0.0001
  Prefactor  = 0.000100001
  Prefactor  = 3.76961
  Prefactor  = 1.89333
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 2.61926
  Prefactor  = 2.12625
  Prefactor  = 1.24942
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Normalizat = 1.10773
  Prefactor  = 0.921057
 **********
 **   18 **HESSE 
 **********

 FCN=   5457.207     FROM HESSE     STATUS=OK           270 CALLS     1878 TOTAL
                     EDM=   .15E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     16.002        9.8069        .10016E-03   -1.4908    
   2  Prefactor     .37310        5.8534        .18383E-02   -1.5586    
   3  norm          9.8022        11.020        .12827E-03   -1.5082    
   4  Prefactor     .10000E-03    11.528        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    47.925        .19950E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     3.7696        7.7425        .10473E-02   -1.5320    
   7  Prefactor     1.8933        1.7220        .89188E-04   -1.5433    
   8  Prefactor     .10000E-03    9.5019        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .10000E-03    2.1506        .10573E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    26.430        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    3.3828        .13257E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     2.6193        17.068        .25502E-03   -1.5384    
  13  Prefactor     2.1263        10.976        .14177E-02   -1.5416    
  14  Prefactor     1.2494        3.7738        .21345E-03   -1.5484    
  15  Prefactor     .10000E-03    1.8599        .98329E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          .10000E-03    5.8572        .17401E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     .10000E-03    3.6483        .13765E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    1.1077        .22351        .22925E-03   -.89504    
  19  Prefactor     .92106        .22406        .26173E-03   -.95409    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.46531e-08
Minuit parameter uncertainties:
  1  9.80785
  2  2.95556
  3  11.0227
  4  2.62323e-05
  5  0.000392896
  6  7.74457
  7  1.72209
  8  1.72354e-05
  9  4.36742e-06
  10  5.55029e-05
  11  4.42579e-06
  12  13.3779
  13  9.66443
  14  3.77454
  15  3.03225e-06
  16  1.31707e-05
  17  8.67298e-06
  18  0.2237
  19  0.224283
Done.

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

Extracting fit parameters...

4FGL J1043.2+2408
   Spectrum: PowerLaw
247    Prefactor:  1.893e+00  1.722e+00  1.000e-04  1.000e+04 ( 1.000e-12)
248        Index:  2.323e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
249        Scale:  9.688e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
549    Prefactor:  9.211e-01  2.243e-01  0.000e+00  1.000e+01 ( 1.000e+00)
550        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
551        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
548   Normalization:  1.108e+00  2.237e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 2.56
Ra Dec: 160.805 24.146
Photon Index (Fixed Index): 2.32 +/- 0.00
Photon Flux (Fixed Index): 2.80e-08 +/- 2.54e-08
Energy Flux (Fixed Index): 1.02e-05 +/- 9.30e-06

TS (Fixed Index): 2.56
Ra Dec: 160.805 24.146
Photon Flux Upper Limit: 9.38e-08 ph cm-2 s-1
Energy Flux Upper Limit: 7.21e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/75861/likelihoodResults_491270401_491529601_4FGL_J1043.2+2408_daily_bin972.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) = 5456.63239034
delta logL = 0.574210309514

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5456.58035092
delta logL = 0.626249725872

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   5456.580     FROM MIGRAD    STATUS=CONVERGED     48 CALLS      198 TOTAL
                     EDM=   .20E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     2.5250        2.4984        .64306E-02    .13076E-04
   2  Index         1.6761        .52152        .21792       -.30116E-04
   3  Normalizat    1.1209        .18042        .37206E-01    .16152E-04
   4  Prefactor     .91128        .19032        .45148E-01    .24069E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 2.525
  Index      = 1.67608
  Normalizat = 1.1209
  Prefactor  = 0.911279
 **********
 **   18 **HESSE 
 **********

 FCN=   5456.580     FROM HESSE     STATUS=OK            33 CALLS      231 TOTAL
                     EDM=   .11E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     2.5250        2.1115        .93061E-04   -1.5390    
   2  Index         1.6761        .51320        .82805E-02   -.72721    
   3  Normalizat    1.1209        .20866        .22801E-03   -.89083    
   4  Prefactor     .91128        .22019        .26280E-03   -.95748    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.09463e-12
Minuit parameter uncertainties:
  1  2.1116
  2  0.514833
  3  0.20881
  4  0.2204
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/75861': 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) = 5456.58034991
delta logL = 0.626250741678

Extracting fit parameters...

4FGL J1043.2+2408
   Spectrum: PowerLaw
247    Prefactor:  2.525e+00  2.112e+00  1.000e-04  1.000e+04 ( 1.000e-12)
248        Index:  1.676e+00  5.148e-01  0.000e+00  1.000e+01 (-1.000e+00)
249        Scale:  9.688e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
549    Prefactor:  9.113e-01  2.204e-01  0.000e+00  1.000e+01 ( 1.000e+00)
550        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
551        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
548   Normalization:  1.121e+00  2.088e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 3.82
Ra Dec: 160.805 24.146
Photon Index (Free Index): 1.68 +/- 0.51
Photon Flux (Free Index): 1.66e-08 +/- 1.72e-08
Energy Flux (Free Index): 2.93e-05 +/- 3.84e-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/75861/cmap_HighResolution_491270401_491529601_4FGL_J1043.2+2408_daily_bin972.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='7.21e-03', comment='SUCCESS', photon_flux='2.80e-08', energy_flux2='2.93e-05', photon_flux_error='2.54e-08', dlogl='6.26e-01', energy_flux='1.02e-05', photon_flux2='1.66e-08', job_status='DONE', time_completed='2021-09-02 09:15:00.148287', photon_index_error2='0.51', photon_index2='1.68', ts='2.56', fit_tolerance='1e-08', GAL='0.92', photon_index_error='0.00', photon_flux_upper_limit='9.38e-08', energy_flux_error2='3.84e-05', EG='1.11', time_epoch_completed='1630599300.15', return_code='0', job_id='75861', GAL2='0.91', EG2='1.12', return_code2='0', energy_flux_error='9.30e-06', photon_flux_error2='1.72e-08', ts2='3.82', photon_index='2.32' WHERE bin_id='972' AND source_name='4FGL J1043.2+2408' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 09:15:00 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0164>
Subject: Job 75861: <4FGL_J1043.2+2408_daily_bin972> in cluster <slac> Done

Job <4FGL_J1043.2+2408_daily_bin972> was submitted from host <rhel6-64h> by user <kocevski> in cluster <slac> at Thu Sep  2 09:01:39 2021
Job was executed on host(s) <bullet0164>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 09:03:14 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Thu Sep  2 09:03:14 2021
Terminated at Thu Sep  2 09:15:00 2021
Results reported at Thu Sep  2 09:15:00 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1043.2+2408_daily_bin972 160.805 24.146 491270401 491529601 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1043.2+2408 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   544.31 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             291.83 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   706 sec.
    Turnaround time :                            801 sec.

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

