/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 6 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 = 7496
number of fields = 22
No RA_SUN column yet. Adding RA_SUN/DEC_SUN columns.
Done.


Performing analysis on: 4FGL_J1304.0+3704_daily_bin20
RA = 196.008, Dec = 37.071
tmin = 244512001, tmax = 244771201
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='183868', job_status='RUN', time_executed='2021-09-06 19:25:58.120953', time_epoch_executed='1630981558.12' WHERE source_name='4FGL J1304.0+3704' and cadence='daily' and bin_id='20'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/183868

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/183868/ft1_4FGL_J1304.0+3704_daily_bin20.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/183868/ft2_4FGL_J1304.0+3704_daily_bin20.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/183868/ft1_4FGL_J1304.0+3704_daily_bin20.fits outfile=/scratch/kocevski/183868/ft1_filteredMKT_4FGL_J1304.0+3704_daily_bin20.fits ra=196.008 dec=37.071 rad=12.0 tmin=244512001.0 tmax=244771201.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 1.45
user 1.27
sys 0.17

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/183868/ft2_4FGL_J1304.0+3704_daily_bin20.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/183868/ft2_4FGL_J1304.0+3704_daily_bin20.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/183868/ft1_filteredMKT_4FGL_J1304.0+3704_daily_bin20.fits evtable="EVENTS" outfile="/scratch/kocevski/183868/ft1_filtered_4FGL_J1304.0+3704_daily_bin20.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.33
sys 0.15

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/183868/ft1_filtered_4FGL_J1304.0+3704_daily_bin20.fits" evtable="EVENTS" scfile=/scratch/kocevski/183868/ft2_4FGL_J1304.0+3704_daily_bin20.fits sctable="SC_DATA" outfile=/scratch/kocevski/183868/ltcube_244512001_244771201_4FGL_J1304.0+3704_daily_bin20.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/183868/ft2_4FGL_J1304.0+3704_daily_bin20.fits
.....................!
real 15.02
user 14.66
sys 0.32

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/183868/ft1_filtered_4FGL_J1304.0+3704_daily_bin20.fits evtable="EVENTS" scfile=/scratch/kocevski/183868/ft2_4FGL_J1304.0+3704_daily_bin20.fits sctable="SC_DATA" expcube=/scratch/kocevski/183868/ltcube_244512001_244771201_4FGL_J1304.0+3704_daily_bin20.fits outfile=/scratch/kocevski/183868/expmap_244512001_244771201_4FGL_J1304.0+3704_daily_bin20.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/183868/ltcube_244512001_244771201_4FGL_J1304.0+3704_daily_bin20.fits
.....................!
real 192.23
user 186.61
sys 5.22

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 187 point sources and 0 extended sources

