/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 103 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 = 7418
number of fields = 22
No RA_SUN column yet. Adding RA_SUN/DEC_SUN columns.
Done.


Performing analysis on: 4FGL_J2252.0+4031_daily_bin120
RA = 343.01, Dec = 40.5232
tmin = 270432001, tmax = 270691201
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='555617', job_status='RUN', time_executed='2021-09-29 00:52:11.564612', time_epoch_executed='1632901931.56' WHERE source_name='4FGL J2252.0+4031' and cadence='daily' and bin_id='120'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/555617

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/555617/ft1_4FGL_J2252.0+4031_daily_bin120.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/555617/ft2_4FGL_J2252.0+4031_daily_bin120.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/555617/ft1_4FGL_J2252.0+4031_daily_bin120.fits outfile=/scratch/kocevski/555617/ft1_filteredMKT_4FGL_J2252.0+4031_daily_bin120.fits ra=343.01 dec=40.5232 rad=12.0 tmin=270432001.0 tmax=270691201.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 1.65
user 1.47
sys 0.16

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/555617/ft2_4FGL_J2252.0+4031_daily_bin120.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/555617/ft2_4FGL_J2252.0+4031_daily_bin120.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/555617/ft1_filteredMKT_4FGL_J2252.0+4031_daily_bin120.fits evtable="EVENTS" outfile="/scratch/kocevski/555617/ft1_filtered_4FGL_J2252.0+4031_daily_bin120.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.49
user 0.32
sys 0.16

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/555617/ft1_filtered_4FGL_J2252.0+4031_daily_bin120.fits" evtable="EVENTS" scfile=/scratch/kocevski/555617/ft2_4FGL_J2252.0+4031_daily_bin120.fits sctable="SC_DATA" outfile=/scratch/kocevski/555617/ltcube_270432001_270691201_4FGL_J2252.0+4031_daily_bin120.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/555617/ft2_4FGL_J2252.0+4031_daily_bin120.fits
.....................!
real 12.23
user 11.88
sys 0.29

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/555617/ft1_filtered_4FGL_J2252.0+4031_daily_bin120.fits evtable="EVENTS" scfile=/scratch/kocevski/555617/ft2_4FGL_J2252.0+4031_daily_bin120.fits sctable="SC_DATA" expcube=/scratch/kocevski/555617/ltcube_270432001_270691201_4FGL_J2252.0+4031_daily_bin120.fits outfile=/scratch/kocevski/555617/expmap_270432001_270691201_4FGL_J2252.0+4031_daily_bin120.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/555617/ltcube_270432001_270691201_4FGL_J2252.0+4031_daily_bin120.fits
.....................!
real 189.45
user 184.92
sys 4.16

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 FHES J2304.0+5406 in ROI with RadialGaussian spatial model.
Extended source CTB 109 in ROI with RadialDisk spatial model.
Added 173 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 J2252.0+4031 @ 343.01 40.5232

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/555617/ft1_filtered_4FGL_J2252.0+4031_daily_bin120.fits scfile=/scratch/kocevski/555617/ft2_4FGL_J2252.0+4031_daily_bin120.fits outfile=/scratch/kocevski/555617/cmap_270432001_270691201_4FGL_J2252.0+4031_daily_bin120.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=343.01 yref=40.5232 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.53
user 0.37
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/555617/ft1_filtered_4FGL_J2252.0+4031_daily_bin120.fits scfile=/scratch/kocevski/555617/ft2_4FGL_J2252.0+4031_daily_bin120.fits outfile=/scratch/kocevski/555617/cmap_HighResolution_270432001_270691201_4FGL_J2252.0+4031_daily_bin120.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=343.01 yref=40.5232 axisrot=0.0 rafield="RA" decfield="DEC" proj="AIT" hpx_ordering_scheme="RING" hpx_order=3 hpx_ebin=yes hpx_region="" evtable="EVENTS" sctable="SC_DATA" efield="ENERGY" tfield="TIME" chatter=2 clobber=yes debug=no gui=no mode="ql"

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

