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


Performing analysis on: 4FGL_J1257.2+3646_daily_bin606
RA = 194.31, Dec = 36.7706
tmin = 396403201, tmax = 396662401
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='36075', job_status='RUN', time_executed='2021-09-06 11:43:36.760663', time_epoch_executed='1630953816.76' WHERE source_name='4FGL J1257.2+3646' and cadence='daily' and bin_id='606'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/36075

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/36075/ft1_4FGL_J1257.2+3646_daily_bin606.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/36075/ft2_4FGL_J1257.2+3646_daily_bin606.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/36075/ft1_4FGL_J1257.2+3646_daily_bin606.fits outfile=/scratch/kocevski/36075/ft1_filteredMKT_4FGL_J1257.2+3646_daily_bin606.fits ra=194.31 dec=36.7706 rad=12.0 tmin=396403201.0 tmax=396662401.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.70
user 4.38
sys 0.21

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/36075/ft1_filtered_4FGL_J1257.2+3646_daily_bin606.fits evtable="EVENTS" scfile=/scratch/kocevski/36075/ft2_4FGL_J1257.2+3646_daily_bin606.fits sctable="SC_DATA" expcube=/scratch/kocevski/36075/ltcube_396403201_396662401_4FGL_J1257.2+3646_daily_bin606.fits outfile=/scratch/kocevski/36075/expmap_396403201_396662401_4FGL_J1257.2+3646_daily_bin606.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/36075/ltcube_396403201_396662401_4FGL_J1257.2+3646_daily_bin606.fits
.....................!
real 191.42
user 186.35
sys 4.60

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/36075/ft1_filtered_4FGL_J1257.2+3646_daily_bin606.fits scfile=/scratch/kocevski/36075/ft2_4FGL_J1257.2+3646_daily_bin606.fits outfile=/scratch/kocevski/36075/cmap_396403201_396662401_4FGL_J1257.2+3646_daily_bin606.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 1.35
user 0.39
sys 0.18

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/36075/ft1_filtered_4FGL_J1257.2+3646_daily_bin606.fits scfile=/scratch/kocevski/36075/ft2_4FGL_J1257.2+3646_daily_bin606.fits outfile=/scratch/kocevski/36075/cmap_HighResolution_396403201_396662401_4FGL_J1257.2+3646_daily_bin606.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 1.27
user 0.41
sys 0.17

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .11025E-02   1.0000         .10000E-03   10000.    
     2 'norm      '    8.0740       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10012E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10946E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10110E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    1.4930       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .11249E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    12.661       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10018E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10042E-03   1.0000         .10000E-03   10000.    
    11 'norm      '    .10009E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10008E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    .11355E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10115E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    1.2675       1.0000         .10000E-03   10000.    
    16 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    .10292E-03   1.0000         .10000E-03   10000.    
    18 'norm      '    8.2465       1.0000         .10000E-03   10000.    
    19 'Prefactor '    4.0175       1.0000         .10000E-03   10000.    
    20 'Prefactor '    9.8368       1.0000         .10000E-03   10000.    
    21 'Prefactor '    .22526       1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10214E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    .12273E-03   1.0000         .10000E-03   10000.    
    24 'Normalizat'    1.1496       1.0000         .10000E-01   10.000    
    25 'Prefactor '    .84326       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.

 FCN=   6148.559     FROM MIGRAD    STATUS=CONVERGED   1052 CALLS     2960 TOTAL
                     EDM=   .10E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10002E-03    130.88        .41394E-03** at limit **
   2  norm          8.0774        3.1176        .83240E-04    .63170E-03
   3  Prefactor     .10000E-03    2.0107        .10850E-02** at limit **
   4  Prefactor     .10000E-03    2.4080        .17597E-02** at limit **
   5  Prefactor     .10000E-03    1.6910        .15805E-02** at limit **
   6  Prefactor     1.4947        10.719        .35076E-03   -.89522E-04
   7  Prefactor     .10001E-03    30.090        .18142E-02** at limit **
   8  Prefactor     12.666        12.067        .11257E-03   -.18178E-05
   9  Prefactor     .10000E-03    24.556        .18142E-02** at limit **
  10  Prefactor     .10000E-03    3.8324        .14859E-02** at limit **
  11  norm          .10000E-03    1.9487        .10637E-02** at limit **
  12  Prefactor     .10000E-03    23.124        .18142E-02** at limit **
  13  Prefactor     .10000E-03    17.267        .18142E-02** at limit **
  14  Prefactor     .10000E-03    12.236        .18142E-02** at limit **
  15  norm          1.2704        3.2233        .21897E-03   -.70973E-04
  16  norm          .10000E-03    6.2690        .18142E-02** at limit **
  17  norm          .10000E-03    4.7746        .23520E-02** at limit **
  18  norm          8.2418        5.2979        .13961E-03   -.15456E-03
  19  Prefactor     4.0175        3.8033        .12416E-03   -.19576E-03
  20  Prefactor     9.8415        10.712        .12777E-03    .27673E-04
  21  Prefactor     .92283E-01    61.484        .15742        .47117E-04
  22  Prefactor     .10000E-03    22.726        .18142E-02** at limit **
  23  Prefactor     .10000E-03    34.721        .18142E-02** at limit **
  24  Normalizat    1.1494        .18783        .20910E-03   -.24418E-03
  25  Prefactor     .84313        .23439        .30214E-03   -.17933E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100025
  norm       = 8.07745
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 1.49469
  Prefactor  = 0.000100005
  Prefactor  = 12.6655
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.000100001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 1.27043
  norm       = 0.0001
  norm       = 0.0001
  norm       = 8.24181
  Prefactor  = 4.01754
  Prefactor  = 9.84149
  Prefactor  = 0.092283
  Prefactor  = 0.000100001
  Prefactor  = 0.000100001
  Normalizat = 1.14936
  Prefactor  = 0.843131
 **********
 **   18 **HESSE 
 **********

 FCN=   6148.559     FROM HESSE     STATUS=OK           411 CALLS     3371 TOTAL
                     EDM=   .10E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10002E-03    130.89        .82788E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  norm          8.0774        3.1154        .16648E-04   -1.5139    
   3  Prefactor     .10000E-03    2.0107        .21699E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    2.4116        .35194E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    1.6936        .31610E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     1.4947        10.714        .14030E-04   -1.5463    
   7  Prefactor     .10001E-03    30.099        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     12.666        12.067        .45030E-05   -1.4996    
   9  Prefactor     .10000E-03    24.557        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    3.8341        .29719E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  norm          .10000E-03    1.9489        .21275E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    23.124        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .10000E-03    17.270        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10000E-03    12.240        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          1.2704        3.2230        .87588E-05   -1.5483    
  16  norm          .10000E-03    6.2694        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          .10000E-03    4.7849        .47040E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  norm          8.2418        5.2939        .55843E-05   -1.5134    
  19  Prefactor     4.0175        3.8037        .49666E-05   -1.5307    
  20  Prefactor     9.8415        10.711        .51106E-05   -1.5080    
  21  Prefactor     .92283E-01    62.584        .15566       -1.5647    
  22  Prefactor     .10000E-03    22.744        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .10000E-03    34.724        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Normalizat    1.1494        .18799        .41820E-04   -.88182    
  25  Prefactor     .84313        .23460        .12086E-04   -.98158    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.00565e-09