Setting source of interest to:
4FGL J1304.0+3704 @ 196.008 37.071

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/183868/ft1_filtered_4FGL_J1304.0+3704_daily_bin20.fits scfile=/scratch/kocevski/183868/ft2_4FGL_J1304.0+3704_daily_bin20.fits outfile=/scratch/kocevski/183868/cmap_244512001_244771201_4FGL_J1304.0+3704_daily_bin20.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=196.008 yref=37.071 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.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/183868/ft1_filtered_4FGL_J1304.0+3704_daily_bin20.fits scfile=/scratch/kocevski/183868/ft2_4FGL_J1304.0+3704_daily_bin20.fits outfile=/scratch/kocevski/183868/cmap_HighResolution_244512001_244771201_4FGL_J1304.0+3704_daily_bin20.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=196.008 yref=37.071 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.37
sys 0.17

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/183868/ft1_filtered_4FGL_J1304.0+3704_daily_bin20.fits evtable="EVENTS" scfile=/scratch/kocevski/183868/ft2_4FGL_J1304.0+3704_daily_bin20.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/183868/Model_4FGL_J1304.0+3704_daily_bin20.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/183868/ft1_filtered_4FGL_J1304.0+3704_daily_bin20.fits.....................!
real 39.78
user 38.40
sys 1.25

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/183868/ft1_filtered_4FGL_J1304.0+3704_daily_bin20.fits', '/scratch/kocevski/183868/ft2_4FGL_J1304.0+3704_daily_bin20.fits', expMap='/scratch/kocevski/183868/expmap_244512001_244771201_4FGL_J1304.0+3704_daily_bin20.fits', expCube='/scratch/kocevski/183868/ltcube_244512001_244771201_4FGL_J1304.0+3704_daily_bin20.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/183868/Model_4FGL_J1304.0+3704_daily_bin20.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1304.0+3704'

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  2.111e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-13)
314        Index:  2.436e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
315        Scale:  1.032e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/183868/ft1_filtered_4FGL_J1304.0+3704_daily_bin20.fits
Spacecraft file(s): /scratch/kocevski/183868/ft2_4FGL_J1304.0+3704_daily_bin20.fits
Exposure map: /scratch/kocevski/183868/expmap_244512001_244771201_4FGL_J1304.0+3704_daily_bin20.fits
Exposure cube: /scratch/kocevski/183868/ltcube_244512001_244771201_4FGL_J1304.0+3704_daily_bin20.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/183868/Model_4FGL_J1304.0+3704_daily_bin20.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) = 4200.97624232

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    4.2157       1.0000         .10000E-03   10000.    
     2 'Prefactor '    11.390       1.0000         .10000E-03   10000.    
     3 'Prefactor '    2.2910       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10017E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    3.6665       1.0000         .10000E-03   10000.    
     9 'norm      '    1.9971       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10011E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    24.220       1.0000         .10000E-03   10000.    
    13 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    14 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    9.2929       1.0000         .10000E-03   10000.    
    16 'norm      '    .31875E-02   1.0000         .10000E-03   10000.    
    17 'norm      '    .60921E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10296E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10023E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    43.066       1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10030E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10023E-03   1.0000         .10000E-03   10000.    
    25 'Prefactor '    20.717       1.0000         .10000E-03   10000.    
    26 'norm      '    .10018E-03   1.0000         .10000E-03   10000.    
    27 'Prefactor '    2.0247       1.0000         .10000E-03   10000.    
    28 'norm      '    .10016E-03   1.0000         .10000E-03   10000.    
    29 'Normalizat'    1.3914       1.0000         .10000E-01   10.000    
    30 'Prefactor '    .50628       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5990E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   4200.950     FROM MIGRAD    STATUS=CONVERGED    762 CALLS     3901 TOTAL
                     EDM=   .55E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  4.6%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          4.2159        4.7687       -.17308E-06    .12739E-04
   2  Prefactor     11.391        8.4240        .51420E-07   -.63254E-05
   3  Prefactor     2.2910        2.2503        .85627E-07    .70759E-05
   4  Prefactor     .10000E-03    5.8311       -.56014E-07** at limit **
   5  Prefactor     .10000E-03    29.756        .23722E-06** at limit **
   6  Prefactor     .10000E-03    6.5271        .25803E-06** at limit **
   7  Prefactor     .10000E-03    60.146        .10160E-05** at limit **
   8  Prefactor     3.6664        4.8157       -.46817E-07   -.52128E-05
   9  norm          1.9971        3.5288       -.27731E-06    .13412E-04
  10  Prefactor     .10000E-03    54.964       -.46721E-06** at limit **
  11  Prefactor     .10000E-03    17.770        .15285E-06** at limit **
  12  Prefactor     24.221        18.147        .16571E-06    .31149E-04
  13  norm          .10000E-03    1.9047       -.70243E-08** at limit **
  14  norm          .10000E-03    6.3142       -.24162E-06** at limit **
  15  norm          9.2761        4.7605        .41848E-06    .93370E-03
  16  norm          .10006E-03    39.209        .41177E-05** at limit **
  17  norm          .10111E-03    22.445       -.36662E-05** at limit **
  18  Prefactor     .10000E-03    3.4724        .18600E-06** at limit **
  19  Prefactor     .10000E-03    16.202       -.25840E-06** at limit **
  20  Prefactor     43.053        48.542       -.34337E-05   -.35388E-04
  21  Prefactor     .10000E-03    27.309        .76421E-06** at limit **
  22  Prefactor     .10000E-03    5.7745        .98740E-07** at limit **
  23  Prefactor     .10000E-03    34.034        .68202E-06** at limit **
  24  Prefactor     .10000E-03    16.432       -.26336E-06** at limit **
  25  Prefactor     20.715        81.737        .13695E-05    .30951E-06
  26  norm          .10000E-03    .79661        .13970E-06** at limit **
  27  Prefactor     2.0249        4.5320       -.93690E-06   -.11191E-03
  28  norm          .10000E-03    14.274        .10137E-06** at limit **
  29  Normalizat    1.3912        .21890       -.12549E-05    .48749E-04
  30  Prefactor     .50655        .25394        .16227E-05    .10581E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 4.21595
  Prefactor  = 11.3906
  Prefactor  = 2.29099
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.000100001
  Prefactor  = 3.66642
  norm       = 1.99708
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 24.2214
  norm       = 0.0001
  norm       = 0.0001
  norm       = 9.27609
  norm       = 0.000100061
  norm       = 0.000101106
  Prefactor  = 0.000100002
  Prefactor  = 0.0001
  Prefactor  = 43.0526
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 20.7152
  norm       = 0.0001
  Prefactor  = 2.02488
  norm       = 0.0001
  Normalizat = 1.39116
  Prefactor  = 0.506553
 **********
 **   18 **HESSE 
 **********

 FCN=   4200.950     FROM HESSE     STATUS=OK           586 CALLS     4487 TOTAL
                     EDM=   .12E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          4.2159        4.7552        .13838E-03   -1.5297    
   2  Prefactor     11.391        8.4255        .11871E-03   -1.5033    
   3  Prefactor     2.2910        2.2578        .89170E-04   -1.5405    
   4  Prefactor     .10000E-03    5.8496        .15284E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    29.825        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    6.5264        .16172E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    60.263        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     3.6664        4.8039        .15574E-03   -1.5325    
   9  norm          1.9971        3.4972        .15597E-03   -1.5425    
  10  Prefactor     .10000E-03    54.992        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    17.822        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     24.221        18.127        .81394E-04   -1.4723    
  13  norm          .10000E-03    1.9067        .87339E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          .10000E-03    6.3122        .15902E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          9.2761        4.8132        .96989E-04   -1.5099    
  16  norm          .10006E-03    46.820        .37221E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          .10111E-03    102.64        .25726E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10000E-03    6.3776        .22058E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .10000E-03    16.308        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     43.053        48.799        .61089E-04   -1.4395    
  21  Prefactor     .10000E-03    27.308        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     .10000E-03    5.7817        .15214E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .10000E-03    34.199        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     .10000E-03    16.543        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     20.715        82.421        .87998E-04   -1.4797    
  26  norm          .10000E-03    1.2564        .11229E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  27  Prefactor     2.0249        4.4787        .19817E-03   -1.5423    
  28  norm          .10000E-03    14.326        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  29  Normalizat    1.3912        .24019        .19551E-03   -.80885    
  30  Prefactor     .50655        .27668        .37232E-03   -1.1168    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.18509e-08
