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


Performing analysis on: 4FGL_J1257.2+3646_daily_bin383
RA = 194.31, Dec = 36.7706
tmin = 338601601, tmax = 338860801
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='32993', job_status='RUN', time_executed='2021-09-06 11:34:39.879652', time_epoch_executed='1630953279.88' WHERE source_name='4FGL J1257.2+3646' and cadence='daily' and bin_id='383'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/32993

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

Retrieving the FT1 file...

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

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

Retrieving 49 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/32993/ft1_4FGL_J1257.2+3646_daily_bin383.fits


Retrieving the FT1 file...

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

Retrieving 49 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/32993/ft2_4FGL_J1257.2+3646_daily_bin383.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/32993/ft1_4FGL_J1257.2+3646_daily_bin383.fits outfile=/scratch/kocevski/32993/ft1_filteredMKT_4FGL_J1257.2+3646_daily_bin383.fits ra=194.31 dec=36.7706 rad=12.0 tmin=338601601.0 tmax=338860801.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 5.15
user 4.90
sys 0.23

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/32993/ft2_4FGL_J1257.2+3646_daily_bin383.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/32993/ft1_filteredMKT_4FGL_J1257.2+3646_daily_bin383.fits evtable="EVENTS" outfile="/scratch/kocevski/32993/ft1_filtered_4FGL_J1257.2+3646_daily_bin383.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/32993/ft1_filtered_4FGL_J1257.2+3646_daily_bin383.fits" evtable="EVENTS" scfile=/scratch/kocevski/32993/ft2_4FGL_J1257.2+3646_daily_bin383.fits sctable="SC_DATA" outfile=/scratch/kocevski/32993/ltcube_338601601_338860801_4FGL_J1257.2+3646_daily_bin383.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/32993/ft2_4FGL_J1257.2+3646_daily_bin383.fits
.....................!
real 11.94
user 11.53
sys 0.36

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/32993/ft1_filtered_4FGL_J1257.2+3646_daily_bin383.fits evtable="EVENTS" scfile=/scratch/kocevski/32993/ft2_4FGL_J1257.2+3646_daily_bin383.fits sctable="SC_DATA" expcube=/scratch/kocevski/32993/ltcube_338601601_338860801_4FGL_J1257.2+3646_daily_bin383.fits outfile=/scratch/kocevski/32993/expmap_338601601_338860801_4FGL_J1257.2+3646_daily_bin383.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/32993/ltcube_338601601_338860801_4FGL_J1257.2+3646_daily_bin383.fits
.....................!
real 190.63
user 185.00
sys 5.27

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/32993/ft1_filtered_4FGL_J1257.2+3646_daily_bin383.fits scfile=/scratch/kocevski/32993/ft2_4FGL_J1257.2+3646_daily_bin383.fits outfile=/scratch/kocevski/32993/cmap_338601601_338860801_4FGL_J1257.2+3646_daily_bin383.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.67
user 0.36
sys 0.17

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/32993/ft1_filtered_4FGL_J1257.2+3646_daily_bin383.fits scfile=/scratch/kocevski/32993/ft2_4FGL_J1257.2+3646_daily_bin383.fits outfile=/scratch/kocevski/32993/cmap_HighResolution_338601601_338860801_4FGL_J1257.2+3646_daily_bin383.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.61
user 0.38
sys 0.15

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/32993/ft1_filtered_4FGL_J1257.2+3646_daily_bin383.fits evtable="EVENTS" scfile=/scratch/kocevski/32993/ft2_4FGL_J1257.2+3646_daily_bin383.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/32993/Model_4FGL_J1257.2+3646_daily_bin383.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/32993/ft1_filtered_4FGL_J1257.2+3646_daily_bin383.fits.....................!
real 50.29
user 48.38
sys 1.27

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/32993/ft1_filtered_4FGL_J1257.2+3646_daily_bin383.fits', '/scratch/kocevski/32993/ft2_4FGL_J1257.2+3646_daily_bin383.fits', expMap='/scratch/kocevski/32993/expmap_338601601_338860801_4FGL_J1257.2+3646_daily_bin383.fits', expCube='/scratch/kocevski/32993/ltcube_338601601_338860801_4FGL_J1257.2+3646_daily_bin383.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/32993/Model_4FGL_J1257.2+3646_daily_bin383.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/32993/ft1_filtered_4FGL_J1257.2+3646_daily_bin383.fits
Spacecraft file(s): /scratch/kocevski/32993/ft2_4FGL_J1257.2+3646_daily_bin383.fits
Exposure map: /scratch/kocevski/32993/expmap_338601601_338860801_4FGL_J1257.2+3646_daily_bin383.fits
Exposure cube: /scratch/kocevski/32993/ltcube_338601601_338860801_4FGL_J1257.2+3646_daily_bin383.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/32993/Model_4FGL_J1257.2+3646_daily_bin383.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) = 5908.42358902

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10038E-03   1.0000         .10000E-03   10000.    
     2 'norm      '    3.9964       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10006E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    4.2515       1.0000         .10000E-03   10000.    
     5 'Prefactor '    1.3320       1.0000         .10000E-03   10000.    
     6 'Prefactor '    8.3811       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10105E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10050E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10866E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    11 'norm      '    .10511E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10094E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    5.3870       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10130E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    9.8584       1.0000         .10000E-03   10000.    
    18 'norm      '    .10558       1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10013E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10011E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10021E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10243E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    .33459E-02   1.0000         .10000E-03   10000.    
    24 'Normalizat'    .99702       1.0000         .10000E-01   10.000    
    25 'Prefactor '    1.3531       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=   5908.368     FROM MIGRAD    STATUS=CONVERGED    640 CALLS     2562 TOTAL
                     EDM=   .13E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .9%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    111.05       -.64665E-05** at limit **
   2  norm          3.9961        3.4915       -.75707E-07   -.20827E-03
   3  Prefactor     .10000E-03    2.8684       -.13353E-07** at limit **
   4  Prefactor     4.2514        3.1034       -.28098E-07   -.11387E-03
   5  Prefactor     1.3320        1.5840        .10107E-06    .56792E-03
   6  Prefactor     8.3799        10.745       -.37773E-06   -.66305E-04
   7  Prefactor     .10000E-03    18.472       -.62341E-06** at limit **
   8  Prefactor     .10000E-03    7.9379        .10136E-07** at limit **
   9  Prefactor     .10000E-03    65.885        .12715E-04** at limit **
  10  Prefactor     .10000E-03    2.8317       -.19447E-07** at limit **
  11  norm          .10000E-03    4.4619       -.23387E-06** at limit **
  12  Prefactor     .10000E-03    17.411        .36130E-06** at limit **
  13  Prefactor     5.3674        25.723        .49351E-05   -.19921E-04
  14  Prefactor     .10000E-03    35.110       -.88259E-06** at limit **
  15  norm          .10000E-03    1.8470       -.23461E-07** at limit **
  16  norm          .10000E-03    6.3539       -.27393E-07** at limit **
  17  norm          9.9130        6.1839       -.37345E-06   -.48752E-03
  18  norm          .10154E-03    11.076        .63897E-06** at limit **
  19  Prefactor     .10000E-03    2.0920       -.41067E-07** at limit **
  20  Prefactor     .10000E-03    5.8372       -.31940E-07** at limit **
  21  Prefactor     .10000E-03    69.339       -.11665E-04** at limit **
  22  Prefactor     .10000E-03    21.522        .42322E-06** at limit **
  23  Prefactor     .10097E-03    1063.9       -.45610E-03** at limit **
  24  Normalizat    .99669        .18566        .15512E-05    .11357E-02
  25  Prefactor     1.3536        .23255       -.31782E-06    .83001E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  norm       = 3.99609
  Prefactor  = 0.0001
  Prefactor  = 4.25137
  Prefactor  = 1.33201
  Prefactor  = 8.37985
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 5.36738
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 0.0001
  norm       = 9.91302
  norm       = 0.000101543
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.000100969
  Normalizat = 0.996691
  Prefactor  = 1.35357
 **********
 **   18 **HESSE 
 **********

 FCN=   5908.368     FROM HESSE     STATUS=OK           425 CALLS     2987 TOTAL
                     EDM=   .29E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    113.20        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  norm          3.9961        3.5053        .11763E-03   -1.5308    
   3  Prefactor     .10000E-03    2.8767        .12713E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     4.2514        3.1171        .10091E-03   -1.5296    
   5  Prefactor     1.3320        1.5723        .50903E-03   -1.5477    
   6  Prefactor     8.3799        10.728        .13848E-03   -1.5129    
   7  Prefactor     .10000E-03    18.503        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10000E-03    7.9426        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .10000E-03    66.037        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    2.8434        .12631E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  norm          .10000E-03    4.5354        .31557E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    17.419        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     5.3674        25.314        .17314E-03   -1.5245    
  14  Prefactor     .10000E-03    35.779        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          .10000E-03    1.8516        .10200E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          .10000E-03    6.3611        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          9.9130        6.6045        .10736E-03   -1.5078    
  18  norm          .10154E-03    17.021        .56569E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .10000E-03    6.6501        .21419E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10000E-03    5.8492        .18134E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .10000E-03    69.559        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     .10000E-03    21.788        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .10097E-03    1063.7        .39414E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Normalizat    .99669        .22491        .25716E-03   -.93141    
  25  Prefactor     1.3536        .28206        .28204E-03   -.81728    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.85335e-09
