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


Performing analysis on: 4FGL_J0407.5+0741_daily_bin271
RA = 61.8921, Dec = 7.6998
tmin = 309571201, tmax = 309830401
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='267335', job_status='RUN', time_executed='2021-08-20 05:38:44.805110', time_epoch_executed='1629463124.81' WHERE source_name='4FGL J0407.5+0741' and cadence='daily' and bin_id='271'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/267335

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/267335/ft1_4FGL_J0407.5+0741_daily_bin271.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/267335/ft2_4FGL_J0407.5+0741_daily_bin271.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/267335/ft1_4FGL_J0407.5+0741_daily_bin271.fits outfile=/scratch/kocevski/267335/ft1_filteredMKT_4FGL_J0407.5+0741_daily_bin271.fits ra=61.8921 dec=7.6998 rad=12.0 tmin=309571201.0 tmax=309830401.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 6.96
user 5.98
sys 0.95

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/267335/ft2_4FGL_J0407.5+0741_daily_bin271.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/267335/ft2_4FGL_J0407.5+0741_daily_bin271.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/267335/ft1_filteredMKT_4FGL_J0407.5+0741_daily_bin271.fits evtable="EVENTS" outfile="/scratch/kocevski/267335/ft1_filtered_4FGL_J0407.5+0741_daily_bin271.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 1.18
user 0.31
sys 0.86

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/267335/ft1_filtered_4FGL_J0407.5+0741_daily_bin271.fits" evtable="EVENTS" scfile=/scratch/kocevski/267335/ft2_4FGL_J0407.5+0741_daily_bin271.fits sctable="SC_DATA" outfile=/scratch/kocevski/267335/ltcube_309571201_309830401_4FGL_J0407.5+0741_daily_bin271.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/267335/ft2_4FGL_J0407.5+0741_daily_bin271.fits
.....................!
real 12.30
user 11.13
sys 1.12

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/267335/ft1_filtered_4FGL_J0407.5+0741_daily_bin271.fits evtable="EVENTS" scfile=/scratch/kocevski/267335/ft2_4FGL_J0407.5+0741_daily_bin271.fits sctable="SC_DATA" expcube=/scratch/kocevski/267335/ltcube_309571201_309830401_4FGL_J0407.5+0741_daily_bin271.fits outfile=/scratch/kocevski/267335/expmap_309571201_309830401_4FGL_J0407.5+0741_daily_bin271.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/267335/ltcube_309571201_309830401_4FGL_J0407.5+0741_daily_bin271.fits
.....................!
real 191.24
user 184.97
sys 5.94

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

Setting source of interest to:
4FGL J0407.5+0741 @ 61.8921 7.6998

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/267335/ft1_filtered_4FGL_J0407.5+0741_daily_bin271.fits scfile=/scratch/kocevski/267335/ft2_4FGL_J0407.5+0741_daily_bin271.fits outfile=/scratch/kocevski/267335/cmap_309571201_309830401_4FGL_J0407.5+0741_daily_bin271.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=61.8921 yref=7.6998 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 1.22
user 0.35
sys 0.85

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/267335/ft1_filtered_4FGL_J0407.5+0741_daily_bin271.fits scfile=/scratch/kocevski/267335/ft2_4FGL_J0407.5+0741_daily_bin271.fits outfile=/scratch/kocevski/267335/cmap_HighResolution_309571201_309830401_4FGL_J0407.5+0741_daily_bin271.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=61.8921 yref=7.6998 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 1.24
user 0.37
sys 0.85

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/267335/ft1_filtered_4FGL_J0407.5+0741_daily_bin271.fits evtable="EVENTS" scfile=/scratch/kocevski/267335/ft2_4FGL_J0407.5+0741_daily_bin271.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/267335/Model_4FGL_J0407.5+0741_daily_bin271.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/267335/ft1_filtered_4FGL_J0407.5+0741_daily_bin271.fits.....................!
real 127.96
user 125.53
sys 2.18

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/267335/ft1_filtered_4FGL_J0407.5+0741_daily_bin271.fits', '/scratch/kocevski/267335/ft2_4FGL_J0407.5+0741_daily_bin271.fits', expMap='/scratch/kocevski/267335/expmap_309571201_309830401_4FGL_J0407.5+0741_daily_bin271.fits', expCube='/scratch/kocevski/267335/ltcube_309571201_309830401_4FGL_J0407.5+0741_daily_bin271.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/267335/Model_4FGL_J0407.5+0741_daily_bin271.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J0407.5+0741'

4FGL J0407.5+0741
   Spectrum: PowerLaw
