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


Performing analysis on: 4FGL_J1257.2+3646_daily_bin492
RA = 194.31, Dec = 36.7706
tmin = 366854401, tmax = 367113601
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='34538', job_status='RUN', time_executed='2021-09-06 11:38:46.853917', time_epoch_executed='1630953526.85' WHERE source_name='4FGL J1257.2+3646' and cadence='daily' and bin_id='492'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/34538

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

Retrieving the FT1 file...

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

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

Retrieving 50 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/34538/ft1_4FGL_J1257.2+3646_daily_bin492.fits


Retrieving the FT1 file...

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

Retrieving 50 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/34538/ft2_4FGL_J1257.2+3646_daily_bin492.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/34538/ft1_4FGL_J1257.2+3646_daily_bin492.fits outfile=/scratch/kocevski/34538/ft1_filteredMKT_4FGL_J1257.2+3646_daily_bin492.fits ra=194.31 dec=36.7706 rad=12.0 tmin=366854401.0 tmax=367113601.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.44
user 5.16
sys 0.24

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/34538/ft1_filtered_4FGL_J1257.2+3646_daily_bin492.fits evtable="EVENTS" scfile=/scratch/kocevski/34538/ft2_4FGL_J1257.2+3646_daily_bin492.fits sctable="SC_DATA" expcube=/scratch/kocevski/34538/ltcube_366854401_367113601_4FGL_J1257.2+3646_daily_bin492.fits outfile=/scratch/kocevski/34538/expmap_366854401_367113601_4FGL_J1257.2+3646_daily_bin492.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/34538/ltcube_366854401_367113601_4FGL_J1257.2+3646_daily_bin492.fits
.....................!
real 190.23
user 185.08
sys 4.77

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/34538/ft1_filtered_4FGL_J1257.2+3646_daily_bin492.fits scfile=/scratch/kocevski/34538/ft2_4FGL_J1257.2+3646_daily_bin492.fits outfile=/scratch/kocevski/34538/cmap_366854401_367113601_4FGL_J1257.2+3646_daily_bin492.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.58
user 0.37
sys 0.15

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

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    49.300       1.0000         .10000E-03   10000.    
     2 'norm      '    4.3829       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .83969       1.0000         .10000E-03   10000.    
     5 'Prefactor '    5.9805       1.0000         .10000E-03   10000.    
     6 'Prefactor '    6.7941       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    21.633       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10040E-03   1.0000         .10000E-03   10000.    
    11 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    15.253       1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .15804       1.0000         .10000E-03   10000.    
    15 'norm      '    .10009E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    20.291       1.0000         .10000E-03   10000.    
    17 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    18 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    20.360       1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    24 'Normalizat'    1.2694       1.0000         .10000E-01   10.000    
    25 'Prefactor '    .92521       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6020E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   5838.885     FROM MIGRAD    STATUS=CONVERGED    119 CALLS     3179 TOTAL
                     EDM=   .20E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  3.5%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     49.306        1.1675        .98894E-09    .25051E-02
   2  norm          4.3831        4.3545       -.15906E-07   -.12984E-03
   3  Prefactor     .10000E-03    3.9914        .11023E-06** at limit **
   4  Prefactor     .83975        3.2364       -.31704E-06   -.39525E-04
   5  Prefactor     5.9806        3.5348        .16110E-06    .23694E-05
   6  Prefactor     6.7941        1.0704       -.31056E-08    .35295E-04
   7  Prefactor     .10003E-03    18.539        .11293E-05** at limit **
   8  Prefactor     21.639        2.6875        .14075E-06   -.61112E-02
   9  Prefactor     .10009E-03    22.091        .12855E-05** at limit **
  10  Prefactor     .10000E-03    6.4515       -.69212E-06** at limit **
  11  norm          .10000E-03    1.7370        .55313E-06** at limit **
  12  Prefactor     15.253        1.0530       -.18430E-07    .83617E-03
  13  Prefactor     .10000E-03    10.075        .15255E-05** at limit **
  14  Prefactor     .10004E-03    522.25       -.16132E-04** at limit **
  15  norm          .10000E-03    2.5308        .23288E-06** at limit **
  16  norm          20.290        1.0181       -.47233E-09   -.37853E-03
  17  norm          .10000E-03    1.7619       -.99643E-07** at limit **
  18  norm          .10000E-03    1.8856        .26850E-06** at limit **
  19  Prefactor     .10000E-03    1.2942       -.35977E-06** at limit **
  20  Prefactor     20.356        1.1828        .23267E-07   -.10703E-02
  21  Prefactor     .10011E-03    23.799        .17305E-05** at limit **
  22  Prefactor     .10000E-03    15.913       -.11086E-05** at limit **
  23  Prefactor     .10032E-03    14.409        .13671E-05** at limit **
  24  Normalizat    1.2695        .22286       -.32018E-05   -.88127E-04
  25  Prefactor     .92513        .26977        .10069E-05   -.55733E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 49.3061
  norm       = 4.38309
  Prefactor  = 0.0001
  Prefactor  = 0.839746
  Prefactor  = 5.98062
  Prefactor  = 6.79411
  Prefactor  = 0.000100029
  Prefactor  = 21.6395
  Prefactor  = 0.000100093
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 15.2529
  Prefactor  = 0.0001
  Prefactor  = 0.000100041
  norm       = 0.0001
  norm       = 20.2904
  norm       = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 20.3558
  Prefactor  = 0.000100109
  Prefactor  = 0.000100003
  Prefactor  = 0.000100318
  Normalizat = 1.26949
  Prefactor  = 0.925135
 **********
 **   18 **HESSE 
 **********

 FCN=   5838.885     FROM HESSE     STATUS=OK           477 CALLS     3656 TOTAL
                     EDM=   .17E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     49.306        42.434        .14278E-02   -1.4302    
   2  norm          4.3831        4.5492        .48095E-02   -1.5289    
   3  Prefactor     .10000E-03    3.9766        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .83975        3.5614        .12587E-01   -1.5525    
   5  Prefactor     5.9806        3.6376        .41049E-02   -1.5219    
   6  Prefactor     6.7941        10.323        .38483E-02   -1.5187    
   7  Prefactor     .10003E-03    19.045        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     21.639        25.425        .21529E-02   -1.4777    
   9  Prefactor     .10009E-03    24.387        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    6.4429        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  norm          .10000E-03    1.7340        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     15.253        49.735        .25638E-02   -1.4927    
  13  Prefactor     .10000E-03    10.095        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10004E-03    16.766        .97844E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          .10000E-03    2.5209        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          20.290        15.421        .22229E-02   -1.4807    
  17  norm          .10000E-03    1.7448        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  norm          .10000E-03    1.8848        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .10000E-03    1.2913        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     20.356        16.317        .22191E-02   -1.4805    
  21  Prefactor     .10011E-03    35.068        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     .10000E-03    15.886        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .10032E-03    32.505        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Normalizat    1.2695        .18888        .52929E-01   -.84482    
  25  Prefactor     .92513        .22534        .73395E-01   -.95268    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.67711e-07