Minuit parameter uncertainties:
  1  4.39741e-05
  2  3.5055
  3  2.15847e-06
  4  3.11723
  5  1.57235
  6  10.7303
  7  1.10328e-05
  8  3.96307e-06
  9  8.72065e-05
  10  4.17011e-06
  11  5.08277e-05
  12  3.79626e-06
  13  23.3286
  14  8.27302e-05
  15  2.45358e-06
  16  1.27262e-06
  17  6.605
  18  0.0102537
  19  1.80162e-05
  20  1.33923e-06
  21  6.62613e-05
  22  2.66184e-05
  23  0.0654228
  24  0.225121
  25  0.282378
Done.

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

Extracting fit parameters...

4FGL J1257.2+3646
   Spectrum: PowerLaw
300    Prefactor:  1.000e-04  4.170e-06  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:  1.354e+00  2.824e-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:  9.967e-01  2.251e-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.87e-08 ph cm-2 s-1
Energy Flux Upper Limit: 3.66e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/32993/likelihoodResults_338601601_338860801_4FGL_J1257.2+3646_daily_bin383.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) = 5908.36967444
delta logL = -0.00166796003032

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 5908.36800684
delta logL = -3.62397258868e-07

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10054E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.0149       1.0000          .0000       10.000    
     3 'Normalizat'    .99652       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.3538       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=   5908.368     FROM MIGRAD    STATUS=FAILED        89 CALLS      237 TOTAL
                     EDM=   .33E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10085E-03    53.361        .12709E-02** at limit **
   2  Index         1.9615        8.9976        .50000        .28553E-04
   3  Normalizat    .99669        .19843E-01    .25716E-03   -.64545E-05
   4  Prefactor     1.3536        .24972E-01    .28204E-03   -.58044E-05
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   5908.368     FROM SIMPLEX   STATUS=UNCHANGED    135 CALLS      372 TOTAL
                     EDM=   .16E-04    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10085E-03    53.361        .33675E-03** at limit **
   2  Index         1.9615        8.9976        .70001E-03    .28553E-04
   3  Normalizat    .99669        .19843E-01    .29299E-05   -.64545E-05
   4  Prefactor     1.3536        .24972E-01    .47795E-05   -.58044E-05
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   5908.368     FROM MIGRAD    STATUS=CONVERGED     44 CALLS      416 TOTAL
                     EDM=   .50E-10    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    45.389        .25418E-02** at limit **
   2  Index         1.7144        5.7933        .50000       -.34561E-08
   3  Normalizat    .99669        .17745E-01    .10286E-04    .12997E-03
   4  Prefactor     1.3536        .22333E-01    .11282E-04    .12032E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 1.71444
  Normalizat = 0.996686
  Prefactor  = 1.35357
 **********
 **   18 **HESSE 
 **********

 FCN=   5908.368     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      445 TOTAL
                     EDM=   .25E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    228.72        .50836E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         1.7144        7.0483        .50000       -.71698    
   3  Normalizat    .99669        .43192E-01    .20573E-05   -.93142    
   4  Prefactor     1.3536        .54337E-01    .22564E-05   -.81728    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 2.51294e-10