217    Prefactor:  5.499e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-13)
218        Index:  2.311e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
219        Scale:  1.332e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/267335/ft1_filtered_4FGL_J0407.5+0741_daily_bin271.fits
Spacecraft file(s): /scratch/kocevski/267335/ft2_4FGL_J0407.5+0741_daily_bin271.fits
Exposure map: /scratch/kocevski/267335/expmap_309571201_309830401_4FGL_J0407.5+0741_daily_bin271.fits
Exposure cube: /scratch/kocevski/267335/ltcube_309571201_309830401_4FGL_J0407.5+0741_daily_bin271.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/267335/Model_4FGL_J0407.5+0741_daily_bin271.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) = 9488.61734975

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    4.3933       1.0000         .10000E-03   10000.    
     2 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    4.3670       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .11586E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    2.3779       1.0000         .10000E-03   10000.    
     6 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    .76944       1.0000         .10000E-03   10000.    
     9 'Prefactor '    4.1762       1.0000         .10000E-03   10000.    
    10 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    11 'norm      '    .28709       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    35.551       1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    1.4497       1.0000         .10000E-03   10000.    
    17 'Prefactor '    27.515       1.0000         .10000E-03   10000.    
    18 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10013E-03   1.0000         .10000E-03   10000.    
    20 'norm      '    8.5614       1.0000         .10000E-03   10000.    
    21 'Normalizat'    1.2601       1.0000         .10000E-01   10.000    
    22 'Prefactor '    .83967       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .4600E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   9488.615     FROM MIGRAD    STATUS=CONVERGED    473 CALLS     2365 TOTAL
                     EDM=   .25E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.1%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     4.3939        15.287        .55041E-06   -.22219E-04
   2  norm          .10000E-03    5.2741        .18565E-07** at limit **
   3  norm          4.3671        2.2348        .71480E-07   -.36493E-04
   4  Prefactor     .10000E-03    78.664       -.25902E-06** at limit **
   5  Prefactor     2.3659        21.657        .53382E-05    .15210E-03
   6  norm          .10000E-03    5.8648       -.12070E-06** at limit **
   7  Prefactor     .10000E-03    8.9939       -.34612E-06** at limit **
   8  norm          .77035        3.5579        .18940E-05   -.21454E-03
   9  Prefactor     4.1744        25.638        .86557E-06    .22561E-06
  10  norm          .10000E-03    9.4986        .89849E-07** at limit **
  11  norm          .28690        .91286        .70528E-06   -.46702E-03
  12  Prefactor     .10000E-03    .91457        .86803E-07** at limit **
  13  Prefactor     .10000E-03    9.4836        .70627E-08** at limit **
  14  Prefactor     35.563        40.479        .59920E-06    .84437E-04
  15  Prefactor     .10000E-03    3.7516       -.93283E-08** at limit **
  16  norm          1.4507        2.5778        .57527E-06   -.14283E-03
  17  Prefactor     27.525        45.229        .21027E-05    .92285E-04
  18  norm          .10000E-03    1.4348        .82021E-07** at limit **
  19  Prefactor     .10000E-03    7.7923        .31998E-06** at limit **
  20  norm          8.5621        2.8859        .14991E-06    .37258E-03
  21  Normalizat    1.2600        .25672       -.23907E-05   -.64086E-04
  22  Prefactor     .83965        .66868E-01    .15311E-06   -.26887E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 4.39393
  norm       = 0.0001
  norm       = 4.36705
  Prefactor  = 0.0001
  Prefactor  = 2.36586
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 0.770354
  Prefactor  = 4.1744
  norm       = 0.0001
  norm       = 0.286901
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 35.5629
  Prefactor  = 0.0001
  norm       = 1.45068
  Prefactor  = 27.5246
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 8.56206
  Normalizat = 1.26001
  Prefactor  = 0.839649
 **********
 **   18 **HESSE 
 **********

 FCN=   9488.615     FROM HESSE     STATUS=OK           338 CALLS     2703 TOTAL
                     EDM=   .53E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     4.3939        15.289        .19215E-03   -1.5289    
   2  norm          .10000E-03    5.3207        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          4.3671        2.2360        .10054E-03   -1.5290    
   4  Prefactor     .10000E-03    79.096        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     2.3659        23.186        .26567E-03   -1.5400    
   6  norm          .10000E-03    5.8665        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    9.0127        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .77035        3.4724        .35100E-03   -1.5532    
   9  Prefactor     4.1744        25.484        .19722E-03   -1.5299    
  10  norm          .10000E-03    9.5248        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  norm          .28690        .88661        .15022E-03   -1.5601    
  12  Prefactor     .10000E-03    .94318        .18085E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .10000E-03    9.4947        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     35.563        40.881        .67213E-04   -1.4515    
  15  Prefactor     .10000E-03    3.7590        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          1.4507        2.5634        .19886E-03   -1.5467    
  17  Prefactor     27.525        45.769        .76374E-04   -1.4658    
  18  norm          .10000E-03    1.4640        .11389E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .10000E-03    7.9118        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  norm          8.5621        2.8918        .92817E-04   -1.5123    
  21  Normalizat    1.2600        .28474        .43638E-03   -.84768    
  22  Prefactor     .83965        .75054E-01    .14267E-03   -.98283    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 5.33543e-10
