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


Performing analysis on: 4FGL_J1257.2+3646_daily_bin133
RA = 194.31, Dec = 36.7706
tmin = 273801601, tmax = 274060801
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='31855', job_status='RUN', time_executed='2021-09-06 11:28:49.131342', time_epoch_executed='1630952929.13' WHERE source_name='4FGL J1257.2+3646' and cadence='daily' and bin_id='133'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/31855

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/31855/ft1_4FGL_J1257.2+3646_daily_bin133.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/31855/ft2_4FGL_J1257.2+3646_daily_bin133.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/31855/ft1_4FGL_J1257.2+3646_daily_bin133.fits outfile=/scratch/kocevski/31855/ft1_filteredMKT_4FGL_J1257.2+3646_daily_bin133.fits ra=194.31 dec=36.7706 rad=12.0 tmin=273801601.0 tmax=274060801.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.60
user 3.36
sys 0.22

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/31855/ft2_4FGL_J1257.2+3646_daily_bin133.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/31855/ft2_4FGL_J1257.2+3646_daily_bin133.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/31855/ft1_filteredMKT_4FGL_J1257.2+3646_daily_bin133.fits evtable="EVENTS" outfile="/scratch/kocevski/31855/ft1_filtered_4FGL_J1257.2+3646_daily_bin133.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.33
sys 0.15

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/31855/ft1_filtered_4FGL_J1257.2+3646_daily_bin133.fits" evtable="EVENTS" scfile=/scratch/kocevski/31855/ft2_4FGL_J1257.2+3646_daily_bin133.fits sctable="SC_DATA" outfile=/scratch/kocevski/31855/ltcube_273801601_274060801_4FGL_J1257.2+3646_daily_bin133.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/31855/ft2_4FGL_J1257.2+3646_daily_bin133.fits
.....................!
real 11.92
user 11.52
sys 0.32

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/31855/ft1_filtered_4FGL_J1257.2+3646_daily_bin133.fits evtable="EVENTS" scfile=/scratch/kocevski/31855/ft2_4FGL_J1257.2+3646_daily_bin133.fits sctable="SC_DATA" expcube=/scratch/kocevski/31855/ltcube_273801601_274060801_4FGL_J1257.2+3646_daily_bin133.fits outfile=/scratch/kocevski/31855/expmap_273801601_274060801_4FGL_J1257.2+3646_daily_bin133.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/31855/ltcube_273801601_274060801_4FGL_J1257.2+3646_daily_bin133.fits
.....................!
real 190.27
user 184.99
sys 4.86

Generating the xml model:
radLim = 0.001
maxRad = 12
normsOnly = True
freeVariableSources = True
Fixing all sources to their catalog values, except variable sources
Creating file and adding sources from 4FGL
Added 188 point sources and 0 extended sources

Setting source of interest to:
4FGL J1257.2+3646 @ 194.31 36.7706

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/31855/ft1_filtered_4FGL_J1257.2+3646_daily_bin133.fits scfile=/scratch/kocevski/31855/ft2_4FGL_J1257.2+3646_daily_bin133.fits outfile=/scratch/kocevski/31855/cmap_273801601_274060801_4FGL_J1257.2+3646_daily_bin133.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=194.31 yref=36.7706 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.56
user 0.36
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/31855/ft1_filtered_4FGL_J1257.2+3646_daily_bin133.fits scfile=/scratch/kocevski/31855/ft2_4FGL_J1257.2+3646_daily_bin133.fits outfile=/scratch/kocevski/31855/cmap_HighResolution_273801601_274060801_4FGL_J1257.2+3646_daily_bin133.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=194.31 yref=36.7706 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.56
user 0.38
sys 0.16

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/31855/ft1_filtered_4FGL_J1257.2+3646_daily_bin133.fits evtable="EVENTS" scfile=/scratch/kocevski/31855/ft2_4FGL_J1257.2+3646_daily_bin133.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/31855/Model_4FGL_J1257.2+3646_daily_bin133.xml irfs="P8R3_SOURCE_V2" evclsmin=0 evclass="INDEF" evtype="INDEF" convert=yes chatter=2 clobber=yes debug=no gui=no mode="ql"

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

