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


Performing analysis on: 4FGL_J1257.2+3646_daily_bin652
RA = 194.31, Dec = 36.7706
tmin = 408326401, tmax = 408585601
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='36145', job_status='RUN', time_executed='2021-09-06 11:43:32.080291', time_epoch_executed='1630953812.08' WHERE source_name='4FGL J1257.2+3646' and cadence='daily' and bin_id='652'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/36145

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/36145/ft1_4FGL_J1257.2+3646_daily_bin652.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/36145/ft2_4FGL_J1257.2+3646_daily_bin652.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/36145/ft1_4FGL_J1257.2+3646_daily_bin652.fits outfile=/scratch/kocevski/36145/ft1_filteredMKT_4FGL_J1257.2+3646_daily_bin652.fits ra=194.31 dec=36.7706 rad=12.0 tmin=408326401.0 tmax=408585601.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 4.95
user 4.65
sys 0.21

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/36145/ft2_4FGL_J1257.2+3646_daily_bin652.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/36145/ft1_filteredMKT_4FGL_J1257.2+3646_daily_bin652.fits evtable="EVENTS" outfile="/scratch/kocevski/36145/ft1_filtered_4FGL_J1257.2+3646_daily_bin652.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.77
user 0.33
sys 0.17

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/36145/ft1_filtered_4FGL_J1257.2+3646_daily_bin652.fits evtable="EVENTS" scfile=/scratch/kocevski/36145/ft2_4FGL_J1257.2+3646_daily_bin652.fits sctable="SC_DATA" expcube=/scratch/kocevski/36145/ltcube_408326401_408585601_4FGL_J1257.2+3646_daily_bin652.fits outfile=/scratch/kocevski/36145/expmap_408326401_408585601_4FGL_J1257.2+3646_daily_bin652.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/36145/ltcube_408326401_408585601_4FGL_J1257.2+3646_daily_bin652.fits
.....................!
real 190.62
user 185.05
sys 5.03

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/36145/ft1_filtered_4FGL_J1257.2+3646_daily_bin652.fits scfile=/scratch/kocevski/36145/ft2_4FGL_J1257.2+3646_daily_bin652.fits outfile=/scratch/kocevski/36145/cmap_408326401_408585601_4FGL_J1257.2+3646_daily_bin652.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.68
user 0.37
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/36145/ft1_filtered_4FGL_J1257.2+3646_daily_bin652.fits scfile=/scratch/kocevski/36145/ft2_4FGL_J1257.2+3646_daily_bin652.fits outfile=/scratch/kocevski/36145/cmap_HighResolution_408326401_408585601_4FGL_J1257.2+3646_daily_bin652.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.69
user 0.39
sys 0.14

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     2 'norm      '    4.3019       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .12016E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    5.1322       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    8.0807       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10018E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10017E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    4.7556       1.0000         .10000E-03   10000.    
    11 'norm      '    .10002E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10193E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    .15030E-01   1.0000         .10000E-03   10000.    
    14 'Prefactor '    22.157       1.0000         .10000E-03   10000.    
    15 'norm      '    .10144E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    59.778       1.0000         .10000E-03   10000.    
    17 'norm      '    3.5827       1.0000         .10000E-03   10000.    
    18 'norm      '    .74449E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10245E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    19.344       1.0000         .10000E-03   10000.    
    21 'Prefactor '    18.515       1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10013E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10310E-03   1.0000         .10000E-03   10000.    
    24 'Normalizat'    .96396       1.0000         .10000E-01   10.000    
    25 'Prefactor '    1.0303       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=   3639.990     FROM MIGRAD    STATUS=CONVERGED    633 CALLS     3413 TOTAL
                     EDM=   .36E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  4.9%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    24.395       -.24258E-05** at limit **
   2  norm          4.3030        5.4137       -.33887E-06    .45072E-05
   3  Prefactor     .10001E-03    66.922       -.15262E-04** at limit **
   4  Prefactor     5.1310        4.6864        .50598E-07   -.29775E-04
   5  Prefactor     .10000E-03    1.0155       -.46839E-07** at limit **
   6  Prefactor     8.0810        14.254       -.27626E-06    .14183E-04
   7  Prefactor     .10000E-03    20.881        .18838E-05** at limit **
   8  Prefactor     .10000E-03    17.140       -.43590E-06** at limit **
   9  Prefactor     .10000E-03    31.858        .13028E-05** at limit **
  10  Prefactor     4.7578        8.8664       -.91404E-06   -.32352E-04
  11  norm          .10000E-03    2.5197       -.29051E-06** at limit **
  12  Prefactor     .10000E-03    132.63       -.31782E-05** at limit **
  13  Prefactor     .10235E-03    53.565       -.10545E-04** at limit **
  14  Prefactor     22.157        29.170        .52652E-06   -.33783E-04
  15  norm          .10000E-03    7.2768        .22661E-06** at limit **
  16  norm          59.806        34.591        .19253E-06    .38884E-04
  17  norm          3.5834        4.3374       -.90251E-07   -.25989E-04
  18  norm          .10000E-03    8.1209        .42777E-07** at limit **
  19  Prefactor     .10000E-03    4.3765        .37371E-05** at limit **
  20  Prefactor     19.353        30.322       -.30121E-06   -.20746E-03
  21  Prefactor     18.441        254.67       -.12629E-05   -.41459E-04
  22  Prefactor     .10000E-03    18.354       -.22388E-05** at limit **
  23  Prefactor     .10000E-03    53.751       -.30597E-05** at limit **
  24  Normalizat    .96383        .23609       -.57021E-06    .42540E-04
  25  Prefactor     1.0305        .27886        .13072E-05   -.47597E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  norm       = 4.30296
  Prefactor  = 0.000100014
  Prefactor  = 5.13098
  Prefactor  = 0.0001
  Prefactor  = 8.08101
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 4.75782
  norm       = 0.0001
  Prefactor  = 0.000100001
  Prefactor  = 0.000102349
  Prefactor  = 22.1571
  norm       = 0.0001
  norm       = 59.8059
  norm       = 3.58337
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 19.3528
  Prefactor  = 18.4406
  Prefactor  = 0.0001
  Prefactor  = 0.000100001
  Normalizat = 0.963826
  Prefactor  = 1.03046
 **********
 **   18 **HESSE 
 **********

 FCN=   3639.990     FROM HESSE     STATUS=OK           433 CALLS     3846 TOTAL
                     EDM=   .90E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    24.476        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  norm          4.3030        5.5298        .11531E-03   -1.5293    
   3  Prefactor     .10001E-03    68.632        .35938E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     5.1310        4.7898        .91182E-04   -1.5255    
   5  Prefactor     .10000E-03    1.0179        .59319E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     8.0810        14.241        .14104E-03   -1.5139    
   7  Prefactor     .10000E-03    20.945        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10000E-03    17.158        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .10000E-03    31.898        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     4.7578        8.8303        .18450E-03   -1.5272    
  11  norm          .10000E-03    2.5302        .93499E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    133.30        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .10235E-03    33.169        .97053E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     22.157        29.083        .85094E-04   -1.4766    
  15  norm          .10000E-03    7.4034        .15865E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          59.806        34.612        .51893E-04   -1.4160    
  17  norm          3.5834        3.7578        .11276E-03   -1.5329    
  18  norm          .10000E-03    15.986        .28862E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .10000E-03    4.3963        .12248E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     19.353        30.181        .91066E-04   -1.4828    
  21  Prefactor     18.441        256.24        .93080E-04   -1.4849    
  22  Prefactor     .10000E-03    18.461        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .10000E-03    53.989        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Normalizat    .96383        .28251        .24751E-03   -.94252    
  25  Prefactor     1.0305        .33277        .29158E-03   -.91721    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 8.97593e-10