Minuit parameter uncertainties:
  1  15.3022
  2  5.44373e-06
  3  2.23604
  4  0.000260017
  5  14.8201
  6  1.0796e-05
  7  4.06205e-05
  8  3.27116
  9  20.6409
  10  1.12101e-06
  11  0.886652
  12  7.37409e-06
  13  1.16101e-05
  14  40.9127
  15  2.04169e-06
  16  2.56362
  17  45.8276
  18  4.88678e-07
  19  1.62933e-05
  20  2.89181
  21  0.285091
  22  0.0750636
Done.

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

Extracting fit parameters...

4FGL J0407.5+0741
   Spectrum: PowerLaw
217    Prefactor:  2.366e+00  1.482e+01  1.000e-04  1.000e+04 ( 1.000e-13)
218        Index:  2.311e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
219        Scale:  1.332e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
457    Prefactor:  8.396e-01  7.506e-02  0.000e+00  1.000e+01 ( 1.000e+00)
458        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
459        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
456   Normalization:  1.260e+00  2.851e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.03
Ra Dec: 61.892 7.700
Photon Flux Upper Limit: 1.22e-07 ph cm-2 s-1
Energy Flux Upper Limit: 9.38e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/267335/likelihoodResults_309571201_309830401_4FGL_J0407.5+0741_daily_bin271.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) = 9488.20236008
delta logL = 0.412217414188

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 9487.96375155
delta logL = 0.650825939911

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   9487.964     FROM MIGRAD    STATUS=CONVERGED     48 CALLS      221 TOTAL
                     EDM=   .73E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     10.757        14.438        .30539E-02    .19270E-02
   2  Index         1.3307        .48569        .32095       -.71046E-05
   3  Normalizat    1.2643        .24060        .98301E-01    .18443E-04
   4  Prefactor     .83706        .66015E-01    .32319E-01   -.45918E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 10.7572
  Index      = 1.33068
  Normalizat = 1.26434
  Prefactor  = 0.837061
 **********
 **   18 **HESSE 
 **********

 FCN=   9487.964     FROM HESSE     STATUS=OK            31 CALLS      252 TOTAL
                     EDM=   .94E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     10.757        15.420        .12216E-03   -1.5052    
   2  Index         1.3307        .62589        .12337E-01   -.82399    
   3  Normalizat    1.2643        .26809        .43554E-03   -.84637    
   4  Prefactor     .83706        .73863E-01    .14281E-03   -.98376    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 9.37198e-09
Minuit parameter uncertainties:
  1  15.4262
  2  0.629485
  3  0.268386
  4  0.073872
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/267335': 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) = 9487.96375153
delta logL = 0.650825965116

Extracting fit parameters...

4FGL J0407.5+0741
   Spectrum: PowerLaw
217    Prefactor:  1.076e+01  1.543e+01  1.000e-04  1.000e+04 ( 1.000e-13)
218        Index:  1.331e+00  6.295e-01  0.000e+00  1.000e+01 (-1.000e+00)
219        Scale:  1.332e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
457    Prefactor:  8.371e-01  7.387e-02  0.000e+00  1.000e+01 ( 1.000e+00)
458        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
459        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
456   Normalization:  1.264e+00  2.684e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 1.33
Ra Dec: 61.892 7.700
Photon Index (Free Index): 1.33 +/- 0.63
Photon Flux (Free Index): 9.16e-09 +/- 1.43e-08
Energy Flux (Free Index): 5.08e-05 +/- 8.20e-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/267335/cmap_HighResolution_309571201_309830401_4FGL_J0407.5+0741_daily_bin271.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='9.38e-03', comment='SUCCESS', energy_flux2='5.08e-05', dlogl='6.51e-01', photon_flux2='9.16e-09', job_status='DONE', time_completed='2021-08-20 05:51:29.870653', photon_index_error2='0.63', photon_index2='1.33', ts='0.03', fit_tolerance='1e-08', GAL='0.84', photon_index_error='0.00', photon_flux_upper_limit='1.22e-07', energy_flux_error2='8.20e-05', EG='1.26', time_epoch_completed='1629463889.87', return_code='0', job_id='267335', GAL2='0.84', EG2='1.26', return_code2='0', photon_flux_error2='1.43e-08', ts2='1.33', photon_index='2.31' WHERE bin_id='271' AND source_name='4FGL J0407.5+0741' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Fri Aug 20 05:51:29 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0104>
Subject: Job 267335: <4FGL_J0407.5+0741_daily_bin271> in cluster <slac> Done

Job <4FGL_J0407.5+0741_daily_bin271> was submitted from host <rhel6-64d> by user <kocevski> in cluster <slac> at Fri Aug 20 05:36:03 2021
Job was executed on host(s) <bullet0104>, in queue <medium>, as user <kocevski> in cluster <slac> at Fri Aug 20 05:36:05 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Fri Aug 20 05:36:05 2021
Terminated at Fri Aug 20 05:51:30 2021
Results reported at Fri Aug 20 05:51:30 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J0407.5+0741_daily_bin271 61.8921 7.6998 309571201 309830401 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J0407.5+0741 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   769.52 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             286.03 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   925 sec.
    Turnaround time :                            927 sec.

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