adding source EG_v02
adding source GAL_V02
Working on...
/scratch/kocevski/31855/ft1_filtered_4FGL_J1257.2+3646_daily_bin133.fits.....................!
real 50.17
user 47.78
sys 1.25

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/31855/ft1_filtered_4FGL_J1257.2+3646_daily_bin133.fits', '/scratch/kocevski/31855/ft2_4FGL_J1257.2+3646_daily_bin133.fits', expMap='/scratch/kocevski/31855/expmap_273801601_274060801_4FGL_J1257.2+3646_daily_bin133.fits', expCube='/scratch/kocevski/31855/ltcube_273801601_274060801_4FGL_J1257.2+3646_daily_bin133.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/31855/Model_4FGL_J1257.2+3646_daily_bin133.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1257.2+3646'

4FGL J1257.2+3646
   Spectrum: PowerLaw
300    Prefactor:  1.472e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-13)
301        Index:  2.027e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
302        Scale:  1.897e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/31855/ft1_filtered_4FGL_J1257.2+3646_daily_bin133.fits
Spacecraft file(s): /scratch/kocevski/31855/ft2_4FGL_J1257.2+3646_daily_bin133.fits
Exposure map: /scratch/kocevski/31855/expmap_273801601_274060801_4FGL_J1257.2+3646_daily_bin133.fits
Exposure cube: /scratch/kocevski/31855/ltcube_273801601_274060801_4FGL_J1257.2+3646_daily_bin133.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/31855/Model_4FGL_J1257.2+3646_daily_bin133.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) = 5991.08424817

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10053E-03   1.0000         .10000E-03   10000.    
     2 'norm      '    .58995E-01   1.0000         .10000E-03   10000.    
     3 'Prefactor '    1.1775       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .12715E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    3.1396       1.0000         .10000E-03   10000.    
     6 'Prefactor '    23.469       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10008E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    21.493       1.0000         .10000E-03   10000.    
     9 'Prefactor '    32.206       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    11 'norm      '    .10572E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    23.587       1.0000         .10000E-03   10000.    
    13 'Prefactor '    .15930E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10127E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    .13442E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    .19260       1.0000         .10000E-03   10000.    
    18 'norm      '    .10020E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    19.621       1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10060E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    48.725       1.0000         .10000E-03   10000.    
    24 'Normalizat'    1.2309       1.0000         .10000E-01   10.000    
    25 'Prefactor '    .90020       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6020E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   5991.075     FROM MIGRAD    STATUS=CONVERGED    608 CALLS     2963 TOTAL
                     EDM=   .25E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .8%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    39.237        .10202E-06** at limit **
   2  norm          .48298E-01    1.4081       -.22938E-06    .28081E-03
   3  Prefactor     1.1790        9.0762        .38745E-05    .73389E-04
   4  Prefactor     .10000E-03    1.2601        .81219E-07** at limit **
   5  Prefactor     3.1413        2.9180        .38046E-07    .49514E-04
   6  Prefactor     23.468        12.216       -.76607E-07    .91302E-05
   7  Prefactor     .10000E-03    15.041        .20928E-06** at limit **
   8  Prefactor     21.493        19.344       -.14905E-07    .10419E-04
   9  Prefactor     32.082        63.244       -.14509E-06   -.82693E-05
  10  Prefactor     .10000E-03    2.1811        .21324E-08** at limit **
  11  norm          .10000E-03    2.1674       -.18528E-05** at limit **
  12  Prefactor     23.587        34.451        .38578E-07   -.94184E-06
  13  Prefactor     .10000E-03    92.545       -.63409E-05** at limit **
  14  Prefactor     .10000E-03    20.376        .27873E-06** at limit **
  15  norm          .10000E-03    4.2455        .17923E-06** at limit **
  16  norm          .10000E-03    4.2396        .54203E-07** at limit **
  17  norm          .21154        2.3737       -.68764E-06    .71830E-03
  18  norm          .10000E-03    4.8769        .70505E-07** at limit **
  19  Prefactor     .10000E-03    2.2531        .22260E-07** at limit **
  20  Prefactor     19.605        16.086        .60115E-06    .20315E-03
  21  Prefactor     .10000E-03    77.597        .70768E-06** at limit **
  22  Prefactor     .10000E-03    4.5293        .66311E-07** at limit **
  23  Prefactor     48.704        91.658       -.26317E-06    .14638E-05
  24  Normalizat    1.2310        .18104        .92019E-06    .10250E-03
  25  Prefactor     .90010        .21947       -.16962E-05    .11785E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  norm       = 0.0482978
  Prefactor  = 1.17898
  Prefactor  = 0.0001
  Prefactor  = 3.14134
  Prefactor  = 23.4677
  Prefactor  = 0.0001
  Prefactor  = 21.4926
  Prefactor  = 32.0821
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 23.5871
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 0.0001
  norm       = 0.211539
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 19.6049
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 48.7044
  Normalizat = 1.23101
  Prefactor  = 0.900105
 **********
 **   18 **HESSE 
 **********

 FCN=   5991.075     FROM HESSE     STATUS=OK           429 CALLS     3392 TOTAL
                     EDM=   .42E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    39.468        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  norm          .48298E-01    15.833        .16555E-02   -1.5664    
   3  Prefactor     1.1790        9.1888        .42177E-03   -1.5491    
   4  Prefactor     .10000E-03    7.2035        .15844E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     3.1413        2.8991        .11673E-03   -1.5353    
   6  Prefactor     23.468        12.198        .82685E-04   -1.4739    
   7  Prefactor     .10000E-03    15.070        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     21.493        19.342        .86397E-04   -1.4780    
   9  Prefactor     32.082        63.268        .70607E-04   -1.4575    
  10  Prefactor     .10000E-03    2.1866        .11161E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  norm          .10000E-03    2.1828        .11125E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     23.587        34.459        .82477E-04   -1.4736    
  13  Prefactor     .10000E-03    94.594        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10000E-03    20.571        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          .10000E-03    11.586        .30512E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          .10000E-03    4.2423        .15565E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          .21154        13.917        .20558E-02   -1.5616    
  18  norm          .10000E-03    4.9448        .16639E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .10000E-03    2.2908        .22568E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     19.605        15.948        .90422E-04   -1.4822    
  21  Prefactor     .10000E-03    77.887        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     .10000E-03    4.5320        .16088E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     48.704        92.376        .57447E-04   -1.4311    
  24  Normalizat    1.2310        .21749        .22241E-03   -.85650    
  25  Prefactor     .90010        .26190        .31402E-03   -.96137    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.17044e-09