Minuit parameter uncertainties:
  1  0.00361195
  2  3.11541
  3  7.00407e-07
  4  5.10492e-05
  5  2.87868e-05
  6  8.00545
  7  0.000782648
  8  12.0691
  9  0.000143952
  10  1.45396e-05
  11  8.3054e-07
  12  0.000246846
  13  0.000106406
  14  9.05983e-05
  15  3.22342
  16  3.4003e-06
  17  8.58388e-05
  18  5.29417
  19  3.80398
  20  10.7126
  21  4.80887
  22  0.000304465
  23  0.000396718
  24  0.188102
  25  0.234881
Done.

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

Extracting fit parameters...

4FGL J1257.2+3646
   Spectrum: PowerLaw
300    Prefactor:  1.000e-04  1.454e-05  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:  8.431e-01  2.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:  1.149e+00  1.881e-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.41e-08 ph cm-2 s-1
Energy Flux Upper Limit: 3.31e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/36075/likelihoodResults_396403201_396662401_4FGL_J1257.2+3646_daily_bin606.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) = 6148.56042033
delta logL = -0.00124247490112

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 6148.55917742
delta logL = 4.317253115e-07

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10040E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.0585       1.0000          .0000       10.000    
     3 'Normalizat'    1.1493       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .84318       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=   6148.559     FROM MIGRAD    STATUS=FAILED        89 CALLS      241 TOTAL
                     EDM=   .53E-05    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10003E-03    910.65        .30972E-03** at limit **
   2  Index         2.0929        6.1621        .50000       -.76187E-04
   3  Normalizat    1.1494        .11140        .20910E-03   -.49223E-03
   4  Prefactor     .84313        .14048        .30213E-03   -.32499E-03
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   6148.559     FROM SIMPLEX   STATUS=UNCHANGED    175 CALLS      416 TOTAL
                     EDM=   .15E-04    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10003E-03    910.65        .36621E-03** at limit **
   2  Index         2.0929        6.1621        .26199E-05   -.76187E-04
   3  Normalizat    1.1494        .11140        .20388E-06   -.49223E-03
   4  Prefactor     .84313        .14048        .96661E-07   -.32499E-03
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
 MACHINE ACCURACY LIMITS FURTHER IMPROVEMENT.

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
 MIGRAD TERMINATED WITHOUT CONVERGENCE.

 FCN=   6148.328     FROM MIGRAD    STATUS=FAILED       148 CALLS      564 TOTAL
                     EDM=   .12E-05    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .76868E-01    8.7252        .12389E-03   -.13627E-03
   2  Index         3.9189        6.8095        .65301E-02    .64637E-03
   3  Normalizat    1.1138        .14092        .83640E-05    .70681E-04
   4  Prefactor     .86868        .17380        .24171E-05    .49857E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0768683
  Index      = 3.91891
  Normalizat = 1.11378
  Prefactor  = 0.868683
 **********
 **   18 **HESSE 
 **********

 FCN=   6148.328     FROM HESSE     STATUS=OK            27 CALLS      591 TOTAL
                     EDM=   .65E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .76868E-01    .88900        .49555E-05   -1.5653    
   2  Index         3.9189        2.5252        .13060E-02   -.21794    
   3  Normalizat    1.1138        .19432        .16728E-05   -.89311    
   4  Prefactor     .86868        .23930        .48341E-06   -.97244    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.48325e-12