Minuit parameter uncertainties:
  1  42.4602
  2  4.54959
  3  1.56347e-06
  4  3.45884
  5  3.63773
  6  10.3256
  7  0.00149068
  8  25.4376
  9  0.00301376
  10  1.12895e-05
  11  4.62844e-06
  12  49.8703
  13  3.39324e-05
  14  0.00165031
  15  1.04101e-06
  16  15.424
  17  8.93428e-07
  18  2.54565e-06
  19  1.78706e-06
  20  16.3203
  21  0.00391404
  22  0.000410578
  23  0.00643628
  24  0.188979
  25  0.225568
Done.

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

Extracting fit parameters...

4FGL J1257.2+3646
   Spectrum: PowerLaw
300    Prefactor:  1.000e-04  1.129e-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:  9.251e-01  2.256e-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.269e+00  1.890e-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: 6.59e-08 ph cm-2 s-1
Energy Flux Upper Limit: 4.95e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/34538/likelihoodResults_366854401_367113601_4FGL_J1257.2+3646_daily_bin492.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) = 5838.88569661
delta logL = -0.000733839780878

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5838.88496188
delta logL = 8.89795956027e-07

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10073E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.0824       1.0000          .0000       10.000    
     3 'Normalizat'    1.2695       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .92509       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=   5838.885     FROM MIGRAD    STATUS=CONVERGED     61 CALLS      220 TOTAL
                     EDM=   .10E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10001E-03    48.395        .90712E-02** at limit **
   2  Index         2.1487        5.9623        .50000       -.82244E-04
   3  Normalizat    1.2695        .10969E-01    .52929E-01    .74231E-04
   4  Prefactor     .92513        .13295E-01    .73395E-01    .43644E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100015
  Index      = 2.14873
  Normalizat = 1.26949
  Prefactor  = 0.925134
 **********
 **   18 **HESSE 
 **********

 FCN=   5838.885     FROM HESSE     STATUS=OK            31 CALLS      251 TOTAL
                     EDM=   .89E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10001E-03    9.1303        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.1487        6.0725        .50000       -.60682    
   3  Normalizat    1.2695        .22118        .23402E-03   -.84482    
   4  Prefactor     .92513        .26756        .32476E-03   -.95268    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 8.93898e-09
Minuit parameter uncertainties:
  1  0.000733487
  2  4.11936
  3  0.22134
  4  0.267939
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/34538': 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) = 5838.88496056
delta logL = 2.21015670832e-06

Extracting fit parameters...

4FGL J1257.2+3646
   Spectrum: PowerLaw
300    Prefactor:  1.000e-04  7.335e-04  1.000e-04  1.000e+04 ( 1.000e-13)
301        Index:  2.149e+00  4.119e+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:  9.251e-01  2.679e-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.269e+00  2.213e-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/34538/cmap_HighResolution_366854401_367113601_4FGL_J1257.2+3646_daily_bin492.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='4.95e-03', job_status='DONE', photon_flux_upper_limit='6.59e-08', time_completed='2021-09-06 11:50:57.293625', job_id='34538', GAL2='0.93', fit_tolerance='1e-08', EG2='1.27', EG='1.27', time_epoch_completed='1630954257.29', return_code2='0', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.93', dlogl='2.21e-06', ts2='-0.00', photon_index_error='0.00', photon_index='2.03' WHERE bin_id='492' AND source_name='4FGL J1257.2+3646' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 11:50:57 PDT 2021


------------------------------------------------------------
Sender: LSF System <scs@bullet0015>
Subject: Job 34538: <4FGL_J1257.2+3646_daily_bin492> in cluster <slac> Done

Job <4FGL_J1257.2+3646_daily_bin492> was submitted from host <rhel6-64h> by user <kocevski> in cluster <slac> at Mon Sep  6 11:35:33 2021
Job was executed on host(s) <bullet0015>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep  6 11:35: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:35:34 2021
Terminated at Mon Sep  6 11:50:58 2021
Results reported at Mon Sep  6 11:50:58 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1257.2+3646_daily_bin492 194.31 36.7706 366854401 367113601 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 :                                   726.12 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             246.70 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   923 sec.
    Turnaround time :                            925 sec.

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