Minuit parameter uncertainties:
  1  8.2683e-05
  2  1.74758
  3  6.58392
  4  2.199e-05
  5  2.89919
  6  12.1992
  7  4.58508e-06
  8  19.3476
  9  63.4011
  10  7.64447e-07
  11  1.5408e-05
  12  34.488
  13  0.000120789
  14  2.78884e-05
  15  5.03072e-05
  16  1.20675e-06
  17  3.43162
  18  1.90346e-05
  19  1.65862e-07
  20  15.9518
  21  0.000193415
  22  1.35713e-06
  23  92.6495
  24  0.217651
  25  0.26227
Done.

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

Extracting fit parameters...

4FGL J1257.2+3646
   Spectrum: PowerLaw
300    Prefactor:  1.000e-04  7.644e-07  1.000e-04  1.000e+04 ( 1.000e-13)
301        Index:  2.027e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
302        Scale:  1.897e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
599    Prefactor:  9.001e-01  2.623e-01  0.000e+00  1.000e+01 ( 1.000e+00)
600        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
601        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
598   Normalization:  1.231e+00  2.177e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 194.310 36.771
Photon Flux Upper Limit: 4.14e-08 ph cm-2 s-1
Energy Flux Upper Limit: 3.11e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/31855/likelihoodResults_273801601_274060801_4FGL_J1257.2+3646_daily_bin133.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) = 5991.07736949
delta logL = -0.00214419355234

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 5991.07522531
delta logL = -1.47001628648e-08

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10142E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.0089       1.0000          .0000       10.000    
     3 'Normalizat'    1.2310       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .90013       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6020E+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.
 MIGRAD TERMINATED WITHOUT CONVERGENCE.

 FCN=   5991.075     FROM MIGRAD    STATUS=FAILED        86 CALLS      241 TOTAL
                     EDM=   .23E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10093E-03    30.368        .11316E-02** at limit **
   2  Index         1.9623        8.8475        .50000        .57694E-04
   3  Normalizat    1.2310        .15878E-01    .22241E-03    .63495E-04
   4  Prefactor     .90010        .19583E-01    .31402E-03    .59339E-04
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   5991.075     FROM SIMPLEX   STATUS=PROGRESS     128 CALLS      369 TOTAL
                     EDM=   .56E-05    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10086E-03    30.368        .19621E-03** at limit **
   2  Index         1.9602        8.8475        .74991E-03    .57694E-04
   3  Normalizat    1.2310        .15878E-01    .32404E-05    .63495E-04
   4  Prefactor     .90010        .19583E-01    .40504E-05    .59339E-04
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   5991.075     FROM MIGRAD    STATUS=CONVERGED     51 CALLS      420 TOTAL
                     EDM=   .14E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    30.321        .22633E-02** at limit **
   2  Index         1.6373        5.3285        .50000        .75943E-07
   3  Normalizat    1.2310        .14999E-01    .44483E-04   -.29800E-04
   4  Prefactor     .90010        .18500E-01    .12561E-04   -.33489E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 1.63731
  Normalizat = 1.23101
  Prefactor  = 0.900103
 **********
 **   18 **HESSE 
 **********

 FCN=   5991.075     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      449 TOTAL
                     EDM=   .67E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    139.69        .45266E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         1.6373        8.9902        .50000       -.73763    
   3  Normalizat    1.2310        .33971E-01    .88965E-05   -.85650    
   4  Prefactor     .90010        .41887E-01    .25121E-05   -.96137    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 6.65021e-10