Minuit parameter uncertainties:
  1  0.522492
  2  2.65402
  3  0.194448
  4  0.239593
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/36075': 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): 1
logL (Free Index) = 6148.32782775
delta logL = 0.231350101853

Extracting fit parameters...

4FGL J1257.2+3646
   Spectrum: PowerLaw
300    Prefactor:  7.687e-02  5.225e-01  1.000e-04  1.000e+04 ( 1.000e-13)
301        Index:  3.919e+00  2.654e+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:  8.687e-01  2.396e-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.114e+00  1.944e-01  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/36075/cmap_HighResolution_396403201_396662401_4FGL_J1257.2+3646_daily_bin606.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='3.31e-03', job_status='DONE', photon_flux_upper_limit='4.41e-08', time_completed='2021-09-06 11:56:31.009042', job_id='36075', GAL2='0.87', fit_tolerance='1e-08', EG2='1.11', EG='1.15', time_epoch_completed='1630954591.01', return_code2='1', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.84', dlogl='2.31e-01', ts2='0.49', photon_index_error='0.00', photon_index='2.03' WHERE bin_id='606' AND source_name='4FGL J1257.2+3646' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 11:56:31 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0223>
Subject: Job 36075: <4FGL_J1257.2+3646_daily_bin606> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1257.2+3646_daily_bin606 194.31 36.7706 396403201 396662401 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 :                                   762.10 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             290.11 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   958 sec.
    Turnaround time :                            961 sec.

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

