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


Performing analysis on: 4FGL_J2252.0+4031_daily_bin68
RA = 343.01, Dec = 40.5232
tmin = 256953601, tmax = 257212801
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='554410', job_status='RUN', time_executed='2021-09-29 00:48:41.319033', time_epoch_executed='1632901721.32' WHERE source_name='4FGL J2252.0+4031' and cadence='daily' and bin_id='68'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/554410

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/554410/ft1_4FGL_J2252.0+4031_daily_bin68.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/554410/ft2_4FGL_J2252.0+4031_daily_bin68.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/554410/ft1_4FGL_J2252.0+4031_daily_bin68.fits outfile=/scratch/kocevski/554410/ft1_filteredMKT_4FGL_J2252.0+4031_daily_bin68.fits ra=343.01 dec=40.5232 rad=12.0 tmin=256953601.0 tmax=257212801.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.44
user 1.27
sys 0.16

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/554410/ft2_4FGL_J2252.0+4031_daily_bin68.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/554410/ft1_filteredMKT_4FGL_J2252.0+4031_daily_bin68.fits evtable="EVENTS" outfile="/scratch/kocevski/554410/ft1_filtered_4FGL_J2252.0+4031_daily_bin68.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.34
sys 0.13

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/554410/ft1_filtered_4FGL_J2252.0+4031_daily_bin68.fits evtable="EVENTS" scfile=/scratch/kocevski/554410/ft2_4FGL_J2252.0+4031_daily_bin68.fits sctable="SC_DATA" expcube=/scratch/kocevski/554410/ltcube_256953601_257212801_4FGL_J2252.0+4031_daily_bin68.fits outfile=/scratch/kocevski/554410/expmap_256953601_257212801_4FGL_J2252.0+4031_daily_bin68.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/554410/ltcube_256953601_257212801_4FGL_J2252.0+4031_daily_bin68.fits
.....................!
real 191.89
user 186.52
sys 5.02

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/554410/ft1_filtered_4FGL_J2252.0+4031_daily_bin68.fits scfile=/scratch/kocevski/554410/ft2_4FGL_J2252.0+4031_daily_bin68.fits outfile=/scratch/kocevski/554410/cmap_256953601_257212801_4FGL_J2252.0+4031_daily_bin68.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.36
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/554410/ft1_filtered_4FGL_J2252.0+4031_daily_bin68.fits scfile=/scratch/kocevski/554410/ft2_4FGL_J2252.0+4031_daily_bin68.fits outfile=/scratch/kocevski/554410/cmap_HighResolution_256953601_257212801_4FGL_J2252.0+4031_daily_bin68.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.36
sys 0.17

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/554410/ft1_filtered_4FGL_J2252.0+4031_daily_bin68.fits evtable="EVENTS" scfile=/scratch/kocevski/554410/ft2_4FGL_J2252.0+4031_daily_bin68.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/554410/Model_4FGL_J2252.0+4031_daily_bin68.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/554410/ft1_filtered_4FGL_J2252.0+4031_daily_bin68.fits.....................!
real 123.48
user 121.97
sys 1.23

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/554410/ft1_filtered_4FGL_J2252.0+4031_daily_bin68.fits', '/scratch/kocevski/554410/ft2_4FGL_J2252.0+4031_daily_bin68.fits', expMap='/scratch/kocevski/554410/expmap_256953601_257212801_4FGL_J2252.0+4031_daily_bin68.fits', expCube='/scratch/kocevski/554410/ltcube_256953601_257212801_4FGL_J2252.0+4031_daily_bin68.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/554410/Model_4FGL_J2252.0+4031_daily_bin68.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/554410/ft1_filtered_4FGL_J2252.0+4031_daily_bin68.fits
Spacecraft file(s): /scratch/kocevski/554410/ft2_4FGL_J2252.0+4031_daily_bin68.fits
Exposure map: /scratch/kocevski/554410/expmap_256953601_257212801_4FGL_J2252.0+4031_daily_bin68.fits
Exposure cube: /scratch/kocevski/554410/ltcube_256953601_257212801_4FGL_J2252.0+4031_daily_bin68.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/554410/Model_4FGL_J2252.0+4031_daily_bin68.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) = 10780.208851

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    2.2027       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10009E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    4.5333       1.0000         .10000E-03   10000.    
     6 'Prefactor '    2.6920       1.0000         .10000E-03   10000.    
     7 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10011E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    21.786       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    11 'norm      '    .45876       1.0000         .10000E-03   10000.    
    12 'Prefactor '    1.2010       1.0000         .10000E-03   10000.    
    13 'norm      '    .79396       1.0000         .10000E-03   10000.    
    14 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    5.3793       1.0000         .10000E-03   10000.    
    17 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    51.149       1.0000         .10000E-03   10000.    
    19 'Normalizat'    .83724       1.0000         .10000E-01   10.000    
    20 'Prefactor '    1.0439       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=   10780.16     FROM MIGRAD    STATUS=CONVERGED    428 CALLS     1829 TOTAL
                     EDM=   .14E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  7.4%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          2.2027        .78207        .89312E-08   -.14136E-03
   2  Prefactor     .10000E-03    7.6214       -.70720E-07** at limit **
   3  Prefactor     .10000E-03    5.7625       -.10413E-06** at limit **
   4  Prefactor     .10000E-03    76.623        .37023E-05** at limit **
   5  Prefactor     4.5336        6.0073        .19718E-06   -.30769E-03
   6  Prefactor     2.6909        34.368        .14261E-06   -.10795E-04
   7  norm          .10000E-03    1.3703        .17764E-07** at limit **
   8  Prefactor     .10000E-03    17.921       -.51600E-07** at limit **
   9  Prefactor     21.786        9.4812       -.11521E-06   -.15329E-03
  10  Prefactor     .10000E-03    32.985        .11310E-06** at limit **
  11  norm          .45895        1.0312       -.73507E-07   -.56299E-03
  12  Prefactor     1.1992        4.0126        .32886E-05   -.33578E-03
  13  norm          .79391        2.1771        .45110E-07   -.84297E-04
  14  norm          .10000E-03    4.5000        .13868E-08** at limit **
  15  Prefactor     .10000E-03    3.9516       -.76855E-08** at limit **
  16  norm          5.3796        3.2113       -.36092E-07   -.27504E-04
  17  Prefactor     .10000E-03    64.211        .34614E-04** at limit **
  18  Prefactor     51.157        40.676       -.73584E-06   -.36756E-04
  19  Normalizat    .83734        .22389       -.62854E-06   -.24528E-03
  20  Prefactor     1.0438        .72754E-01   -.42444E-07   -.75793E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 2.20268
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 4.53356
  Prefactor  = 2.69086
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 21.7856
  Prefactor  = 0.0001
  norm       = 0.458954
  Prefactor  = 1.19924
  norm       = 0.793907
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 5.37963
  Prefactor  = 0.000100002
  Prefactor  = 51.1568
  Normalizat = 0.837344
  Prefactor  = 1.04385
 **********
 **   18 **HESSE 
 **********

 FCN=   10780.16     FROM HESSE     STATUS=OK           297 CALLS     2126 TOTAL
                     EDM=   .24E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          2.2027        .78304        .52782E-04   -1.5411    
   2  Prefactor     .10000E-03    7.6322        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .10000E-03    5.7792        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    76.624        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     4.5336        6.1318        .94540E-03   -1.5282    
   6  Prefactor     2.6909        34.499        .24831E-03   -1.5380    
   7  norm          .10000E-03    1.3728        .11854E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10000E-03    18.071        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     21.786        9.5135        .85815E-04   -1.4774    
  10  Prefactor     .10000E-03    33.194        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  norm          .45895        1.0020        .15050E-03   -1.5572    
  12  Prefactor     1.1992        26.606        .20708E-02   -1.5489    
  13  norm          .79391        2.0528        .24686E-02   -1.5530    
  14  norm          .10000E-03    4.5084        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .10000E-03    3.9574        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          5.3796        3.2388        .13827E-03   -1.5244    
  17  Prefactor     .10000E-03    63.453        .56447E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     51.157        40.680        .28038E-03   -1.4276    
  19  Normalizat    .83734        .24954        .48478E-03   -.98698    
  20  Prefactor     1.0438        .80770E-01    .14581E-03   -.91282    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.41844e-08
