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


Performing analysis on: 4FGL_J1304.0+3704_daily_bin905
RA = 196.008, Dec = 37.071
tmin = 473904001, tmax = 474163201
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='191003', job_status='RUN', time_executed='2021-09-06 19:55:17.397845', time_epoch_executed='1630983317.4' WHERE source_name='4FGL J1304.0+3704' and cadence='daily' and bin_id='905'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/191003

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/191003/ft1_4FGL_J1304.0+3704_daily_bin905.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/191003/ft2_4FGL_J1304.0+3704_daily_bin905.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/191003/ft1_4FGL_J1304.0+3704_daily_bin905.fits outfile=/scratch/kocevski/191003/ft1_filteredMKT_4FGL_J1304.0+3704_daily_bin905.fits ra=196.008 dec=37.071 rad=12.0 tmin=473904001.0 tmax=474163201.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.12
user 4.83
sys 0.25

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/191003/ft2_4FGL_J1304.0+3704_daily_bin905.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/191003/ft1_filteredMKT_4FGL_J1304.0+3704_daily_bin905.fits evtable="EVENTS" outfile="/scratch/kocevski/191003/ft1_filtered_4FGL_J1304.0+3704_daily_bin905.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.51
user 0.34
sys 0.16

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/191003/ft1_filtered_4FGL_J1304.0+3704_daily_bin905.fits" evtable="EVENTS" scfile=/scratch/kocevski/191003/ft2_4FGL_J1304.0+3704_daily_bin905.fits sctable="SC_DATA" outfile=/scratch/kocevski/191003/ltcube_473904001_474163201_4FGL_J1304.0+3704_daily_bin905.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/191003/ft2_4FGL_J1304.0+3704_daily_bin905.fits
.....................!
real 16.40
user 15.99
sys 0.34

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/191003/ft1_filtered_4FGL_J1304.0+3704_daily_bin905.fits evtable="EVENTS" scfile=/scratch/kocevski/191003/ft2_4FGL_J1304.0+3704_daily_bin905.fits sctable="SC_DATA" expcube=/scratch/kocevski/191003/ltcube_473904001_474163201_4FGL_J1304.0+3704_daily_bin905.fits outfile=/scratch/kocevski/191003/expmap_473904001_474163201_4FGL_J1304.0+3704_daily_bin905.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/191003/ltcube_473904001_474163201_4FGL_J1304.0+3704_daily_bin905.fits
.....................!
real 191.25
user 185.49
sys 5.25

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/191003/ft1_filtered_4FGL_J1304.0+3704_daily_bin905.fits scfile=/scratch/kocevski/191003/ft2_4FGL_J1304.0+3704_daily_bin905.fits outfile=/scratch/kocevski/191003/cmap_473904001_474163201_4FGL_J1304.0+3704_daily_bin905.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.39
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/191003/ft1_filtered_4FGL_J1304.0+3704_daily_bin905.fits scfile=/scratch/kocevski/191003/ft2_4FGL_J1304.0+3704_daily_bin905.fits outfile=/scratch/kocevski/191003/cmap_HighResolution_473904001_474163201_4FGL_J1304.0+3704_daily_bin905.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.59
user 0.39
sys 0.16

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

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/191003/ft1_filtered_4FGL_J1304.0+3704_daily_bin905.fits', '/scratch/kocevski/191003/ft2_4FGL_J1304.0+3704_daily_bin905.fits', expMap='/scratch/kocevski/191003/expmap_473904001_474163201_4FGL_J1304.0+3704_daily_bin905.fits', expCube='/scratch/kocevski/191003/ltcube_473904001_474163201_4FGL_J1304.0+3704_daily_bin905.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/191003/Model_4FGL_J1304.0+3704_daily_bin905.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/191003/ft1_filtered_4FGL_J1304.0+3704_daily_bin905.fits
Spacecraft file(s): /scratch/kocevski/191003/ft2_4FGL_J1304.0+3704_daily_bin905.fits
Exposure map: /scratch/kocevski/191003/expmap_473904001_474163201_4FGL_J1304.0+3704_daily_bin905.fits
Exposure cube: /scratch/kocevski/191003/ltcube_473904001_474163201_4FGL_J1304.0+3704_daily_bin905.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/191003/Model_4FGL_J1304.0+3704_daily_bin905.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) = 3764.44262678

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    2.6599       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    4.1959       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10007E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    15.741       1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    .10014E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10093E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    15.247       1.0000         .10000E-03   10000.    
    13 'norm      '    3.1339       1.0000         .10000E-03   10000.    
    14 'norm      '    13.367       1.0000         .10000E-03   10000.    
    15 'norm      '    .17066E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    5.5241       1.0000         .10000E-03   10000.    
    17 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .11093E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    44.909       1.0000         .10000E-03   10000.    
    20 'Prefactor '    26.366       1.0000         .10000E-03   10000.    
    21 'Prefactor '    83.352       1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10107E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
    25 'Prefactor '    4.5206       1.0000         .10000E-03   10000.    
    26 'norm      '    3.1748       1.0000         .10000E-03   10000.    
    27 'Prefactor '    .99503E-01   1.0000         .10000E-03   10000.    
    28 'norm      '    .10004E-03   1.0000         .10000E-03   10000.    
    29 'Normalizat'    .74143       1.0000         .10000E-01   10.000    
    30 'Prefactor '    1.3369       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=   3764.397     FROM MIGRAD    STATUS=CONVERGED    778 CALLS     3983 TOTAL
                     EDM=   .17E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .6%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          2.6600        3.4653        .83990E-07   -.46907E-06
   2  Prefactor     .10000E-03    2.6617        .30971E-07** at limit **
   3  Prefactor     4.1954        3.1495        .37117E-07   -.13042E-04
   4  Prefactor     .10000E-03    5.5051        .39570E-06** at limit **
   5  Prefactor     .10000E-03    16.719       -.14143E-06** at limit **
   6  Prefactor     .10000E-03    10.076        .71741E-07** at limit **
   7  Prefactor     15.943        160.09       -.39139E-05   -.26906E-04
   8  Prefactor     .10000E-03    13.583        .31279E-06** at limit **
   9  norm          .10000E-03    2.2846        .16471E-05** at limit **
  10  Prefactor     .10000E-03    36.787       -.21820E-06** at limit **
  11  Prefactor     .10000E-03    22.679        .24863E-05** at limit **
  12  Prefactor     15.246        26.758       -.98569E-06   -.16349E-03
  13  norm          3.1311        8.9381        .60639E-06   -.25181E-03
  14  norm          13.362        18.282        .51143E-07   -.12900E-05
  15  norm          .10008E-03    4.6705        .35731E-05** at limit **
  16  norm          5.5304        5.6805       -.16321E-05   -.20958E-02
  17  norm          .10000E-03    2.0735       -.11099E-06** at limit **
  18  Prefactor     .10000E-03    5.3022       -.99369E-06** at limit **
  19  Prefactor     44.908        22.482       -.63653E-06   -.76104E-03
  20  Prefactor     26.359        43.886        .17358E-05    .15366E-04
  21  Prefactor     83.285        72.500       -.13216E-06   -.90775E-04
  22  Prefactor     .10000E-03    5.7756       -.76343E-07** at limit **
  23  Prefactor     .10000E-03    129.08       -.14962E-05** at limit **
  24  Prefactor     .10000E-03    9.4003       -.73306E-07** at limit **
  25  Prefactor     4.4168        145.20       -.29166E-05   -.18413E-04
  26  norm          3.1747        1.7091        .17300E-07    .74017E-05
  27  Prefactor     .76484E-01    3.1755        .73477E-07   -.22149E-04
  28  norm          .10000E-03    7.3247       -.41986E-06** at limit **
  29  Normalizat    .74150        .20904       -.80051E-06   -.40643E-03
  30  Prefactor     1.3369        .26386        .29468E-06   -.36559E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 2.66001
  Prefactor  = 0.0001
  Prefactor  = 4.19545
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 15.9426
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 15.2459
  norm       = 3.13111
  norm       = 13.3622
  norm       = 0.000100083
  norm       = 5.53044
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 44.908
  Prefactor  = 26.3586
  Prefactor  = 83.2845
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 4.41684
  norm       = 3.17468
  Prefactor  = 0.0764845
  norm       = 0.0001
  Normalizat = 0.741499
  Prefactor  = 1.3369
 **********
 **   18 **HESSE 
 **********

 FCN=   3764.397     FROM HESSE     STATUS=OK           578 CALLS     4561 TOTAL
                     EDM=   .25E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          2.6600        3.4620        .12353E-03   -1.5382    
   2  Prefactor     .10000E-03    2.6683        .97760E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     4.1954        3.1544        .89294E-04   -1.5298    
   4  Prefactor     .10000E-03    5.5072        .14055E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    16.730        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    10.081        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     15.943        158.96        .10095E-03   -1.4909    
   8  Prefactor     .10000E-03    13.977        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          .10000E-03    2.2221        .89176E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    36.809        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    22.573        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     15.246        26.318        .10257E-03   -1.4927    
  13  norm          3.1311        8.7409        .22900E-03   -1.5354    
  14  norm          13.362        18.300        .10956E-03   -1.4977    
  15  norm          .10008E-03    11.171        .19450E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          5.5304        5.9136        .14884E-03   -1.5238    
  17  norm          .10000E-03    2.0785        .86265E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10000E-03    5.3111        .27155E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     44.908        22.431        .59827E-04   -1.4367    
  20  Prefactor     26.359        43.808        .78017E-04   -1.4681    
  21  Prefactor     83.285        72.464        .21999E-03   -1.3880    
  22  Prefactor     .10000E-03    5.7812        .14401E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .10000E-03    130.11        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     .10000E-03    9.4075        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     4.4168        147.19        .18935E-03   -1.5288    
  26  norm          3.1747        1.7089        .57151E-04   -1.5352    
  27  Prefactor     .76484E-01    41.601        .21152E-02   -1.5653    
  28  norm          .10000E-03    7.3263        .16211E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  29  Normalizat    .74150        .24941        .25384E-03   -1.0228    
  30  Prefactor     1.3369        .31586        .25450E-03   -.82216    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.45029e-08