Minuit parameter uncertainties:
  1  0.000184348
  2  501.497
  3  0.0339712
  4  0.0418881
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/31855': 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) = 5991.07522199
delta logL = 3.30000966642e-06

Extracting fit parameters...

4FGL J1257.2+3646
   Spectrum: PowerLaw
300    Prefactor:  1.000e-04  1.843e-04  1.000e-04  1.000e+04 ( 1.000e-13)
301        Index:  1.637e+00  5.015e+02  0.000e+00  1.000e+01 (-1.000e+00)
302        Scale:  1.897e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
599    Prefactor:  9.001e-01  4.189e-02  0.000e+00  1.000e+01 ( 1.000e+00)
600        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
601        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
598   Normalization:  1.231e+00  3.397e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 194.310 36.771

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/31855/cmap_HighResolution_273801601_274060801_4FGL_J1257.2+3646_daily_bin133.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='3.11e-03', job_status='DONE', photon_flux_upper_limit='4.14e-08', time_completed='2021-09-06 11:40:43.651657', job_id='31855', GAL2='0.90', fit_tolerance='1e-08', EG2='1.23', EG='1.23', time_epoch_completed='1630953643.65', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.90', dlogl='3.30e-06', ts2='-0.00', photon_index_error='0.00', photon_index='2.03' WHERE bin_id='133' AND source_name='4FGL J1257.2+3646' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 11:40:43 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0204>
Subject: Job 31855: <4FGL_J1257.2+3646_daily_bin133> in cluster <slac> Done

Job <4FGL_J1257.2+3646_daily_bin133> was submitted from host <rhel6-64p> by user <kocevski> in cluster <slac> at Mon Sep  6 11:25:43 2021
Job was executed on host(s) <bullet0204>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep  6 11:25:44 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Mon Sep  6 11:25:44 2021
Terminated at Mon Sep  6 11:40:44 2021
Results reported at Mon Sep  6 11:40:44 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1257.2+3646_daily_bin133 194.31 36.7706 273801601 274060801 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1257.2+3646 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   712.00 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             311.82 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   899 sec.
    Turnaround time :                            901 sec.

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