Minuit parameter uncertainties:
  1  0.783047
  2  1.84571e-05
  3  2.28889e-05
  4  6.41034e-05
  5  6.13267
  6  19.2833
  7  2.88238e-06
  8  4.47143e-06
  9  9.51413
  10  9.90735e-05
  11  1.00205
  12  11.3026
  13  2.05295
  14  1.73644e-06
  15  2.77531e-06
  16  3.23894
  17  0.000635453
  18  40.7024
  19  0.249888
  20  0.0807798
Done.

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

Extracting fit parameters...

4FGL J2252.0+4031
   Spectrum: PowerLaw
404    Prefactor:  2.179e+01  9.514e+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

GAL_V02
   Spectrum: PowerLaw
586    Prefactor:  1.044e+00  8.078e-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.373e-01  2.499e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 12.26
Ra Dec: 343.010 40.523
Photon Index (Fixed Index): 2.05 +/- 0.00
Photon Flux (Fixed Index): 1.16e-07 +/- 5.05e-08
Energy Flux (Fixed Index): 7.06e-05 +/- 3.08e-05

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) = 10778.8743764
delta logL = 1.28465402619

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 10778.8694207
delta logL = 1.28960967758

Fit tolerance = 1e-08

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

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

 FCN=   10778.87     FROM MIGRAD    STATUS=CONVERGED     58 CALLS      260 TOTAL
                     EDM=   .84E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     9.2990        40.608        .32853E-02    .29772E-03
   2  Index         2.6273        1.6265        .79171E-01    .34697E-03
   3  Normalizat    .75849        .11529        .11413        .62107E-04
   4  Prefactor     1.0568        .31909E-01    .39527E-01    .17401E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 9.299
  Index      = 2.62732
  Normalizat = 0.758485
  Prefactor  = 1.05681
 **********
 **   18 **HESSE 
 **********

 FCN=   10778.87     FROM HESSE     STATUS=OK            33 CALLS      293 TOTAL
                     EDM=   .35E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     9.2990        10.492        .10642E-03   -1.5098    
   2  Index         2.6273        .50954        .31373E-02   -.49444    
   3  Normalizat    .75849        .24630        .50614E-03   -1.0163    
   4  Prefactor     1.0568        .80649E-01    .14488E-03   -.90859    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.51641e-11
