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


Performing analysis on: 4FGL_J0502.5+1340_daily_bin1495
RA = 75.6341, Dec = 13.6685
tmin = 626832001, tmax = 627091201
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='929133', job_status='RUN', time_executed='2021-08-21 18:24:23.108192', time_epoch_executed='1629595463.11' WHERE source_name='4FGL J0502.5+1340' and cadence='daily' and bin_id='1495'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/929133

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/929133/ft1_4FGL_J0502.5+1340_daily_bin1495.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/929133/ft2_4FGL_J0502.5+1340_daily_bin1495.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/929133/ft1_4FGL_J0502.5+1340_daily_bin1495.fits outfile=/scratch/kocevski/929133/ft1_filteredMKT_4FGL_J0502.5+1340_daily_bin1495.fits ra=75.6341 dec=13.6685 rad=12.0 tmin=626832001.0 tmax=627091201.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 8.36
user 2.77
sys 5.51

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/929133/ft2_4FGL_J0502.5+1340_daily_bin1495.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/929133/ft2_4FGL_J0502.5+1340_daily_bin1495.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/929133/ft1_filteredMKT_4FGL_J0502.5+1340_daily_bin1495.fits evtable="EVENTS" outfile="/scratch/kocevski/929133/ft1_filtered_4FGL_J0502.5+1340_daily_bin1495.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 5.85
user 0.34
sys 5.46

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/929133/ft1_filtered_4FGL_J0502.5+1340_daily_bin1495.fits" evtable="EVENTS" scfile=/scratch/kocevski/929133/ft2_4FGL_J0502.5+1340_daily_bin1495.fits sctable="SC_DATA" outfile=/scratch/kocevski/929133/ltcube_626832001_627091201_4FGL_J0502.5+1340_daily_bin1495.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/929133/ft2_4FGL_J0502.5+1340_daily_bin1495.fits
.....................!
real 18.55
user 12.07
sys 6.43

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/929133/ft1_filtered_4FGL_J0502.5+1340_daily_bin1495.fits evtable="EVENTS" scfile=/scratch/kocevski/929133/ft2_4FGL_J0502.5+1340_daily_bin1495.fits sctable="SC_DATA" expcube=/scratch/kocevski/929133/ltcube_626832001_627091201_4FGL_J0502.5+1340_daily_bin1495.fits outfile=/scratch/kocevski/929133/expmap_626832001_627091201_4FGL_J0502.5+1340_daily_bin1495.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/929133/ltcube_626832001_627091201_4FGL_J0502.5+1340_daily_bin1495.fits
.....................!
real 196.55
user 184.97
sys 11.11

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
Extended source S 147 in ROI, make sure /nfs/farm/g/glast/g/LCRepository/Likelihood/ExtendedSources/Extended_archive_v18/Templates/S147.fits is the correct path to the extended template.
Extended source IC 443 in ROI with RadialGaussian spatial model.
Added 161 point sources and 2 extended sources
If using unbinned likelihood you will need to rerun gtdiffrsp for the extended sources or rerun the makeModel function with optional argument psForce=True

Setting source of interest to:
4FGL J0502.5+1340 @ 75.6341 13.6685

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/929133/ft1_filtered_4FGL_J0502.5+1340_daily_bin1495.fits scfile=/scratch/kocevski/929133/ft2_4FGL_J0502.5+1340_daily_bin1495.fits outfile=/scratch/kocevski/929133/cmap_626832001_627091201_4FGL_J0502.5+1340_daily_bin1495.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=75.6341 yref=13.6685 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 5.94
user 0.39
sys 5.49

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/929133/ft1_filtered_4FGL_J0502.5+1340_daily_bin1495.fits scfile=/scratch/kocevski/929133/ft2_4FGL_J0502.5+1340_daily_bin1495.fits outfile=/scratch/kocevski/929133/cmap_HighResolution_626832001_627091201_4FGL_J0502.5+1340_daily_bin1495.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=75.6341 yref=13.6685 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 5.80
user 0.40
sys 5.33

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/929133/ft1_filtered_4FGL_J0502.5+1340_daily_bin1495.fits evtable="EVENTS" scfile=/scratch/kocevski/929133/ft2_4FGL_J0502.5+1340_daily_bin1495.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/929133/Model_4FGL_J0502.5+1340_daily_bin1495.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
adding source IC 443
adding source S 147
Working on...
/scratch/kocevski/929133/ft1_filtered_4FGL_J0502.5+1340_daily_bin1495.fits.....................!
real 94.14
user 85.19
sys 8.13

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/929133/ft1_filtered_4FGL_J0502.5+1340_daily_bin1495.fits', '/scratch/kocevski/929133/ft2_4FGL_J0502.5+1340_daily_bin1495.fits', expMap='/scratch/kocevski/929133/expmap_626832001_627091201_4FGL_J0502.5+1340_daily_bin1495.fits', expCube='/scratch/kocevski/929133/ltcube_626832001_627091201_4FGL_J0502.5+1340_daily_bin1495.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/929133/Model_4FGL_J0502.5+1340_daily_bin1495.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J0502.5+1340'

