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


Performing analysis on: 4FGL_J1304.0+3704_daily_bin925
RA = 196.008, Dec = 37.071
tmin = 479088001, tmax = 479347201
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='192202', job_status='RUN', time_executed='2021-09-06 19:57:54.690960', time_epoch_executed='1630983474.69' WHERE source_name='4FGL J1304.0+3704' and cadence='daily' and bin_id='925'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/192202

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/192202/ft1_4FGL_J1304.0+3704_daily_bin925.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/192202/ft2_4FGL_J1304.0+3704_daily_bin925.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/192202/ft1_4FGL_J1304.0+3704_daily_bin925.fits outfile=/scratch/kocevski/192202/ft1_filteredMKT_4FGL_J1304.0+3704_daily_bin925.fits ra=196.008 dec=37.071 rad=12.0 tmin=479088001.0 tmax=479347201.0 emin=100.0 emax=100000.0 zmin=0.0 zmax=90.0 evclass=128 evtype="INDEF" convtype=-1 phasemin=0.0 phasemax=1.0 evtable="EVENTS" chatter=2 clobber=yes debug=no gui=no mode="ql"

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

Done.
real 3.49
user 3.27
sys 0.20

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/192202/ft1_filtered_4FGL_J1304.0+3704_daily_bin925.fits" evtable="EVENTS" scfile=/scratch/kocevski/192202/ft2_4FGL_J1304.0+3704_daily_bin925.fits sctable="SC_DATA" outfile=/scratch/kocevski/192202/ltcube_479088001_479347201_4FGL_J1304.0+3704_daily_bin925.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/192202/ft2_4FGL_J1304.0+3704_daily_bin925.fits
.....................!
real 15.66
user 15.26
sys 0.35

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/192202/ft1_filtered_4FGL_J1304.0+3704_daily_bin925.fits evtable="EVENTS" scfile=/scratch/kocevski/192202/ft2_4FGL_J1304.0+3704_daily_bin925.fits sctable="SC_DATA" expcube=/scratch/kocevski/192202/ltcube_479088001_479347201_4FGL_J1304.0+3704_daily_bin925.fits outfile=/scratch/kocevski/192202/expmap_479088001_479347201_4FGL_J1304.0+3704_daily_bin925.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/192202/ltcube_479088001_479347201_4FGL_J1304.0+3704_daily_bin925.fits
.....................!
real 192.35
user 186.52
sys 5.29

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/192202/ft1_filtered_4FGL_J1304.0+3704_daily_bin925.fits scfile=/scratch/kocevski/192202/ft2_4FGL_J1304.0+3704_daily_bin925.fits outfile=/scratch/kocevski/192202/cmap_479088001_479347201_4FGL_J1304.0+3704_daily_bin925.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.57
user 0.38
sys 0.17

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/192202/ft1_filtered_4FGL_J1304.0+3704_daily_bin925.fits scfile=/scratch/kocevski/192202/ft2_4FGL_J1304.0+3704_daily_bin925.fits outfile=/scratch/kocevski/192202/cmap_HighResolution_479088001_479347201_4FGL_J1304.0+3704_daily_bin925.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.58
user 0.40
sys 0.15

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    18.047       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .11571       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    14.747       1.0000         .10000E-03   10000.    
     5 'Prefactor '    64.570       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .15063E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    1.4126       1.0000         .10000E-03   10000.    
     9 'norm      '    12.447       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10028E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10011E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    2.5820       1.0000         .10000E-03   10000.    
    14 'norm      '    20.581       1.0000         .10000E-03   10000.    
    15 'norm      '    5.4586       1.0000         .10000E-03   10000.    
    16 'norm      '    .10009E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    .10002E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    1.6093       1.0000         .10000E-03   10000.    
    19 'Prefactor '    .34918       1.0000         .10000E-03   10000.    
    20 'Prefactor '    92.306       1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10015E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    .20716E-02   1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    39.261       1.0000         .10000E-03   10000.    
    25 'Prefactor '    23.539       1.0000         .10000E-03   10000.    
    26 'norm      '    1.5524       1.0000         .10000E-03   10000.    
    27 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    28 'norm      '    25.538       1.0000         .10000E-03   10000.    
    29 'Normalizat'    .88461       1.0000         .10000E-01   10.000    
    30 'Prefactor '    .88742       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=   4913.017     FROM MIGRAD    STATUS=CONVERGED    782 CALLS     4042 TOTAL
                     EDM=   .50E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  3.1%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          18.047        5.7692       -.15947E-07    .60839E-04
   2  Prefactor     .12267        5.7221        .11193E-05    .28251E-03
   3  Prefactor     .10000E-03    1.1773        .31922E-06** at limit **
   4  Prefactor     14.748        10.536        .29217E-06   -.76256E-06
   5  Prefactor     64.568        42.387        .16175E-06    .16563E-04
   6  Prefactor     .10000E-03    6.4629        .24472E-06** at limit **
   7  Prefactor     .10001E-03    1119.0        .25812E-04** at limit **
   8  Prefactor     1.4126        3.3465        .42475E-06   -.12480E-03
   9  norm          12.447        5.8952        .85777E-06   -.11912E-03
  10  Prefactor     .10000E-03    20.091        .70342E-06** at limit **
  11  Prefactor     .10000E-03    11.458        .24124E-05** at limit **
  12  Prefactor     .10000E-03    5.3105        .48012E-06** at limit **
  13  norm          2.5819        2.6953        .22606E-07   -.55769E-04
  14  norm          20.582        15.378        .45239E-07    .15578E-04
  15  norm          5.4583        3.5214       -.43705E-06   -.35676E-03
  16  norm          .10000E-03    5.4254        .11977E-05** at limit **
  17  norm          .10000E-03    3.4309        .25625E-06** at limit **
  18  Prefactor     1.6092        1.8425       -.21582E-06   -.22724E-03
  19  Prefactor     .36401        10.123        .65390E-06   -.39051E-03
  20  Prefactor     92.319        51.296        .36190E-06   -.10740E-04
  21  Prefactor     .10000E-03    16.237        .51385E-07** at limit **
  22  Prefactor     .10004E-03    176.68        .20044E-04** at limit **
  23  Prefactor     .10000E-03    37.559       -.90661E-07** at limit **
  24  Prefactor     39.266        33.433       -.41092E-05   -.18606E-03
  25  Prefactor     23.538        54.550       -.60187E-07    .40394E-05
  26  norm          1.5525        1.6565        .12201E-06   -.52507E-04
  27  Prefactor     .10000E-03    3.6871        .88987E-06** at limit **
  28  norm          25.539        16.720        .17521E-07    .20344E-04
  29  Normalizat    .88446        .17530       -.13219E-05   -.54218E-04
  30  Prefactor     .88757        .21305       -.98666E-06   -.54793E-05
                               ERR DEF=  .500    