Minuit parameter uncertainties:
  1  4.75559
  2  8.42639
  3  2.25787
  4  2.67103e-06
  5  7.79435e-05
  6  3.10509e-05
  7  0.000364844
  8  4.80441
  9  3.49761
  10  0.000103119
  11  5.35906e-05
  12  18.131
  13  1.59162e-06
  14  2.36358e-05
  15  4.81341
  16  0.00338451
  17  0.0213456
  18  0.000245308
  19  1.63435e-05
  20  48.8441
  21  0.000186791
  22  1.72942e-05
  23  1.16692e-05
  24  2.34633e-05
  25  82.8409
  26  1.54028e-06
  27  4.47945
  28  2.33955e-05
  29  0.240381
  30  0.27742
Done.

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

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  2.422e+01  1.813e+01  1.000e-04  1.000e+04 ( 1.000e-13)
314        Index:  2.436e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
315        Scale:  1.032e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
596    Prefactor:  5.066e-01  2.774e-01  0.000e+00  1.000e+01 ( 1.000e+00)
597        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
598        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
595   Normalization:  1.391e+00  2.404e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 3.27
Ra Dec: 196.008 37.071
Photon Index (Fixed Index): 2.44 +/- 0.00
Photon Flux (Fixed Index): 4.97e-08 +/- 3.72e-08
Energy Flux (Fixed Index): 1.56e-05 +/- 1.16e-05

TS (Fixed Index): 3.27
Ra Dec: 196.008 37.071
Photon Flux Upper Limit: 1.34e-07 ph cm-2 s-1
Energy Flux Upper Limit: 1.04e-02 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/183868/likelihoodResults_244512001_244771201_4FGL_J1304.0+3704_daily_bin20.txt