4FGL J0502.5+1340
   Spectrum: PowerLaw
218    Prefactor:  1.139e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-13)
219        Index:  2.232e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
220        Scale:  1.884e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/929133/ft1_filtered_4FGL_J0502.5+1340_daily_bin1495.fits
Spacecraft file(s): /scratch/kocevski/929133/ft2_4FGL_J0502.5+1340_daily_bin1495.fits
Exposure map: /scratch/kocevski/929133/expmap_626832001_627091201_4FGL_J0502.5+1340_daily_bin1495.fits
Exposure cube: /scratch/kocevski/929133/ltcube_626832001_627091201_4FGL_J0502.5+1340_daily_bin1495.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/929133/Model_4FGL_J0502.5+1340_daily_bin1495.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) = 3286.95931031

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    52.220       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .13164E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    73.416       1.0000         .10000E-03   10000.    
     4 'norm      '    .10029E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    263.77       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .19070E-03   1.0000         .10000E-03   10000.    
     7 'norm      '    6.4546       1.0000         .10000E-03   10000.    
     8 'Prefactor '    42.532       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    21.144       1.0000         .10000E-03   10000.    
    11 'norm      '    .10002E-03   1.0000         .10000E-03   10000.    
    12 'norm      '    .10002E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    14 'norm      '    .10005E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    41.836       1.0000         .10000E-03   10000.    
    17 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10018E-03   1.0000         .10000E-03   10000.    
    19 'norm      '    .19862E-03   1.0000         .10000E-03   10000.    
    20 'norm      '    .79128       1.0000         .10000E-03   10000.    
    21 'Prefactor '    1.4341       1.0000         .10000E-03   10000.    
    22 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    1.6795       1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10007E-03   1.0000         .10000E-03   10000.    
    25 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    26 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
    27 'Prefactor '    1.1879       1.0000         .10000E-03   10000.    
    28 'Normalizat'    1.1635       1.0000         .10000E-01   10.000    
    29 'Prefactor '    .91648       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=   3286.950     FROM MIGRAD    STATUS=CONVERGED    737 CALLS     4288 TOTAL
                     EDM=   .19E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.2%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     52.310        1232.4        .34992E-05    .20238E-04
   2  Prefactor     .10003E-03    532.86        .46517E-04** at limit **
   3  Prefactor     73.401        106.97        .19946E-05   -.68705E-05
   4  norm          .10000E-03    20.577        .23887E-06** at limit **
   5  Prefactor     263.75        333.84        .57031E-05    .66462E-04
   6  Prefactor     .10005E-03    275.43       -.11799E-04** at limit **
   7  norm          6.4554        12.011        .16764E-05    .40328E-03
   8  Prefactor     42.533        85.996        .58381E-05    .18349E-03
   9  Prefactor     .10000E-03    50.053        .13870E-05** at limit **
  10  Prefactor     21.144        40.583        .13072E-05    .68386E-04
  11  norm          .10000E-03    .68399       -.94629E-07** at limit **
  12  norm          .10000E-03    5.6109       -.17457E-06** at limit **
  13  Prefactor     .10000E-03    4.2116       -.12045E-06** at limit **
  14  norm          .10000E-03    14.135       -.55628E-06** at limit **
  15  Prefactor     .10000E-03    6.1547       -.41498E-06** at limit **
  16  Prefactor     41.793        191.84        .40295E-05   -.52871E-05
  17  norm          .10000E-03    3.8195       -.60007E-07** at limit **
  18  Prefactor     .10000E-03    55.723        .25543E-06** at limit **
  19  norm          .10008E-03    8.2604       -.21983E-05** at limit **
  20  norm          .79065        2.8079        .36714E-06   -.23377E-03
  21  Prefactor     1.4341        .26781        .32861E-07   -.84699E-03
  22  norm          .10000E-03    8.5121       -.30467E-07** at limit **
  23  Prefactor     1.6794        2.3747       -.38922E-06   -.42603E-03
  24  Prefactor     .10000E-03    24.902        .10213E-05** at limit **
  25  Prefactor     .10000E-03    38.073       -.10251E-05** at limit **
  26  Prefactor     .10000E-03    16.563        .15735E-06** at limit **
  27  Prefactor     1.1850        18.328        .32804E-04    .38923E-04
  28  Normalizat    1.1635        .84885       -.40107E-05    .21337E-03
  29  Prefactor     .91651        .13801       -.21828E-05    .99272E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 52.3098
  Prefactor  = 0.00010003
  Prefactor  = 73.4012
  norm       = 0.000100001
  Prefactor  = 263.748
  Prefactor  = 0.000100052
  norm       = 6.45545
  Prefactor  = 42.533
  Prefactor  = 0.0001
  Prefactor  = 21.1443
  norm       = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 41.7928
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 0.000100078
  norm       = 0.790653
  Prefactor  = 1.43406
  norm       = 0.0001
  Prefactor  = 1.67935
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 1.18499
  Normalizat = 1.16353
  Prefactor  = 0.916512
 **********
 **   18 **HESSE 
 **********

 FCN=   3286.950     FROM HESSE     STATUS=OK           537 CALLS     4825 TOTAL
                     EDM=   .48E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     52.310        1227.0        .55500E-04   -1.4260    
   2  Prefactor     .10003E-03    532.75        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     73.401        106.92        .46857E-04   -1.3992    
   4  norm          .10000E-03    20.768        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     263.75        333.73        .12480E-03   -1.2445    
   6  Prefactor     .10005E-03    280.69        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  norm          6.4554        11.970        .15797E-03   -1.5200    
   8  Prefactor     42.533        86.127        .61469E-04   -1.4403    
   9  Prefactor     .10000E-03    50.051        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     21.144        40.446        .87107E-04   -1.4788    
  11  norm          .10000E-03    .68962        .46255E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm          .10000E-03    5.6300        .13261E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .10000E-03    4.2182        .11489E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          .10000E-03    14.281        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .10000E-03    6.1630        .13891E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     41.793        191.63        .61976E-04   -1.4414    
  17  norm          .10000E-03    3.8361        .10940E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10000E-03    55.819        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  norm          .10008E-03    37.598        .31282E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  norm          .79065        2.7605        .16084E-03   -1.5530    
  21  Prefactor     1.4341        .26620        .97815E-05   -1.5468    
  22  norm          .10000E-03    8.6986        .32398E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     1.6794        2.3333        .78565E-04   -1.5449    
  24  Prefactor     .10000E-03    24.910        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     .10000E-03    38.123        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  Prefactor     .10000E-03    16.565        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  27  Prefactor     1.1850        18.462        .20917E-02   -1.5490    
  28  Normalizat    1.1635        .87338        .82751E-03   -.87737    
  29  Prefactor     .91651        .14943        .16070E-03   -.95566    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.76527e-09
