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


Performing analysis on: 4FGL_J1257.2+3646_daily_bin816
RA = 194.31, Dec = 36.7706
tmin = 450835201, tmax = 451094401
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='36400', job_status='RUN', time_executed='2021-09-06 11:43:20.049043', time_epoch_executed='1630953800.05' WHERE source_name='4FGL J1257.2+3646' and cadence='daily' and bin_id='816'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/36400

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/36400/ft1_4FGL_J1257.2+3646_daily_bin816.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/36400/ft2_4FGL_J1257.2+3646_daily_bin816.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/36400/ft1_4FGL_J1257.2+3646_daily_bin816.fits outfile=/scratch/kocevski/36400/ft1_filteredMKT_4FGL_J1257.2+3646_daily_bin816.fits ra=194.31 dec=36.7706 rad=12.0 tmin=450835201.0 tmax=451094401.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.59
user 3.20
sys 0.18

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/36400/ft1_filtered_4FGL_J1257.2+3646_daily_bin816.fits" evtable="EVENTS" scfile=/scratch/kocevski/36400/ft2_4FGL_J1257.2+3646_daily_bin816.fits sctable="SC_DATA" outfile=/scratch/kocevski/36400/ltcube_450835201_451094401_4FGL_J1257.2+3646_daily_bin816.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/36400/ft2_4FGL_J1257.2+3646_daily_bin816.fits
.....................!
real 12.00
user 11.44
sys 0.30

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/36400/ft1_filtered_4FGL_J1257.2+3646_daily_bin816.fits evtable="EVENTS" scfile=/scratch/kocevski/36400/ft2_4FGL_J1257.2+3646_daily_bin816.fits sctable="SC_DATA" expcube=/scratch/kocevski/36400/ltcube_450835201_451094401_4FGL_J1257.2+3646_daily_bin816.fits outfile=/scratch/kocevski/36400/expmap_450835201_451094401_4FGL_J1257.2+3646_daily_bin816.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/36400/ltcube_450835201_451094401_4FGL_J1257.2+3646_daily_bin816.fits
.....................!
real 190.51
user 185.39
sys 4.14

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/36400/ft1_filtered_4FGL_J1257.2+3646_daily_bin816.fits scfile=/scratch/kocevski/36400/ft2_4FGL_J1257.2+3646_daily_bin816.fits outfile=/scratch/kocevski/36400/cmap_450835201_451094401_4FGL_J1257.2+3646_daily_bin816.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.65
user 0.39
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/36400/ft1_filtered_4FGL_J1257.2+3646_daily_bin816.fits scfile=/scratch/kocevski/36400/ft2_4FGL_J1257.2+3646_daily_bin816.fits outfile=/scratch/kocevski/36400/cmap_HighResolution_450835201_451094401_4FGL_J1257.2+3646_daily_bin816.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.78
user 0.39
sys 0.16

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    30.282       1.0000         .10000E-03   10000.    
     2 'norm      '    3.8896       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .11160E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    3.7352       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    18.294       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    11 'norm      '    1.9356       1.0000         .10000E-03   10000.    
    12 'Prefactor '    6.0158       1.0000         .10000E-03   10000.    
    13 'Prefactor '    1.7529       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10012E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    18.995       1.0000         .10000E-03   10000.    
    16 'norm      '    18.951       1.0000         .10000E-03   10000.    
    17 'norm      '    6.2441       1.0000         .10000E-03   10000.    
    18 'norm      '    .10157E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    2.8536       1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10104E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10009E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10695E-01   1.0000         .10000E-03   10000.    
    24 'Normalizat'    1.2273       1.0000         .10000E-01   10.000    
    25 'Prefactor '    .81728       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=   6517.543     FROM MIGRAD    STATUS=CONVERGED    587 CALLS     2885 TOTAL
                     EDM=   .57E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .5%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     30.346        40.733       -.35978E-04    .28941E-04
   2  norm          3.8891        2.5186        .34590E-06    .16043E-03
   3  Prefactor     .10000E-03    10.459       -.15043E-05** at limit **
   4  Prefactor     .10000E-03    .67603        .27371E-07** at limit **
   5  Prefactor     3.7347        2.5200        .90918E-07   -.70825E-04
   6  Prefactor     .10000E-03    4.1804       -.18731E-07** at limit **
   7  Prefactor     .10000E-03    8.3106        .95679E-06** at limit **
   8  Prefactor     .10000E-03    11.242        .21782E-05** at limit **
   9  Prefactor     18.310        36.692       -.17342E-04    .96322E-05
  10  Prefactor     .10000E-03    3.2655       -.32698E-07** at limit **
  11  norm          1.9369        2.8708        .60622E-06    .10366E-03
  12  Prefactor     6.0130        58.236        .13030E-04   -.11095E-04
  13  Prefactor     1.7546        68.104       -.12616E-04   -.84711E-04
  14  Prefactor     .10000E-03    7.4758       -.20904E-05** at limit **
  15  norm          18.997        6.7149        .64388E-07    .27252E-03
  16  norm          18.956        12.557        .41596E-05    .17473E-04
  17  norm          6.2454        3.2425        .47986E-07    .59654E-04
  18  norm          .10000E-03    6.9059        .66074E-06** at limit **
  19  Prefactor     2.8535        2.9048       -.29847E-06   -.12877E-03
  20  Prefactor     .10000E-03    7.9466        .98026E-06** at limit **
  21  Prefactor     .10000E-03    45.486       -.58455E-09** at limit **
  22  Prefactor     .10000E-03    3.3572       -.30013E-07** at limit **
  23  Prefactor     .10003E-03    508.72       -.12526E-03** at limit **
  24  Normalizat    1.2272        .16673        .49397E-05    .31893E-03
  25  Prefactor     .81743        .20151       -.23507E-05    .42972E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 30.3456
  norm       = 3.88905
  Prefactor  = 0.000100004
  Prefactor  = 0.0001
  Prefactor  = 3.73469
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 18.3097
  Prefactor  = 0.0001
  norm       = 1.93688
  Prefactor  = 6.01304
  Prefactor  = 1.75462
  Prefactor  = 0.0001
  norm       = 18.9966
  norm       = 18.9558
  norm       = 6.24538
  norm       = 0.0001
  Prefactor  = 2.85353
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.000100026
  Normalizat = 1.22716
  Prefactor  = 0.817431
 **********
 **   18 **HESSE 
 **********

 FCN=   6517.543     FROM HESSE     STATUS=OK           419 CALLS     3304 TOTAL
                     EDM=   .12E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     30.346        40.912        .72809E-04   -1.4606    
   2  norm          3.8891        2.5162        .99180E-04   -1.5314    
   3  Prefactor     .10000E-03    10.667        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    .67828        .64763E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     3.7347        2.5141        .10103E-03   -1.5321    
   6  Prefactor     .10000E-03    4.1883        .16118E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    8.3147        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10000E-03    11.274        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     18.310        36.685        .93641E-04   -1.4852    
  10  Prefactor     .10000E-03    3.2950        .14242E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  norm          1.9369        2.7874        .14965E-03   -1.5430    
  12  Prefactor     6.0130        58.018        .16371E-03   -1.5217    
  13  Prefactor     1.7546        65.068        .31663E-03   -1.5443    
  14  Prefactor     .10000E-03    7.5019        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          18.997        6.6956        .91897E-04   -1.4836    
  16  norm          18.956        12.552        .92003E-04   -1.4837    
  17  norm          6.2454        3.1936        .98109E-04   -1.5208    
  18  norm          .10000E-03    6.9752        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     2.8535        2.8939        .13017E-03   -1.5370    
  20  Prefactor     .10000E-03    7.9811        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .10000E-03    45.577        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     .10000E-03    3.3596        .14447E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .10003E-03    527.16        .36306E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Normalizat    1.2272        .19168        .21501E-03   -.85768    
  25  Prefactor     .81743        .23109        .31999E-03   -.99089    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.20759e-09