Final values: 
  norm       = 18.0475
  Prefactor  = 0.122668
  Prefactor  = 0.0001
  Prefactor  = 14.7479
  Prefactor  = 64.5677
  Prefactor  = 0.0001
  Prefactor  = 0.000100006
  Prefactor  = 1.41255
  norm       = 12.4466
  Prefactor  = 0.0001
  Prefactor  = 0.000100001
  Prefactor  = 0.0001
  norm       = 2.58186
  norm       = 20.5817
  norm       = 5.45828
  norm       = 0.0001
  norm       = 0.0001
  Prefactor  = 1.6092
  Prefactor  = 0.364011
  Prefactor  = 92.3187
  Prefactor  = 0.0001
  Prefactor  = 0.00010004
  Prefactor  = 0.0001
  Prefactor  = 39.2657
  Prefactor  = 23.5381
  norm       = 1.55253
  Prefactor  = 0.0001
  norm       = 25.5393
  Normalizat = 0.884456
  Prefactor  = 0.887567
 **********
 **   18 **HESSE 
 **********

 FCN=   4913.017     FROM HESSE     STATUS=OK           594 CALLS     4636 TOTAL
                     EDM=   .43E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          18.047        5.7566        .91825E-04   -1.4858    
   2  Prefactor     .12267        33.734        .29751E-02   -1.5638    
   3  Prefactor     .10000E-03    1.1819        .74102E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     14.748        10.535        .10430E-03   -1.4940    
   5  Prefactor     64.568        42.483        .49942E-04   -1.4099    
   6  Prefactor     .10000E-03    6.4657        .17403E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10001E-03    1113.4        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     1.4126        3.2917        .19166E-03   -1.5470    
   9  norm          12.447        5.8797        .11142E-03   -1.5002    
  10  Prefactor     .10000E-03    20.092        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    11.376        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    5.3207        .15771E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          2.5819        2.7000        .11445E-03   -1.5387    
  14  norm          20.582        15.382        .88288E-04   -1.4800    
  15  norm          5.4583        3.5007        .99799E-04   -1.5241    
  16  norm          .10000E-03    5.4675        .15880E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          .10000E-03    3.4801        .12660E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     1.6092        1.8250        .97082E-04   -1.5454    
  19  Prefactor     .36401        53.031        .40041E-02   -1.5587    
  20  Prefactor     92.319        51.254        .41828E-04   -1.3783    
  21  Prefactor     .10000E-03    16.240        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     .10004E-03    178.02        .51089E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .10000E-03    37.624        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     39.266        32.861        .63969E-04   -1.4454    
  25  Prefactor     23.538        54.648        .82562E-04   -1.4737    
  26  norm          1.5525        1.6416        .88983E-04   -1.5459    
  27  Prefactor     .10000E-03    3.7728        .13141E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  norm          25.539        16.728        .79270E-04   -1.4697    
  29  Normalizat    .88446        .20322        .22483E-03   -.97009    
  30  Prefactor     .88757        .24708        .28266E-03   -.96577    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.34495e-09