Minuit parameter uncertainties:
  1  3.46229
  2  7.98024e-07
  3  3.15457
  4  8.63618e-06
  5  5.56803e-06
  6  5.08936e-06
  7  101.031
  8  3.13912e-05
  9  1.42637e-05
  10  2.51987e-05
  11  5.95768e-05
  12  26.3375
  13  8.74451
  14  18.3076
  15  0.00192132
  16  5.91425
  17  1.8205e-06
  18  1.50437e-05
  19  22.4349
  20  43.8611
  21  72.5405
  22  1.91865e-06
  23  0.000159671
  24  5.98147e-06
  25  51.1319
  26  1.70892
  27  3.56768
  28  4.02322e-06
  29  0.249791
  30  0.316318
Done.

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

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  1.525e+01  2.634e+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:  1.337e+00  3.163e-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:  7.415e-01  2.498e-01  1.000e-02  1.000e+01 ( 1.000e+00)


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

Saving results to:
/scratch/kocevski/191003/likelihoodResults_473904001_474163201_4FGL_J1304.0+3704_daily_bin905.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) = 3764.34029882
delta logL = 0.0563086535876

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 3764.33915366
delta logL = 0.0574538194423

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    11.043       1.0000         .10000E-03   10000.    
     2 'Index     '    2.7587       1.0000          .0000       10.000    
     3 'Normalizat'    .73109       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.3454       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=   3764.339     FROM MIGRAD    STATUS=CONVERGED     83 CALLS      265 TOTAL
                     EDM=   .32E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     11.049        24.828        .12056E-03   -.52515E-03
   2  Index         2.7585        1.1269        .73243E-02   -.19193E-03
   3  Normalizat    .73109        .24401        .25547E-03    .92734E-03
   4  Prefactor     1.3454        .31503        .25380E-03    .91897E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 11.0493
  Index      = 2.75855
  Normalizat = 0.73109
  Prefactor  = 1.34536
 **********
 **   18 **HESSE 
 **********

 FCN=   3764.339     FROM HESSE     STATUS=OK            25 CALLS      290 TOTAL
                     EDM=   .34E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     11.049        21.880        .48224E-05   -1.5043    
   2  Index         2.7585        .99419        .29297E-03   -.46485    
   3  Normalizat    .73109        .24421        .51093E-04   -1.0268    
   4  Prefactor     1.3454        .31509        .50760E-04   -.81968    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.35003e-09
