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


Performing analysis on: 4FGL_J0502.5+1340_daily_bin1197
RA = 75.6341, Dec = 13.6685
tmin = 549590401, tmax = 549849601
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='924990', job_status='RUN', time_executed='2021-08-21 18:08:06.996457', time_epoch_executed='1629594487.0' WHERE source_name='4FGL J0502.5+1340' and cadence='daily' and bin_id='1197'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/924990

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/924990/ft1_4FGL_J0502.5+1340_daily_bin1197.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/924990/ft2_4FGL_J0502.5+1340_daily_bin1197.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/924990/ft1_4FGL_J0502.5+1340_daily_bin1197.fits outfile=/scratch/kocevski/924990/ft1_filteredMKT_4FGL_J0502.5+1340_daily_bin1197.fits ra=75.6341 dec=13.6685 rad=12.0 tmin=549590401.0 tmax=549849601.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.33
user 2.51
sys 0.81

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/924990/ft2_4FGL_J0502.5+1340_daily_bin1197.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/924990/ft1_filteredMKT_4FGL_J0502.5+1340_daily_bin1197.fits evtable="EVENTS" outfile="/scratch/kocevski/924990/ft1_filtered_4FGL_J0502.5+1340_daily_bin1197.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.10
user 0.33
sys 0.76

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/924990/ft1_filtered_4FGL_J0502.5+1340_daily_bin1197.fits" evtable="EVENTS" scfile=/scratch/kocevski/924990/ft2_4FGL_J0502.5+1340_daily_bin1197.fits sctable="SC_DATA" outfile=/scratch/kocevski/924990/ltcube_549590401_549849601_4FGL_J0502.5+1340_daily_bin1197.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/924990/ft2_4FGL_J0502.5+1340_daily_bin1197.fits
.....................!
real 12.94
user 11.90
sys 1.01

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/924990/ft1_filtered_4FGL_J0502.5+1340_daily_bin1197.fits evtable="EVENTS" scfile=/scratch/kocevski/924990/ft2_4FGL_J0502.5+1340_daily_bin1197.fits sctable="SC_DATA" expcube=/scratch/kocevski/924990/ltcube_549590401_549849601_4FGL_J0502.5+1340_daily_bin1197.fits outfile=/scratch/kocevski/924990/expmap_549590401_549849601_4FGL_J0502.5+1340_daily_bin1197.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/924990/ltcube_549590401_549849601_4FGL_J0502.5+1340_daily_bin1197.fits
.....................!
real 192.17
user 185.60
sys 6.25

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/924990/ft1_filtered_4FGL_J0502.5+1340_daily_bin1197.fits scfile=/scratch/kocevski/924990/ft2_4FGL_J0502.5+1340_daily_bin1197.fits outfile=/scratch/kocevski/924990/cmap_549590401_549849601_4FGL_J0502.5+1340_daily_bin1197.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 1.14
user 0.37
sys 0.76

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/924990/ft1_filtered_4FGL_J0502.5+1340_daily_bin1197.fits scfile=/scratch/kocevski/924990/ft2_4FGL_J0502.5+1340_daily_bin1197.fits outfile=/scratch/kocevski/924990/cmap_HighResolution_549590401_549849601_4FGL_J0502.5+1340_daily_bin1197.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 1.14
user 0.36
sys 0.77

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/924990/ft1_filtered_4FGL_J0502.5+1340_daily_bin1197.fits evtable="EVENTS" scfile=/scratch/kocevski/924990/ft2_4FGL_J0502.5+1340_daily_bin1197.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/924990/Model_4FGL_J0502.5+1340_daily_bin1197.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/924990/ft1_filtered_4FGL_J0502.5+1340_daily_bin1197.fits......................!
real 68.55
user 66.26
sys 2.14

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/924990/ft1_filtered_4FGL_J0502.5+1340_daily_bin1197.fits', '/scratch/kocevski/924990/ft2_4FGL_J0502.5+1340_daily_bin1197.fits', expMap='/scratch/kocevski/924990/expmap_549590401_549849601_4FGL_J0502.5+1340_daily_bin1197.fits', expCube='/scratch/kocevski/924990/ltcube_549590401_549849601_4FGL_J0502.5+1340_daily_bin1197.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/924990/Model_4FGL_J0502.5+1340_daily_bin1197.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/924990/ft1_filtered_4FGL_J0502.5+1340_daily_bin1197.fits
Spacecraft file(s): /scratch/kocevski/924990/ft2_4FGL_J0502.5+1340_daily_bin1197.fits
Exposure map: /scratch/kocevski/924990/expmap_549590401_549849601_4FGL_J0502.5+1340_daily_bin1197.fits
Exposure cube: /scratch/kocevski/924990/ltcube_549590401_549849601_4FGL_J0502.5+1340_daily_bin1197.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/924990/Model_4FGL_J0502.5+1340_daily_bin1197.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) = 2429.57670138

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    365.08       1.0000         .10000E-03   10000.    
     2 'Prefactor '   10000.0       1.0000         .10000E-03   10000.    
     3 'Prefactor '   10000.0       1.0000         .10000E-03   10000.    
     4 'norm      '    9.4033       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .23169E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10157E-03   1.0000         .10000E-03   10000.    
     7 'norm      '    .10013E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .53853E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    106.45       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    11 'norm      '    1.7737       1.0000         .10000E-03   10000.    
    12 'norm      '    .10107E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    19.813       1.0000         .10000E-03   10000.    
    14 'norm      '    .10240E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10231E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10022E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    9.6902       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10044E-03   1.0000         .10000E-03   10000.    
    19 'norm      '    2.4318       1.0000         .10000E-03   10000.    
    20 'norm      '    .10135E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    1.3859       1.0000         .10000E-03   10000.    
    22 'norm      '    .10122E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10032E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10354E-03   1.0000         .10000E-03   10000.    
    25 'Prefactor '    4.2060       1.0000         .10000E-03   10000.    
    26 'Prefactor '    .42141E-03   1.0000         .10000E-03   10000.    
    27 'Prefactor '    8.5790       1.0000         .10000E-03   10000.    
    28 'Normalizat'    .82150       1.0000         .10000E-01   10.000    
    29 'Prefactor '    1.0243       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=   2428.323     FROM MIGRAD    STATUS=CONVERGED    717 CALLS     4352 TOTAL
                     EDM=   .19E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .5%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     365.11        583.67       -.19906E-05    .33593E-05
   2  Prefactor    10000.0        9075.1       -.94444E-05** at limit **
   3  Prefactor    10000.0        7646.9       -.33381E-05** at limit **
   4  norm          9.3931        24.195       -.40060E-06    .30784E-04
   5  Prefactor     .10000E-03    234.30        .69530E-06** at limit **
   6  Prefactor     .10000E-03    39.504       -.52252E-06** at limit **
   7  norm          .10000E-03    16.859       -.90632E-07** at limit **
   8  Prefactor     .10000E-03    341.70       -.24374E-05** at limit **
   9  Prefactor     106.06        359.74       -.14623E-04    .21158E-04
  10  Prefactor     .10000E-03    55.829        .31355E-06** at limit **
  11  norm          1.7767        3.7075        .70591E-06    .55986E-03
  12  norm          .10000E-03    7.6961       -.58094E-07** at limit **
  13  Prefactor     19.807        20.586        .18391E-06    .19782E-03
  14  norm          .10000E-03    14.138        .45798E-07** at limit **
  15  Prefactor     .10000E-03    28.770        .48417E-06** at limit **
  16  Prefactor     .10000E-03    130.38       -.20092E-06** at limit **
  17  norm          9.6946        11.442       -.13875E-06    .19614E-04
  18  Prefactor     .10000E-03    49.548        .20223E-06** at limit **
  19  norm          2.4675        42.120        .29590E-05    .20145E-03
  20  norm          .10004E-03    5.2068       -.39571E-05** at limit **
  21  Prefactor     1.3858        .26563        .18085E-07    .13088E-02
  22  norm          .10000E-03    8.0387       -.32359E-06** at limit **
  23  Prefactor     .10000E-03    1.2253        .47921E-06** at limit **
  24  Prefactor     .10003E-03    132.13       -.84975E-05** at limit **
  25  Prefactor     3.9335        538.62        .43646E-05    .80273E-04
  26  Prefactor     .10001E-03    502.84        .60384E-05** at limit **
  27  Prefactor     8.5822        15.907       -.19560E-05    .56846E-05
  28  Normalizat    .82326        1.0882        .13748E-04    .19058E-03
  29  Prefactor     1.0240        .18837        .47227E-06    .11287E-02
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 365.108
  Prefactor  = 10000
  Prefactor  = 10000
  norm       = 9.3931
  Prefactor  = 0.000100001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.000100004
  Prefactor  = 106.065
  Prefactor  = 0.0001
  norm       = 1.77668
  norm       = 0.0001
  Prefactor  = 19.8072
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 9.69459
  Prefactor  = 0.0001
  norm       = 2.4675
  norm       = 0.000100041
  Prefactor  = 1.38582
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.000100032
  Prefactor  = 3.93346
  Prefactor  = 0.000100007
  Prefactor  = 8.58222
  Normalizat = 0.823265
  Prefactor  = 1.02401
 **********
 **   18 **HESSE 
 **********

 FCN=   2428.323     FROM HESSE     STATUS=OK           545 CALLS     4897 TOTAL
                     EDM=   .80E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     365.11        582.71        .10664E-03   -1.1863    
   2  Prefactor    10000.0        9074.5        .18170E-02    1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor    10000.0        7647.2        .20277E-02    1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  norm          9.3931        24.117        .13069E-03   -1.5095    
   5  Prefactor     .10000E-03    234.33        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    39.527        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  norm          .10000E-03    16.861        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10000E-03    342.59        .21120E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     106.06        378.69        .19489E-03   -1.3645    
  10  Prefactor     .10000E-03    55.858        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  norm          1.7767        3.8620        .79900E-04   -1.5441    
  12  norm          .10000E-03    7.7100        .13337E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     19.807        20.656        .89983E-04   -1.4818    
  14  norm          .10000E-03    14.139        .18100E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .10000E-03    28.875        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     .10000E-03    130.39        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          9.6946        11.473        .12873E-03   -1.5085    
  18  Prefactor     .10000E-03    49.561        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  norm          2.4675        43.072        .13121E-02   -1.5394    
  20  norm          .10004E-03    8.1983        .13987E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     1.3858        .25824        .10134E-04   -1.5473    
  22  norm          .10000E-03    8.1071        .13591E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .10000E-03    1.5382        .10048E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     .10003E-03    137.07        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     3.9335        571.23        .19650E-02   -1.5311    
  26  Prefactor     .10001E-03    508.95        .21240E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  27  Prefactor     8.5822        16.196        .13686E-03   -1.5122    
  28  Normalizat    .82326        1.1017        .99662E-03   -.99211    
  29  Prefactor     1.0240        .19580        .16819E-03   -.91933    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 7.99452e-09