Minuit parameter uncertainties:
  1  5.75677
  2  4.06913
  3  5.13595e-06
  4  10.5361
  5  42.5032
  6  1.08464e-05
  7  0.00544714
  8  3.29214
  9  5.87999
  10  5.58946e-05
  11  0.0001966
  12  2.00788e-05
  13  2.70012
  14  15.3847
  15  3.50087
  16  1.38217e-05
  17  1.03249e-05
  18  1.82504
  19  8.79393
  20  51.2788
  21  5.07117e-06
  22  0.00538381
  23  1.09437e-05
  24  32.8759
  25  54.7649
  26  1.64169
  27  2.03841e-05
  28  16.7315
  29  0.203395
  30  0.247392
Done.

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

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  1.000e-04  2.008e-05  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:  8.876e-01  2.474e-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:  8.845e-01  2.034e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 196.008 37.071
Photon Flux Upper Limit: 4.89e-08 ph cm-2 s-1
Energy Flux Upper Limit: 3.79e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/192202/likelihoodResults_479088001_479347201_4FGL_J1304.0+3704_daily_bin925.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) = 4913.01804892
delta logL = -0.00089299838055

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 4913.01715591
delta logL = 1.95213942789e-08

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10169E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.4140       1.0000          .0000       10.000    
     3 'Normalizat'    .88445       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .88759       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=   4913.017     FROM MIGRAD    STATUS=CONVERGED     90 CALLS      238 TOTAL
                     EDM=   .12E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10372E-03    5.5662        .16078E-01** at limit **
   2  Index         2.2984        6.1915        .50000        .27492E-04
   3  Normalizat    .88446        .40160E-02    .22483E-03    .13587E-03
   4  Prefactor     .88757        .50860E-02    .28266E-03    .57233E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000103721
  Index      = 2.29845
  Normalizat = 0.884457
  Prefactor  = 0.887565
 **********
 **   18 **HESSE 
 **********

 FCN=   4913.017     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      267 TOTAL
                     EDM=   .19E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10372E-03    88.561        .16668E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.2984        7.9096        .50000       -.57081    
   3  Normalizat    .88446        .16225E-01    .89933E-05   -.97008    
   4  Prefactor     .88757        .20548E-01    .11306E-04   -.96577    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 1.94416e-08
Minuit parameter uncertainties:
  1  0.0363621
  2  463.051
  3  0.0162249
  4  0.0205479
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/192202': 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): 102
logL (Free Index) = 4913.01715522
delta logL = 7.03276782588e-07

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  1.037e-04  3.636e-02  1.000e-04  1.000e+04 ( 1.000e-13)
314        Index:  2.298e+00  4.631e+02  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:  8.876e-01  2.055e-02  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:  8.845e-01  1.622e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
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/192202/cmap_HighResolution_479088001_479347201_4FGL_J1304.0+3704_daily_bin925.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='3.79e-03', job_status='DONE', photon_flux_upper_limit='4.89e-08', time_completed='2021-09-06 20:11:05.669899', job_id='192202', GAL2='0.89', fit_tolerance='1e-08', EG2='0.88', EG='0.88', time_epoch_completed='1630984265.67', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.89', dlogl='7.03e-07', ts2='-0.00', photon_index_error='0.00', photon_index='2.44' WHERE bin_id='925' AND source_name='4FGL J1304.0+3704' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 20:11:05 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0230>
Subject: Job 192202: <4FGL_J1304.0+3704_daily_bin925> in cluster <slac> Done

Job <4FGL_J1304.0+3704_daily_bin925> was submitted from host <rhel6-64e> by user <kocevski> in cluster <slac> at Mon Sep  6 19:55:22 2021
Job was executed on host(s) <bullet0230>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep  6 19:55:24 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:55:24 2021
Terminated at Mon Sep  6 20:11:06 2021
Results reported at Mon Sep  6 20:11:06 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1304.0+3704_daily_bin925 196.008 37.071 479088001 479347201 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 :                                   788.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             296.00 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   941 sec.
    Turnaround time :                            944 sec.

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