Minuit parameter uncertainties:
  1  21.8956
  2  1.00258
  3  0.244577
  4  0.31554
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/191003': 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) = 3764.3391536
delta logL = 0.0574538741062

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  1.105e+01  2.190e+01  1.000e-04  1.000e+04 ( 1.000e-13)
314        Index:  2.759e+00  1.003e+00  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:  1.345e+00  3.155e-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:  7.311e-01  2.446e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.56
Ra Dec: 196.008 37.071

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/191003/cmap_HighResolution_473904001_474163201_4FGL_J1304.0+3704_daily_bin905.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.07e-02', job_status='DONE', photon_flux_upper_limit='1.38e-07', time_completed='2021-09-06 20:06:36.853750', job_id='191003', GAL2='1.35', fit_tolerance='1e-08', EG2='0.73', EG='0.74', time_epoch_completed='1630983996.85', return_code2='0', ts='0.56', comment='SUCCESS', return_code='0', GAL='1.34', dlogl='5.75e-02', ts2='0.68', photon_index_error='0.00', photon_index='2.44' WHERE bin_id='905' AND source_name='4FGL J1304.0+3704' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 20:06:36 PDT 2021


------------------------------------------------------------
Sender: LSF System <scs@bullet0140>
Subject: Job 191003: <4FGL_J1304.0+3704_daily_bin905> in cluster <slac> Done

Job <4FGL_J1304.0+3704_daily_bin905> was submitted from host <rhel6-64j> by user <kocevski> in cluster <slac> at Mon Sep  6 19:50:34 2021
Job was executed on host(s) <bullet0140>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep  6 19:51:35 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:51:35 2021
Terminated at Mon Sep  6 20:06:37 2021
Results reported at Mon Sep  6 20:06:37 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1304.0+3704_daily_bin905 196.008 37.071 473904001 474163201 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 :                                   677.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             287.21 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              7
    Max Threads :                                21
    Run time :                                   902 sec.
    Turnaround time :                            963 sec.

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