Minuit parameter uncertainties:
  1  592.515
  2  0.193772
  3  0.0282044
  4  24.1422
  5  0.00104977
  6  8.73329e-05
  7  1.10878e-05
  8  0.00222397
  9  387.893
  10  0.00015477
  11  3.86257
  12  7.85529e-06
  13  20.6634
  14  4.58819e-06
  15  3.74548e-05
  16  0.000493929
  17  11.4755
  18  7.07148e-05
  19  20.6355
  20  0.00116131
  21  0.258238
  22  5.69198e-05
  23  1.40768e-06
  24  0.00418837
  25  95.7479
  26  0.0036865
  27  16.204
  28  1.13396
  29  0.195933
Done.

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

Extracting fit parameters...

4FGL J0502.5+1340
   Spectrum: PowerLaw
218    Prefactor:  1.000e-04  1.548e-04  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:  1.024e+00  1.959e-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:  8.233e-01  1.134e+00  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 75.634 13.668
Photon Flux Upper Limit: 1.27e-06 ph cm-2 s-1
Energy Flux Upper Limit: 9.69e-02 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/924990/likelihoodResults_549590401_549849601_4FGL_J0502.5+1340_daily_bin1197.txt

Performing a free index iterative likelihood fit...

Freezing all point sources, except source of interest...