This is gtbin version HEAD
real 0.54
user 0.37
sys 0.16

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/555617/ft1_filtered_4FGL_J2252.0+4031_daily_bin120.fits evtable="EVENTS" scfile=/scratch/kocevski/555617/ft2_4FGL_J2252.0+4031_daily_bin120.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/555617/Model_4FGL_J2252.0+4031_daily_bin120.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 CTB 109
adding source EG_v02
adding source FHES J2304.0+5406
adding source GAL_V02
Working on...
/scratch/kocevski/555617/ft1_filtered_4FGL_J2252.0+4031_daily_bin120.fits.....................!
real 118.35
user 116.78
sys 1.23

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/555617/ft1_filtered_4FGL_J2252.0+4031_daily_bin120.fits', '/scratch/kocevski/555617/ft2_4FGL_J2252.0+4031_daily_bin120.fits', expMap='/scratch/kocevski/555617/expmap_270432001_270691201_4FGL_J2252.0+4031_daily_bin120.fits', expCube='/scratch/kocevski/555617/ltcube_270432001_270691201_4FGL_J2252.0+4031_daily_bin120.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/555617/Model_4FGL_J2252.0+4031_daily_bin120.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J2252.0+4031'

4FGL J2252.0+4031
   Spectrum: PowerLaw
404    Prefactor:  2.093e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-13)
405        Index:  2.052e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
406        Scale:  2.181e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/555617/ft1_filtered_4FGL_J2252.0+4031_daily_bin120.fits
Spacecraft file(s): /scratch/kocevski/555617/ft2_4FGL_J2252.0+4031_daily_bin120.fits
Exposure map: /scratch/kocevski/555617/expmap_270432001_270691201_4FGL_J2252.0+4031_daily_bin120.fits
Exposure cube: /scratch/kocevski/555617/ltcube_270432001_270691201_4FGL_J2252.0+4031_daily_bin120.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/555617/Model_4FGL_J2252.0+4031_daily_bin120.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) = 10240.4387111

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    1.6927       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    31.757       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10049E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     7 'norm      '    3.3827       1.0000         .10000E-03   10000.    
     8 'Prefactor '    6.1790       1.0000         .10000E-03   10000.    
     9 'Prefactor '    14.319       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10026E-03   1.0000         .10000E-03   10000.    
    11 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .10255E-03   1.0000         .10000E-03   10000.    
    14 'norm      '    4.8468       1.0000         .10000E-03   10000.    
    15 'Prefactor '    11.810       1.0000         .10000E-03   10000.    
    16 'norm      '    2.4925       1.0000         .10000E-03   10000.    
    17 'Prefactor '    10.374       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10014E-03   1.0000         .10000E-03   10000.    
    19 'Normalizat'    .91091       1.0000         .10000E-01   10.000    
    20 'Prefactor '    1.0898       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5890E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   10240.42     FROM MIGRAD    STATUS=CONVERGED    402 CALLS     2006 TOTAL
                     EDM=   .26E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.5%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          1.6930        .90376        .18647E-07   -.76325E-04
   2  Prefactor     .10000E-03    7.7382        .67754E-07** at limit **
   3  Prefactor     .10000E-03    11.664        .14300E-06** at limit **
   4  Prefactor     31.707        75.987       -.85352E-05   -.12834E-03
   5  Prefactor     .10000E-03    4.0007       -.57402E-08** at limit **
   6  Prefactor     .10000E-03    11.520       -.25563E-06** at limit **
   7  norm          3.3828        3.5723        .12856E-06   -.33102E-04
   8  Prefactor     6.1742        21.342       -.52330E-06   -.37477E-04
   9  Prefactor     14.318        10.501        .62492E-07    .65715E-05
  10  Prefactor     .10000E-03    35.787        .28232E-05** at limit **
  11  norm          .10000E-03    .32728        .59066E-08** at limit **
  12  Prefactor     .10000E-03    5.7499        .64638E-07** at limit **
  13  norm          .10000E-03    1.7460       -.57662E-07** at limit **
  14  norm          4.8467        4.7648       -.24411E-05    .56976E-03
  15  Prefactor     11.805        16.519       -.20749E-06   -.27681E-04
  16  norm          2.4923        2.0024        .21212E-07    .11879E-04
  17  Prefactor     10.374        11.172       -.55935E-06    .50622E-04
  18  Prefactor     .10000E-03    38.957       -.28814E-05** at limit **
  19  Normalizat    .91077        .23748        .74877E-07    .58949E-06
  20  Prefactor     1.0899        .78065E-01    .17477E-06   -.53792E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 1.69298
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 31.707
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 3.38282
  Prefactor  = 6.17421
  Prefactor  = 14.318
  Prefactor  = 0.000100001
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 4.84674
  Prefactor  = 11.8055
  norm       = 2.49231
  Prefactor  = 10.3742
  Prefactor  = 0.000100002
  Normalizat = 0.910774
  Prefactor  = 1.0899
 **********
 **   18 **HESSE 
 **********

 FCN=   10240.42     FROM HESSE     STATUS=OK           291 CALLS     2297 TOTAL
                     EDM=   .58E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          1.6930        .89808        .67081E-04   -1.5448    
   2  Prefactor     .10000E-03    7.7420        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .10000E-03    11.719        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     31.707        79.454        .71103E-04   -1.4581    
   5  Prefactor     .10000E-03    4.0212        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    11.556        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  norm          3.3828        3.5531        .18471E-03   -1.5340    
   8  Prefactor     6.1742        21.323        .16150E-03   -1.5211    
   9  Prefactor     14.318        10.462        .10585E-03   -1.4951    
  10  Prefactor     .10000E-03    36.585        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  norm          .10000E-03    .33169        .56504E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    5.7858        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .10000E-03    1.7495        .13042E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          4.8467        4.8688        .91361E-03   -1.5268    
  15  Prefactor     11.805        16.542        .11657E-03   -1.5021    
  16  norm          2.4923        2.0045        .12481E-03   -1.5392    
  17  Prefactor     10.374        11.178        .62200E-03   -1.5064    
  18  Prefactor     .10000E-03    39.528        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Normalizat    .91077        .26094        .48397E-03   -.96083    
  20  Prefactor     1.0899        .86590E-01    .14812E-03   -.89790    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 5.83984e-10
