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


Performing analysis on: 4FGL_J1257.2+3646_daily_bin140
RA = 194.31, Dec = 36.7706
tmin = 275616001, tmax = 275875201
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='31874', job_status='RUN', time_executed='2021-09-06 11:29:18.994567', time_epoch_executed='1630952958.99' WHERE source_name='4FGL J1257.2+3646' and cadence='daily' and bin_id='140'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/31874

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/31874/ft1_4FGL_J1257.2+3646_daily_bin140.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/31874/ft2_4FGL_J1257.2+3646_daily_bin140.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/31874/ft1_4FGL_J1257.2+3646_daily_bin140.fits outfile=/scratch/kocevski/31874/ft1_filteredMKT_4FGL_J1257.2+3646_daily_bin140.fits ra=194.31 dec=36.7706 rad=12.0 tmin=275616001.0 tmax=275875201.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.20
user 3.98
sys 0.20

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/31874/ft2_4FGL_J1257.2+3646_daily_bin140.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/31874/ft1_filteredMKT_4FGL_J1257.2+3646_daily_bin140.fits evtable="EVENTS" outfile="/scratch/kocevski/31874/ft1_filtered_4FGL_J1257.2+3646_daily_bin140.fits" apply_filter=yes overwrite=yes header_obstimes=yes tstart=0.0 tstop=0.0 gtifile="default" chatter=3 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