Minuit parameter uncertainties:
  1  0.000133225
  2  5.53043
  3  0.00193525
  4  4.79017
  5  1.06415e-06
  6  14.2472
  7  0.000107682
  8  3.53128e-05
  9  0.000106802
  10  8.83275
  11  3.59813e-07
  12  0.000605764
  13  0.0176639
  14  29.102
  15  2.77592e-05
  16  34.6241
  17  3.75805
  18  0.000150061
  19  2.6298e-06
  20  30.2052
  21  138.204
  22  9.39614e-05
  23  0.000329384
  24  0.28295
  25  0.33344
Done.

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

Extracting fit parameters...

4FGL J1257.2+3646
   Spectrum: PowerLaw
300    Prefactor:  4.758e+00  8.833e+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

GAL_V02
   Spectrum: PowerLaw
599    Prefactor:  1.030e+00  3.334e-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.638e-01  2.829e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.43
Ra Dec: 194.310 36.771
Photon Flux Upper Limit: 1.04e-07 ph cm-2 s-1
Energy Flux Upper Limit: 7.85e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/36145/likelihoodResults_408326401_408585601_4FGL_J1257.2+3646_daily_bin652.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) = 3639.44323965
delta logL = 0.546445669394

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 3639.42026014
delta logL = 0.56942518437