Minuit parameter uncertainties:
  1  0.898086
  2  3.33056e-06
  3  3.81561e-06
  4  79.7208
  5  2.04769e-07
  6  2.89024e-05
  7  3.55327
  8  21.349
  9  10.4634
  10  0.000447878
  11  4.2979e-08
  12  5.07613e-07
  13  8.50591e-08
  14  4.8692
  15  16.5486
  16  2.00457
  17  11.1802
  18  0.000563534
  19  0.2613
  20  0.0866011
Done.

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

Extracting fit parameters...

4FGL J2252.0+4031
   Spectrum: PowerLaw
404    Prefactor:  1.432e+01  1.046e+01  1.000e-04  1.000e+04 ( 1.000e-13)
405        Index:  2.052e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
406        Scale:  2.181e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
586    Prefactor:  1.090e+00  8.660e-02  0.000e+00  1.000e+01 ( 1.000e+00)
587        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
588        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
581   Normalization:  9.108e-01  2.613e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 2.65
Ra Dec: 343.010 40.523
Photon Index (Fixed Index): 2.05 +/- 0.00
Photon Flux (Fixed Index): 7.60e-08 +/- 5.55e-08
Energy Flux (Fixed Index): 4.64e-05 +/- 3.39e-05

TS (Fixed Index): 2.65
Ra Dec: 343.010 40.523
Photon Flux Upper Limit: 1.80e-07 ph cm-2 s-1
Energy Flux Upper Limit: 1.35e-02 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/555617/likelihoodResults_270432001_270691201_4FGL_J2252.0+4031_daily_bin120.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) = 10239.0035347
delta logL = 1.41578593835

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 10238.9823433
delta logL = 1.43697733563

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    3.5245       1.0000         .10000E-03   10000.    
     2 'Index     '    2.9459       1.0000          .0000       10.000    
     3 'Normalizat'    .81438       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.1064       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5890E+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=   10238.98     FROM MIGRAD    STATUS=CONVERGED     85 CALLS      287 TOTAL
                     EDM=   .99E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     3.5248        38.905        .87026E-04    .22446E-02
   2  Index         2.9459        2.5345        .33757E-02    .51565E-03
   3  Normalizat    .81441        .29524        .50825E-03    .17447E-03
   4  Prefactor     1.1064        .95534E-01    .14702E-03    .61644E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 3.52479
  Index      = 2.94588
  Normalizat = 0.814406
  Prefactor  = 1.10637
 **********
 **   18 **HESSE 
 **********

 FCN=   10238.98     FROM HESSE     STATUS=OK            25 CALLS      312 TOTAL
                     EDM=   .42E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     3.5248        5.6642        .34811E-05   -1.5332    
   2  Index         2.9459        .64678        .13503E-03   -.42336    
   3  Normalizat    .81441        .26327        .20330E-04   -.99537    
   4  Prefactor     1.1064        .86153E-01    .29405E-04   -.89263    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.18046e-10