Minuit parameter uncertainties:
  1  519.167
  2  0.00811562
  3  107.2
  4  0.000262044
  5  336.186
  6  0.00766472
  7  11.9742
  8  86.3808
  9  0.000144738
  10  40.4984
  11  5.8602e-06
  12  2.47615e-05
  13  1.6976e-05
  14  0.000111715
  15  5.81247e-05
  16  179.945
  17  7.10538e-06
  18  2.39599e-05
  19  0.00342726
  20  2.76093
  21  0.266201
  22  4.53914e-06
  23  2.33344
  24  0.000104173
  25  9.4779e-05
  26  3.53366e-05
  27  9.35766
  28  0.884658
  29  0.149502
Done.

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

Extracting fit parameters...

4FGL J0502.5+1340
   Spectrum: PowerLaw
218    Prefactor:  2.114e+01  4.050e+01  1.000e-04  1.000e+04 ( 1.000e-13)
219        Index:  2.232e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
220        Scale:  1.884e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
541    Prefactor:  9.165e-01  1.495e-01  0.000e+00  1.000e+01 ( 1.000e+00)
542        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
543        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
540   Normalization:  1.164e+00  8.847e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.35
Ra Dec: 75.634 13.668
Photon Flux Upper Limit: 6.44e-07 ph cm-2 s-1
Energy Flux Upper Limit: 4.92e-02 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/929133/likelihoodResults_626832001_627091201_4FGL_J0502.5+1340_daily_bin1495.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) = 3285.70317771
delta logL = 1.24727579663

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 3285.68218082
delta logL = 1.26827268081

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .11859       1.0000         .10000E-03   10000.    
     2 'Index     '    5.0188       1.0000          .0000       10.000    
     3 'Normalizat'    .67611       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .96938       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=   3285.682     FROM MIGRAD    STATUS=CONVERGED     51 CALLS      274 TOTAL
                     EDM=   .44E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .11728        1.5444        .28565E-02   -.92978E-02
   2  Index         5.0231        2.4218        .63201E-01   -.32888E-03
   3  Normalizat    .67582        .28116        .23513       -.28577E-04
   4  Prefactor     .96955        .48560E-01    .45883E-01   -.19842E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.117283
  Index      = 5.02311
  Normalizat = 0.675819
  Prefactor  = 0.969553
 **********
 **   18 **HESSE 
 **********

 FCN=   3285.682     FROM HESSE     STATUS=NOT POSDEF    31 CALLS      305 TOTAL
                     EDM=   .82E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .11728        2.5958        .12827E-04   -1.5639    
   2  Index         5.0231        3.3002        .26057E-02    .46211E-02
   3  Normalizat    .67582        .77979        .10471E-02   -1.0486    
   4  Prefactor     .96955        .13619        .15626E-03   -.93751    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 8.23938e-10