Minuit parameter uncertainties:
  1  40.9495
  2  2.51622
  3  0.000417905
  4  2.57581e-06
  5  2.51416
  6  4.75721e-07
  7  1.53463e-05
  8  1.58998e-05
  9  36.7306
  10  6.15022e-06
  11  2.78759
  12  37.4029
  13  21.3946
  14  1.26256e-05
  15  6.69586
  16  12.5537
  17  3.19366
  18  1.41773e-06
  19  2.89407
  20  1.53223e-05
  21  5.65308e-05
  22  3.75104e-06
  23  0.00750029
  24  0.191789
  25  0.231365
Done.

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

Extracting fit parameters...

4FGL J1257.2+3646
   Spectrum: PowerLaw
300    Prefactor:  1.000e-04  6.150e-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:  8.174e-01  2.314e-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.227e+00  1.918e-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.58e-08 ph cm-2 s-1
Energy Flux Upper Limit: 3.44e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/36400/likelihoodResults_450835201_451094401_4FGL_J1257.2+3646_daily_bin816.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) = 6517.54420693
delta logL = -0.00144305613321

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 6517.54276701
delta logL = -3.14005774271e-06

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .12193E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.0457       1.0000          .0000       10.000    
     3 'Normalizat'    1.2272       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .81736       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=   6517.543     FROM MIGRAD    STATUS=FAILED        85 CALLS      236 TOTAL
                     EDM=   .56E-06    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10001E-03    164.69        .14458E-02** at limit **
   2  Index         2.0664        5.9576        .50000       -.53379E-04
   3  Normalizat    1.2272        .29369E-01    .21501E-03    .15432E-03
   4  Prefactor     .81743        .36564E-01    .32000E-03    .48566E-04
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   6517.543     FROM SIMPLEX   STATUS=UNCHANGED    157 CALLS      393 TOTAL
                     EDM=   .96E-05    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10001E-03    164.69        .29766E-03** at limit **
   2  Index         2.0664        5.9576        .19741E-04   -.53379E-04
   3  Normalizat    1.2272        .29369E-01    .16129E-06    .15432E-03
   4  Prefactor     .81743        .36564E-01    .21123E-06    .48566E-04
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   6517.543     FROM MIGRAD    STATUS=CONVERGED     34 CALLS      427 TOTAL
                     EDM=   .15E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10001E-03    544.79        .28915E-03** at limit **
   2  Index         2.0669        5.3861        .50000       -.53442E-04
   3  Normalizat    1.2272        .68301E-01    .43001E-04    .15011E-03
   4  Prefactor     .81743        .85018E-01    .12800E-04    .45831E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100009
  Index      = 2.06685
  Normalizat = 1.22716
  Prefactor  = 0.817426
 **********
 **   18 **HESSE 
 **********

 FCN=   6517.543     FROM HESSE     STATUS=OK            29 CALLS      456 TOTAL
                     EDM=   .40E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10001E-03    4.2027        .57830E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.0669        5.9983        .50000       -.62689    
   3  Normalizat    1.2272        .18327        .86003E-05   -.85768    
   4  Prefactor     .81743        .22805        .25600E-05   -.99089    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.95219e-09