Fit tolerance = 1e-08

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

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

 FCN=   3639.420     FROM MIGRAD    STATUS=CONVERGED     52 CALLS      248 TOTAL
                     EDM=   .74E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     1.6910        35.364        .80837E-02    .22574E-03
   2  Index         3.0784        2.8506        .11342        .81177E-04
   3  Normalizat    .90764        .64020E-01    .45001E-01   -.43848E-05
   4  Prefactor     1.0689        .76061E-01    .64804E-01    .85667E-07
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 1.69103
  Index      = 3.07842
  Normalizat = 0.907641
  Prefactor  = 1.06894
 **********
 **   18 **HESSE 
 **********

 FCN=   3639.420     FROM HESSE     STATUS=OK            33 CALLS      281 TOTAL
                     EDM=   .17E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     1.6910        6.2383        .71218E-04   -1.5448    
   2  Index         3.0784        1.5643        .39790E-02   -.39447    
   3  Normalizat    .90764        .27877        .25393E-03   -.96192    
   4  Prefactor     1.0689        .33426        .28665E-03   -.90465    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.67789e-08
Minuit parameter uncertainties:
  1  6.2407
  2  1.59594
  3  0.279215
  4  0.334915
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/36145': 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) = 3639.42025976
delta logL = 0.569425559782

Extracting fit parameters...

4FGL J1257.2+3646
   Spectrum: PowerLaw
300    Prefactor:  1.691e+00  6.241e+00  1.000e-04  1.000e+04 ( 1.000e-13)
301        Index:  3.078e+00  1.596e+00  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.069e+00  3.349e-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.076e-01  2.792e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 1.61
Ra Dec: 194.310 36.771
Photon Index (Free Index): 3.08 +/- 1.60
Photon Flux (Free Index): 7.01e-08 +/- 7.17e-08
Energy Flux (Free Index): 1.35e-05 +/- 1.37e-05

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/36145/cmap_HighResolution_408326401_408585601_4FGL_J1257.2+3646_daily_bin652.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='7.85e-03', comment='SUCCESS', energy_flux2='1.35e-05', dlogl='5.69e-01', photon_flux2='7.01e-08', job_status='DONE', time_completed='2021-09-06 11:53:29.467149', photon_index_error2='1.60', photon_index2='3.08', ts='0.43', fit_tolerance='1e-08', GAL='1.03', photon_index_error='0.00', photon_flux_upper_limit='1.04e-07', energy_flux_error2='1.37e-05', EG='0.96', time_epoch_completed='1630954409.47', return_code='0', job_id='36145', GAL2='1.07', EG2='0.91', return_code2='0', photon_flux_error2='7.17e-08', ts2='1.61', photon_index='2.03' WHERE bin_id='652' AND source_name='4FGL J1257.2+3646' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 11:53:29 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0275>
Subject: Job 36145: <4FGL_J1257.2+3646_daily_bin652> in cluster <slac> Done

Job <4FGL_J1257.2+3646_daily_bin652> was submitted from host <rhel6-64m> by user <kocevski> in cluster <slac> at Mon Sep  6 11:40:37 2021
Job was executed on host(s) <bullet0275>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep  6 11:40:39 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:40:39 2021
Terminated at Mon Sep  6 11:53:30 2021
Results reported at Mon Sep  6 11:53:30 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1257.2+3646_daily_bin652 194.31 36.7706 408326401 408585601 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 :                                   578.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             282.58 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   770 sec.
    Turnaround time :                            773 sec.

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