Minuit parameter uncertainties:
  1  1.10311
  2  3.60435
  3  0.793115
  4  0.136235
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/929133': 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): 102
logL (Free Index) = 3285.68217588
delta logL = 1.26827762207

Extracting fit parameters...

4FGL J0502.5+1340
   Spectrum: PowerLaw
218    Prefactor:  1.173e-01  1.103e+00  1.000e-04  1.000e+04 ( 1.000e-13)
219        Index:  5.023e+00  3.604e+00  0.000e+00  1.000e+01 (-1.000e+00)
220        Scale:  1.884e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
541    Prefactor:  9.696e-01  1.362e-01  0.000e+00  1.000e+01 ( 1.000e+00)
542        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
543        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
540   Normalization:  6.758e-01  7.931e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 3.35
Ra Dec: 75.634 13.668
Photon Index (Free Index): 5.02 +/- 3.60
Photon Flux (Free Index): 7.45e-07 +/- 5.60e-07
Energy Flux (Free Index): 9.88e-05 +/- 6.82e-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/929133/cmap_HighResolution_626832001_627091201_4FGL_J0502.5+1340_daily_bin1495.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='4.92e-02', comment='SUCCESS', energy_flux2='9.88e-05', dlogl='1.27e+00', photon_flux2='7.45e-07', job_status='DONE', time_completed='2021-08-21 18:36:20.577555', photon_index_error2='3.60', photon_index2='5.02', ts='0.35', fit_tolerance='1e-08', GAL='0.92', photon_index_error='0.00', photon_flux_upper_limit='6.44e-07', energy_flux_error2='6.82e-05', EG='1.16', time_epoch_completed='1629596180.58', return_code='0', job_id='929133', GAL2='0.97', EG2='0.68', return_code2='102', photon_flux_error2='5.60e-07', ts2='3.35', photon_index='2.23' WHERE bin_id='1495' AND source_name='4FGL J0502.5+1340' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Aug 21 18:36:20 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0114>
Subject: Job 929133: <4FGL_J0502.5+1340_daily_bin1495> in cluster <slac> Done

Job <4FGL_J0502.5+1340_daily_bin1495> was submitted from host <rhel6-64h> by user <kocevski> in cluster <slac> at Sat Aug 21 18:20:29 2021
Job was executed on host(s) <bullet0114>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Aug 21 18:20:30 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Sat Aug 21 18:20:30 2021
Terminated at Sat Aug 21 18:36:22 2021
Results reported at Sat Aug 21 18:36:22 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J0502.5+1340_daily_bin1495 75.6341 13.6685 626832001 627091201 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J0502.5+1340 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   789.15 sec.
    Max Memory :                                 1093 MB
    Average Memory :                             260.47 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   951 sec.
    Turnaround time :                            953 sec.

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