Minuit parameter uncertainties:
  1  10.4945
  2  0.510685
  3  0.246663
  4  0.0806581
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/554410': 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) = 10778.8694207
delta logL = 1.28960971671

Extracting fit parameters...

4FGL J2252.0+4031
   Spectrum: PowerLaw
404    Prefactor:  9.299e+00  1.049e+01  1.000e-04  1.000e+04 ( 1.000e-13)
405        Index:  2.627e+00  5.107e-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.057e+00  8.066e-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:  7.585e-01  2.467e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 15.04
Ra Dec: 343.010 40.523
Photon Index (Free Index): 2.63 +/- 0.51
Photon Flux (Free Index): 1.88e-07 +/- 7.58e-08
Energy Flux (Free Index): 4.81e-05 +/- 2.13e-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/554410/cmap_HighResolution_256953601_257212801_4FGL_J2252.0+4031_daily_bin68.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='1.16e-07', energy_flux2='4.81e-05', photon_flux_error='5.05e-08', dlogl='1.29e+00', energy_flux='7.06e-05', photon_flux2='1.88e-07', job_status='DONE', time_completed='2021-09-29 01:00:59.693235', photon_index_error2='0.51', photon_index2='2.63', ts='12.26', fit_tolerance='1e-08', GAL='1.04', photon_index_error='0.00', energy_flux_error2='2.13e-05', EG='0.84', time_epoch_completed='1632902459.69', return_code='0', job_id='554410', GAL2='1.06', EG2='0.76', return_code2='0', energy_flux_error='3.08e-05', photon_flux_error2='7.58e-08', ts2='15.04', photon_index='2.05' WHERE bin_id='68' AND source_name='4FGL J2252.0+4031' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Wed Sep 29 01:00:59 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0282>
Subject: Job 554410: <4FGL_J2252.0+4031_daily_bin68> in cluster <slac> Done

Job <4FGL_J2252.0+4031_daily_bin68> was submitted from host <rhel6-64f> by user <kocevski> in cluster <slac> at Wed Sep 29 00:45:30 2021
Job was executed on host(s) <bullet0282>, in queue <medium>, as user <kocevski> in cluster <slac> at Wed Sep 29 00:45:31 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:45:31 2021
Terminated at Wed Sep 29 01:01:00 2021
Results reported at Wed Sep 29 01:01:00 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2252.0+4031_daily_bin68 343.01 40.5232 256953601 257212801 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 :                                   738.04 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             291.93 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   929 sec.
    Turnaround time :                            930 sec.

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