Performing a free index iterative likelihood fit...

Freezing all point sources, except source of interest...

Done.

Freeing candidate source...
Done.

Fit tolerance = 1

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 4200.94836957
delta logL = 0.00135028019304

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 4200.94669904
delta logL = 0.00302080989786

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    22.774       1.0000         .10000E-03   10000.    
     2 'Index     '    2.4994       1.0000          .0000       10.000    
     3 'Normalizat'    1.3882       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .50824       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5990E+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=   4200.947     FROM MIGRAD    STATUS=CONVERGED     79 CALLS      248 TOTAL
                     EDM=   .40E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     22.762        27.309        .83935E-04    .15893E-03
   2  Index         2.4988        .87828        .58708E-02    .30157E-04
   3  Normalizat    1.3879        .23286        .19570E-03   -.12869E-02
   4  Prefactor     .50954        .27695        .37131E-03   -.98431E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 22.7615
  Index      = 2.49885
  Normalizat = 1.38788
  Prefactor  = 0.509536
 **********
 **   18 **HESSE 
 **********

 FCN=   4200.947     FROM HESSE     STATUS=OK            25 CALLS      273 TOTAL
                     EDM=   .40E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     22.762        25.402        .16787E-04   -1.4753    
   2  Index         2.4988        .81695        .23483E-03   -.52386    
   3  Normalizat    1.3879        .23235        .39139E-04   -.80980    
   4  Prefactor     .50954        .27656        .74261E-04   -1.1154    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.01998e-09
Minuit parameter uncertainties:
  1  25.4144
  2  0.821877
  3  0.23253
  4  0.277297
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/183868': 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) = 4200.94667192
delta logL = 0.00304793692339

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  2.276e+01  2.541e+01  1.000e-04  1.000e+04 ( 1.000e-13)
314        Index:  2.499e+00  8.219e-01  0.000e+00  1.000e+01 (-1.000e+00)
315        Scale:  1.032e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
596    Prefactor:  5.095e-01  2.773e-01  0.000e+00  1.000e+01 ( 1.000e+00)
597        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
598        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
595   Normalization:  1.388e+00  2.325e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 3.28
Ra Dec: 196.008 37.071
Photon Index (Free Index): 2.50 +/- 0.82
Photon Flux (Free Index): 5.18e-08 +/- 4.66e-08
Energy Flux (Free Index): 1.51e-05 +/- 1.25e-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/183868/cmap_HighResolution_244512001_244771201_4FGL_J1304.0+3704_daily_bin20.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.04e-02', comment='SUCCESS', photon_flux='4.97e-08', energy_flux2='1.51e-05', photon_flux_error='3.72e-08', dlogl='3.05e-03', energy_flux='1.56e-05', photon_flux2='5.18e-08', job_status='DONE', time_completed='2021-09-06 19:37:27.047767', photon_index_error2='0.82', photon_index2='2.50', ts='3.27', fit_tolerance='1e-08', GAL='0.51', photon_index_error='0.00', photon_flux_upper_limit='1.34e-07', energy_flux_error2='1.25e-05', EG='1.39', time_epoch_completed='1630982247.05', return_code='0', job_id='183868', GAL2='0.51', EG2='1.39', return_code2='0', energy_flux_error='1.16e-05', photon_flux_error2='4.66e-08', ts2='3.28', photon_index='2.44' WHERE bin_id='20' AND source_name='4FGL J1304.0+3704' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 19:37:27 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0153>
Subject: Job 183868: <4FGL_J1304.0+3704_daily_bin20> in cluster <slac> Done

Job <4FGL_J1304.0+3704_daily_bin20> was submitted from host <rhel6-64e> by user <kocevski> in cluster <slac> at Mon Sep  6 19:25:35 2021
Job was executed on host(s) <bullet0153>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep  6 19:25:42 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Mon Sep  6 19:25:42 2021
Terminated at Mon Sep  6 19:37:27 2021
Results reported at Mon Sep  6 19:37:27 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1304.0+3704_daily_bin20 196.008 37.071 244512001 244771201 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1304.0+3704 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   687.22 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             341.46 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   705 sec.
    Turnaround time :                            712 sec.

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