Minuit parameter uncertainties:
  1  5.66508
  2  0.648965
  3  0.263685
  4  0.0861636
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/555617': 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) = 10238.9823432
delta logL = 1.4369774297

Extracting fit parameters...

4FGL J2252.0+4031
   Spectrum: PowerLaw
404    Prefactor:  3.525e+00  5.665e+00  1.000e-04  1.000e+04 ( 1.000e-13)
405        Index:  2.946e+00  6.490e-01  0.000e+00  1.000e+01 (-1.000e+00)
406        Scale:  2.181e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
586    Prefactor:  1.106e+00  8.616e-02  0.000e+00  1.000e+01 ( 1.000e+00)
587        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
588        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
581   Normalization:  8.144e-01  2.637e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 5.74
Ra Dec: 343.010 40.523
Photon Index (Free Index): 2.95 +/- 0.65
Photon Flux (Free Index): 1.59e-07 +/- 8.11e-08
Energy Flux (Free Index): 3.27e-05 +/- 1.75e-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/555617/cmap_HighResolution_270432001_270691201_4FGL_J2252.0+4031_daily_bin120.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.35e-02', comment='SUCCESS', photon_flux='7.60e-08', energy_flux2='3.27e-05', photon_flux_error='5.55e-08', dlogl='1.44e+00', energy_flux='4.64e-05', photon_flux2='1.59e-07', job_status='DONE', time_completed='2021-09-29 01:06:06.225839', photon_index_error2='0.65', photon_index2='2.95', ts='2.65', fit_tolerance='1e-08', GAL='1.09', photon_index_error='0.00', photon_flux_upper_limit='1.80e-07', energy_flux_error2='1.75e-05', EG='0.91', time_epoch_completed='1632902766.23', return_code='0', job_id='555617', GAL2='1.11', EG2='0.81', return_code2='0', energy_flux_error='3.39e-05', photon_flux_error2='8.11e-08', ts2='5.74', photon_index='2.05' WHERE bin_id='120' AND source_name='4FGL J2252.0+4031' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Wed Sep 29 01:06:06 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0278>
Subject: Job 555617: <4FGL_J2252.0+4031_daily_bin120> in cluster <slac> Done

Job <4FGL_J2252.0+4031_daily_bin120> was submitted from host <rhel6-64j> by user <kocevski> in cluster <slac> at Wed Sep 29 00:50:18 2021
Job was executed on host(s) <bullet0278>, in queue <medium>, as user <kocevski> in cluster <slac> at Wed Sep 29 00:50:20 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Wed Sep 29 00:50:20 2021
Terminated at Wed Sep 29 01:06:06 2021
Results reported at Wed Sep 29 01:06:06 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2252.0+4031_daily_bin120 343.01 40.5232 270432001 270691201 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J2252.0+4031 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   833.14 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             320.76 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   946 sec.
    Turnaround time :                            948 sec.

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