This is gtmktime version HEAD
Applying GTI filter:
IN_SAA!=T && LIVETIME>0 && gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nogrb.gti',(START+STOP)/2) && (angsep(RA_SUN,DEC_SUN,RA_ZENITH,DEC_ZENITH)>115 || gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nosolarflares.gti',(START+STOP)/2))
real 0.49
user 0.32
sys 0.16

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/31874/ft1_filtered_4FGL_J1257.2+3646_daily_bin140.fits evtable="EVENTS" scfile=/scratch/kocevski/31874/ft2_4FGL_J1257.2+3646_daily_bin140.fits sctable="SC_DATA" expcube=/scratch/kocevski/31874/ltcube_275616001_275875201_4FGL_J1257.2+3646_daily_bin140.fits outfile=/scratch/kocevski/31874/expmap_275616001_275875201_4FGL_J1257.2+3646_daily_bin140.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/31874/ltcube_275616001_275875201_4FGL_J1257.2+3646_daily_bin140.fits
.....................!
real 190.20
user 184.25
sys 5.57

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/31874/ft1_filtered_4FGL_J1257.2+3646_daily_bin140.fits scfile=/scratch/kocevski/31874/ft2_4FGL_J1257.2+3646_daily_bin140.fits outfile=/scratch/kocevski/31874/cmap_275616001_275875201_4FGL_J1257.2+3646_daily_bin140.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.55
user 0.38
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/31874/ft1_filtered_4FGL_J1257.2+3646_daily_bin140.fits scfile=/scratch/kocevski/31874/ft2_4FGL_J1257.2+3646_daily_bin140.fits outfile=/scratch/kocevski/31874/cmap_HighResolution_275616001_275875201_4FGL_J1257.2+3646_daily_bin140.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.37
sys 0.16

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    23.477       1.0000         .10000E-03   10000.    
     2 'norm      '    .10845E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10017E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    2.0341       1.0000         .10000E-03   10000.    
     5 'Prefactor '    3.5072       1.0000         .10000E-03   10000.    
     6 'Prefactor '    27.997       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10027E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    12.340       1.0000         .10000E-03   10000.    
     9 'Prefactor '    108.52       1.0000         .10000E-03   10000.    
    10 'Prefactor '    8.9285       1.0000         .10000E-03   10000.    
    11 'norm      '    .24647E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10024E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    10.724       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .97505E-02   1.0000         .10000E-03   10000.    
    15 'norm      '    .10506E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    23.357       1.0000         .10000E-03   10000.    
    17 'norm      '    3.7419       1.0000         .10000E-03   10000.    
    18 'norm      '    .10065E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10097E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10018E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    21.903       1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10065E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10248E-03   1.0000         .10000E-03   10000.    
    24 'Normalizat'    1.1262       1.0000         .10000E-01   10.000    
    25 'Prefactor '    1.1048       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=   6265.802     FROM MIGRAD    STATUS=CONVERGED    619 CALLS     3366 TOTAL
                     EDM=   .18E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .3%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     23.475        29.928        .62553E-06   -.85818E-05
   2  norm          .10000E-03    1.8478        .16097E-06** at limit **
   3  Prefactor     .10000E-03    3.0144       -.16174E-08** at limit **
   4  Prefactor     2.0345        1.8468        .12412E-07   -.13096E-05
   5  Prefactor     3.5091        3.2129       -.27335E-06   -.50343E-03
   6  Prefactor     27.998        12.540        .78878E-06   -.14279E-04
   7  Prefactor     .10000E-03    13.155       -.15370E-05** at limit **
   8  Prefactor     12.339        13.235       -.19573E-05   -.79165E-05
   9  Prefactor     108.52        71.026       -.30663E-06   -.18176E-04
  10  Prefactor     8.9266        5.8477        .35766E-06   -.11066E-03
  11  norm          .10000E-03    2.6632        .23392E-06** at limit **
  12  Prefactor     .10000E-03    16.740       -.56632E-06** at limit **
  13  Prefactor     10.721        12.760       -.58504E-05   -.60427E-04
  14  Prefactor     .10000E-03    10.619        .43445E-06** at limit **
  15  norm          .10000E-03    2.7737        .33698E-06** at limit **
  16  norm          23.357        16.799        .91861E-06   -.35105E-05
  17  norm          3.7380        3.0542       -.15733E-07   -.80359E-03
  18  norm          .10000E-03    4.7685        .87394E-06** at limit **
  19  Prefactor     .10000E-03    1.4877        .18541E-06** at limit **
  20  Prefactor     .10000E-03    4.4358        .31158E-06** at limit **
  21  Prefactor     21.861        60.473       -.17032E-04   -.13221E-04
  22  Prefactor     .10000E-03    10.440       -.87988E-06** at limit **
  23  Prefactor     .10000E-03    74.294       -.89783E-06** at limit **
  24  Normalizat    1.1262        .17900        .83919E-06   -.20438E-03
  25  Prefactor     1.1046        .22368       -.15104E-06   -.10314E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 23.4754
  norm       = 0.000100004
  Prefactor  = 0.0001
  Prefactor  = 2.03455
  Prefactor  = 3.5091
  Prefactor  = 27.9977
  Prefactor  = 0.0001
  Prefactor  = 12.3394
  Prefactor  = 108.525
  Prefactor  = 8.92664
  norm       = 0.000100002
  Prefactor  = 0.0001
  Prefactor  = 10.7212
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 23.3574
  norm       = 3.738
  norm       = 0.000100002
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 21.8615
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Normalizat = 1.12619
  Prefactor  = 1.1046
 **********
 **   18 **HESSE 
 **********

 FCN=   6265.802     FROM HESSE     STATUS=OK           435 CALLS     3801 TOTAL
                     EDM=   .85E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     23.475        29.924        .82670E-04   -1.4739    
   2  norm          .10000E-03    13.249        .19590E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .10000E-03    3.0215        .13421E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     2.0345        1.8191        .96473E-04   -1.5423    
   5  Prefactor     3.5091        3.1061        .12388E-03   -1.5333    
   6  Prefactor     27.998        12.543        .75715E-04   -1.4649    
   7  Prefactor     .10000E-03    13.198        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     12.339        13.227        .11403E-03   -1.5005    
   9  Prefactor     108.52        70.679        .38608E-04   -1.3621    
  10  Prefactor     8.9266        5.8380        .13414E-03   -1.5110    
  11  norm          .10000E-03    10.952        .24915E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    16.745        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     10.721        12.742        .12235E-03   -1.5053    
  14  Prefactor     .10000E-03    12.389        .78748E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          .10000E-03    5.7166        .25232E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          23.357        16.803        .82882E-04   -1.4741    
  17  norm          3.7380        2.7309        .10787E-03   -1.5321    
  18  norm          .10000E-03    10.810        .29981E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .10000E-03    1.5370        .18853E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10000E-03    4.4472        .16286E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     21.861        60.425        .85585E-04   -1.4772    
  22  Prefactor     .10000E-03    10.473        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .10000E-03    74.466        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Normalizat    1.1262        .21793        .24056E-03   -.88915    
  25  Prefactor     1.1046        .27138        .30699E-03   -.89320    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 8.50901e-10
Minuit parameter uncertainties:
  1  29.9428
  2  0.000436746
  3  1.91103e-06
  4  1.81917
  5  3.10626
  6  12.5445
  7  2.91743e-06
  8  13.2304
  9  70.7336
  10  5.8384
  11  0.000272428
  12  8.87826e-06
  13  12.7452
  14  4.91576e-05
  15  4.39921e-05
  16  16.8061
  17  2.73099
  18  0.000284218
  19  2.04024e-05
  20  1.95158e-05
  21  60.5951
  22  5.85617e-06
  23  5.96069e-05
  24  0.2181
  25  0.271722