Done.

Freeing candidate source...
Done.

Fit tolerance = 1

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 2428.32307979
delta logL = -8.51994986988e-05

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 2428.32299514
delta logL = -5.54227426619e-07

Fit tolerance = 1e-08

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

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

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   2428.323     FROM MIGRAD    STATUS=CONVERGED     90 CALLS      273 TOTAL
                     EDM=   .11E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10230E-03    230.37        .18142E-02** at limit **
   2  Index         2.3748        6.0085        .50000        .74090E-05
   3  Normalizat    .82325        .56685E-01    .99606E-03   -.57125E-05
   4  Prefactor     1.0240        .10731E-01    .16819E-03   -.22948E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000102298
  Index      = 2.37477
  Normalizat = 0.823252
  Prefactor  = 1.02401
 **********
 **   18 **HESSE 
 **********

 FCN=   2428.323     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      302 TOTAL
                     EDM=   .49E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10230E-03    961.23        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.3748        8.4032        .50000       -.55277    
   3  Normalizat    .82325        .11934        .39842E-04   -.99212    
   4  Prefactor     1.0240        .22597E-01    .67277E-05   -.91934    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 4.94058e-09
Minuit parameter uncertainties:
  1  0.0955643
  2  630.188
  3  0.119376
  4  0.0225974
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/924990': 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) = 2428.32299482
delta logL = -2.26262727665e-07