Minuit parameter uncertainties:
  1  0.000102391
  2  862.272
  3  0.0431938
  4  0.0543391
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/32993': 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) = 5908.36800505
delta logL = 1.42251246871e-06

Extracting fit parameters...

4FGL J1257.2+3646
   Spectrum: PowerLaw
300    Prefactor:  1.000e-04  1.024e-04  1.000e-04  1.000e+04 ( 1.000e-13)
301        Index:  1.714e+00  8.623e+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:  1.354e+00  5.434e-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:  9.967e-01  4.319e-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/32993/cmap_HighResolution_338601601_338860801_4FGL_J1257.2+3646_daily_bin383.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='3.66e-03', job_status='DONE', photon_flux_upper_limit='4.87e-08', time_completed='2021-09-06 11:46:07.982070', job_id='32993', GAL2='1.35', fit_tolerance='1e-08', EG2='1.00', EG='1.00', time_epoch_completed='1630953967.98', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.35', dlogl='1.42e-06', ts2='-0.00', photon_index_error='0.00', photon_index='2.03' WHERE bin_id='383' AND source_name='4FGL J1257.2+3646' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 11:46:08 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0067>
Subject: Job 32993: <4FGL_J1257.2+3646_daily_bin383> in cluster <slac> Done

Job <4FGL_J1257.2+3646_daily_bin383> was submitted from host <rhel6-64q> by user <kocevski> in cluster <slac> at Mon Sep  6 11:30:32 2021
Job was executed on host(s) <bullet0067>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep  6 11:30:34 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:30:34 2021
Terminated at Mon Sep  6 11:46:08 2021
Results reported at Mon Sep  6 11:46:08 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1257.2+3646_daily_bin383 194.31 36.7706 338601601 338860801 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 :                                   685.13 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             225.83 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   934 sec.
    Turnaround time :                            936 sec.

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