Minuit parameter uncertainties:
  1  0.000399199
  2  4.50156
  3  0.183366
  4  0.228315
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/36400': 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) = 6517.54276339
delta logL = 4.87415491079e-07

Extracting fit parameters...

4FGL J1257.2+3646
   Spectrum: PowerLaw
300    Prefactor:  1.000e-04  3.992e-04  1.000e-04  1.000e+04 ( 1.000e-13)
301        Index:  2.067e+00  4.502e+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.174e-01  2.283e-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.227e+00  1.834e-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 -2.500e-04 [aplpy.core]
INFO: Auto-setting vmax to  2.775e-03 [aplpy.core]
Saving /scratch/kocevski/36400/cmap_HighResolution_450835201_451094401_4FGL_J1257.2+3646_daily_bin816.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='3.44e-03', job_status='DONE', photon_flux_upper_limit='4.58e-08', time_completed='2021-09-06 11:56:16.019242', job_id='36400', GAL2='0.82', fit_tolerance='1e-08', EG2='1.23', EG='1.23', time_epoch_completed='1630954576.02', return_code2='0', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.82', dlogl='4.87e-07', ts2='-0.00', photon_index_error='0.00', photon_index='2.03' WHERE bin_id='816' AND source_name='4FGL J1257.2+3646' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 11:56:16 PDT 2021


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

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1257.2+3646_daily_bin816 194.31 36.7706 450835201 451094401 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.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             306.00 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   915 sec.
    Turnaround time :                            917 sec.

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