Extracting fit parameters...

4FGL J0502.5+1340
   Spectrum: PowerLaw
218    Prefactor:  1.023e-04  9.556e-02  1.000e-04  1.000e+04 ( 1.000e-13)
219        Index:  2.375e+00  6.302e+02  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:  1.024e+00  2.260e-02  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:  8.233e-01  1.194e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 75.634 13.668

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/924990/cmap_HighResolution_549590401_549849601_4FGL_J0502.5+1340_daily_bin1197.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='9.69e-02', job_status='DONE', photon_flux_upper_limit='1.27e-06', time_completed='2021-08-21 18:17:15.140314', job_id='924990', GAL2='1.02', fit_tolerance='1e-08', EG2='0.82', EG='0.82', time_epoch_completed='1629595035.14', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.02', dlogl='-2.26e-07', ts2='-0.00', photon_index_error='0.00', photon_index='2.23' WHERE bin_id='1197' AND source_name='4FGL J0502.5+1340' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Aug 21 18:17:15 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0242>
Subject: Job 924990: <4FGL_J0502.5+1340_daily_bin1197> in cluster <slac> Done

Job <4FGL_J0502.5+1340_daily_bin1197> was submitted from host <rhel6-64d> by user <kocevski> in cluster <slac> at Sat Aug 21 18:05:26 2021
Job was executed on host(s) <bullet0242>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Aug 21 18:05:27 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:05:27 2021
Terminated at Sat Aug 21 18:17:15 2021
Results reported at Sat Aug 21 18:17:15 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J0502.5+1340_daily_bin1197 75.6341 13.6685 549590401 549849601 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 :                                   554.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             292.36 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   708 sec.
    Turnaround time :                            709 sec.

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