Done.

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

Extracting fit parameters...

4FGL J1257.2+3646
   Spectrum: PowerLaw
300    Prefactor:  8.927e+00  5.838e+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.105e+00  2.717e-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.126e+00  2.181e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 8.15
Ra Dec: 194.310 36.771
Photon Index (Fixed Index): 2.03 +/- 0.00
Photon Flux (Fixed Index): 3.39e-08 +/- 2.21e-08
Energy Flux (Fixed Index): 2.19e-05 +/- 1.43e-05

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) = 6265.79598607
delta logL = 0.00600479694276

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6265.79270513
delta logL = 0.0092857369691

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    9.4895       1.0000         .10000E-03   10000.    
     2 'Index     '    1.9529       1.0000          .0000       10.000    
     3 'Normalizat'    1.1297       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.1020       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=   6265.793     FROM MIGRAD    STATUS=CONVERGED     58 CALLS      218 TOTAL
                     EDM=   .16E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     9.4841        172.92        .32523E-02    .14420E-03
   2  Index         1.9529        5.8163        .13701        .12720E-03
   3  Normalizat    1.1298        .13505        .54329E-01   -.38212E-04
   4  Prefactor     1.1019        .10962        .69460E-01    .15432E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 9.48405
  Index      = 1.95295
  Normalizat = 1.12983
  Prefactor  = 1.10194
 **********
 **   18 **HESSE 
 **********

 FCN=   6265.793     FROM HESSE     STATUS=OK            31 CALLS      249 TOTAL
                     EDM=   .66E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     9.4841        7.4704        .13009E-03   -1.5092    
   2  Index         1.9529        .55664        .73726E-02   -.65532    
   3  Normalizat    1.1298        .21546        .24022E-03   -.88800    
   4  Prefactor     1.1019        .27173        .30731E-03   -.89405    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.60724e-11
Minuit parameter uncertainties:
  1  7.47116
  2  0.558481
  3  0.215631
  4  0.272072
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/31874': 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) = 6265.79270467
delta logL = 0.00928618939543

Extracting fit parameters...

4FGL J1257.2+3646
   Spectrum: PowerLaw
300    Prefactor:  9.484e+00  7.471e+00  1.000e-04  1.000e+04 ( 1.000e-13)
301        Index:  1.953e+00  5.585e-01  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.102e+00  2.721e-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.130e+00  2.156e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 8.17
Ra Dec: 194.310 36.771
Photon Index (Free Index): 1.95 +/- 0.56
Photon Flux (Free Index): 3.11e-08 +/- 2.79e-08
Energy Flux (Free Index): 2.43e-05 +/- 2.57e-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/31874/cmap_HighResolution_275616001_275875201_4FGL_J1257.2+3646_daily_bin140.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='3.39e-08', energy_flux2='2.43e-05', photon_flux_error='2.21e-08', dlogl='9.29e-03', energy_flux='2.19e-05', photon_flux2='3.11e-08', job_status='DONE', time_completed='2021-09-06 11:40:49.739243', photon_index_error2='0.56', photon_index2='1.95', ts='8.15', fit_tolerance='1e-08', GAL='1.10', photon_index_error='0.00', energy_flux_error2='2.57e-05', EG='1.13', time_epoch_completed='1630953649.74', return_code='0', job_id='31874', GAL2='1.10', EG2='1.13', return_code2='0', energy_flux_error='1.43e-05', photon_flux_error2='2.79e-08', ts2='8.17', photon_index='2.03' WHERE bin_id='140' AND source_name='4FGL J1257.2+3646' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 11:40:49 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0221>
Subject: Job 31874: <4FGL_J1257.2+3646_daily_bin140> in cluster <slac> Done

Job <4FGL_J1257.2+3646_daily_bin140> was submitted from host <rhel6-64p> by user <kocevski> in cluster <slac> at Mon Sep  6 11:25:44 2021
Job was executed on host(s) <bullet0221>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep  6 11:25:45 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:25:45 2021
Terminated at Mon Sep  6 11:40:50 2021
Results reported at Mon Sep  6 11:40:50 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1257.2+3646_daily_bin140 194.31 36.7706 275616001 275875201 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1257.2+3646 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   685.03 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             247.82 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   905 sec.
    Turnaround time :                            906 sec.

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

