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


Performing analysis on: 4FGL_J1304.0+3704_daily_bin654
RA = 196.008, Dec = 37.071
tmin = 408844801, tmax = 409104001
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='189580', job_status='RUN', time_executed='2021-09-06 19:49:43.310284', time_epoch_executed='1630982983.31' WHERE source_name='4FGL J1304.0+3704' and cadence='daily' and bin_id='654'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/189580

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/189580/ft1_4FGL_J1304.0+3704_daily_bin654.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/189580/ft2_4FGL_J1304.0+3704_daily_bin654.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/189580/ft1_4FGL_J1304.0+3704_daily_bin654.fits outfile=/scratch/kocevski/189580/ft1_filteredMKT_4FGL_J1304.0+3704_daily_bin654.fits ra=196.008 dec=37.071 rad=12.0 tmin=408844801.0 tmax=409104001.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.45
user 4.14
sys 0.26

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/189580/ft1_filtered_4FGL_J1304.0+3704_daily_bin654.fits evtable="EVENTS" scfile=/scratch/kocevski/189580/ft2_4FGL_J1304.0+3704_daily_bin654.fits sctable="SC_DATA" expcube=/scratch/kocevski/189580/ltcube_408844801_409104001_4FGL_J1304.0+3704_daily_bin654.fits outfile=/scratch/kocevski/189580/expmap_408844801_409104001_4FGL_J1304.0+3704_daily_bin654.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/189580/ltcube_408844801_409104001_4FGL_J1304.0+3704_daily_bin654.fits
.....................!
real 193.99
user 187.89
sys 5.39

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/189580/ft1_filtered_4FGL_J1304.0+3704_daily_bin654.fits scfile=/scratch/kocevski/189580/ft2_4FGL_J1304.0+3704_daily_bin654.fits outfile=/scratch/kocevski/189580/cmap_408844801_409104001_4FGL_J1304.0+3704_daily_bin654.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.62
user 0.41
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/189580/ft1_filtered_4FGL_J1304.0+3704_daily_bin654.fits scfile=/scratch/kocevski/189580/ft2_4FGL_J1304.0+3704_daily_bin654.fits outfile=/scratch/kocevski/189580/cmap_HighResolution_408844801_409104001_4FGL_J1304.0+3704_daily_bin654.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.62
user 0.42
sys 0.18

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    8.4771       1.0000         .10000E-03   10000.    
     2 'Prefactor '    16.878       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    22.368       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    242.25       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    14 'norm      '    .10005E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    11.291       1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    25 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    26 'norm      '    10.622       1.0000         .10000E-03   10000.    
    27 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    28 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    29 'Normalizat'    1.2845       1.0000         .10000E-01   10.000    
    30 'Prefactor '    .93702       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=   1292.080     FROM MIGRAD    STATUS=CONVERGED    738 CALLS     4442 TOTAL
                     EDM=   .24E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .4%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          8.4737        6.3030       -.13486E-05    .34008E-05
   2  Prefactor     16.879        20.659       -.62702E-06    .33310E-05
   3  Prefactor     .10000E-03    3.0530        .18916E-06** at limit **
   4  Prefactor     22.367        21.414       -.44405E-06    .43135E-05
   5  Prefactor     .10000E-03    94.705        .48875E-05** at limit **
   6  Prefactor     .10000E-03    93.552        .15359E-05** at limit **
   7  Prefactor     .10000E-03    45.704        .13361E-04** at limit **
   8  Prefactor     .10000E-03    11.435        .49195E-05** at limit **
   9  norm          .10000E-03    3.8348       -.61743E-08** at limit **
  10  Prefactor     242.15        361.38       -.61771E-04    .42716E-05
  11  Prefactor     .10000E-03    25.422        .16361E-05** at limit **
  12  Prefactor     .10000E-03    40.371        .20217E-04** at limit **
  13  norm          .10000E-03    9.5845        .14097E-05** at limit **
  14  norm          .10000E-03    48.827        .17830E-05** at limit **
  15  norm          .10000E-03    4.3908        .34424E-07** at limit **
  16  norm          .10000E-03    5.9576        .22457E-07** at limit **
  17  norm          .10000E-03    11.401       -.51120E-05** at limit **
  18  Prefactor     .10000E-03    7.1427        .58289E-08** at limit **
  19  Prefactor     .10000E-03    57.433       -.33541E-04** at limit **
  20  Prefactor     .10000E-03    88.552       -.13000E-04** at limit **
  21  Prefactor     .10000E-03    232.11       -.62108E-04** at limit **
  22  Prefactor     11.287        96.730       -.73328E-05    .43571E-04
  23  Prefactor     .10000E-03    98.716        .16080E-04** at limit **
  24  Prefactor     .10000E-03    33.946       -.15458E-04** at limit **
  25  Prefactor     .10000E-03    114.54        .54197E-04** at limit **
  26  norm          10.622        9.1933        .45518E-06    .12032E-04
  27  Prefactor     .10000E-03    9.4873       -.13884E-05** at limit **
  28  norm          .10000E-03    87.198       -.16637E-04** at limit **
  29  Normalizat    1.2847        .45137        .78924E-05   -.13575E-04
  30  Prefactor     .93677        .52266       -.29001E-05    .10216E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 8.47372
  Prefactor  = 16.8787
  Prefactor  = 0.0001
  Prefactor  = 22.3673
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 242.148
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 0.0001
  norm       = 0.0001
  norm       = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 11.2871
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 10.6221
  Prefactor  = 0.0001
  norm       = 0.0001
  Normalizat = 1.28465
  Prefactor  = 0.936766
 **********
 **   18 **HESSE 
 **********

 FCN=   1292.080     FROM HESSE     STATUS=OK           568 CALLS     5010 TOTAL
                     EDM=   .70E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          8.4737        6.2857        .75234E-04   -1.5126    
   2  Prefactor     16.879        20.665        .97489E-04   -1.4886    
   3  Prefactor     .10000E-03    3.0856        .61160E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     22.367        21.421        .84692E-04   -1.4762    
   5  Prefactor     .10000E-03    94.737        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    93.673        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    45.703        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10000E-03    11.443        .11873E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          .10000E-03    3.8359        .68755E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     242.15        364.58        .13009E-03   -1.2583    
  11  Prefactor     .10000E-03    25.425        .17710E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    40.394        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .10000E-03    9.5947        .10870E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          .10000E-03    48.841        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          .10000E-03    4.3946        .73560E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          .10000E-03    5.9584        .85703E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          .10000E-03    11.394        .11853E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10000E-03    7.1680        .93815E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .10000E-03    57.580        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10000E-03    88.533        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .10000E-03    232.35        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     11.287        97.176        .11923E-03   -1.5036    
  23  Prefactor     .10000E-03    98.744        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     .10000E-03    33.956        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     .10000E-03    114.60        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  norm          10.622        9.1971        .98615E-04   -1.5056    
  27  Prefactor     .10000E-03    9.4949        .10815E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  norm          .10000E-03    87.282        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  29  Normalizat    1.2847        .55372        .25757E-03   -.84026    
  30  Prefactor     .93677        .63505        .34732E-03   -.94868    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 7.03759e-10
Minuit parameter uncertainties:
  1  6.28621
  2  20.6738
  3  2.58616e-05
  4  21.4281
  5  0.000230448
  6  7.94708e-05
  7  1.34275e-05
  8  8.26177e-06
  9  3.53486e-06
  10  368.083
  11  1.21319e-05
  12  1.0299e-05
  13  7.15837e-06
  14  0.000257918
  15  2.15753e-06
  16  2.55141e-07
  17  3.37298e-05
  18  2.97072e-06
  19  2.58674e-05
  20  0.000111618
  21  3.25109e-06
  22  66.3823
  23  7.56994e-05
  24  7.46023e-06
  25  4.51447e-06
  26  9.19829
  27  1.80873e-06
  28  2.99385e-05
  29  0.556303
  30  0.640189
Done.

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

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  1.000e-04  1.030e-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:  9.368e-01  6.402e-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.285e+00  5.563e-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: 3.28e-07 ph cm-2 s-1
Energy Flux Upper Limit: 2.54e-02 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/189580/likelihoodResults_408844801_409104001_4FGL_J1304.0+3704_daily_bin654.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) = 1292.07983002
delta logL = -0.000117477251024

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 1292.07971445
delta logL = -1.90062701222e-06

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10006E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.8724       1.0000          .0000       10.000    
     3 'Normalizat'    1.2845       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .93658       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=   1292.080     FROM MIGRAD    STATUS=CONVERGED     93 CALLS      283 TOTAL
                     EDM=   .62E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10849E-03    24.323        .17280E-01** at limit **
   2  Index         2.7240        8.1298        .50000        .11613E-04
   3  Normalizat    1.2847        .10125E-01    .25756E-03   -.78722E-04
   4  Prefactor     .93675        .11920E-01    .34732E-03   -.42552E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000108485
  Index      = 2.724
  Normalizat = 1.28466
  Prefactor  = 0.936752
 **********
 **   18 **HESSE 
 **********

 FCN=   1292.080     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      312 TOTAL
                     EDM=   .70E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10849E-03    262.99        .18693E-02   -1.5707    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.7240        5.0813        .50000       -.47260    
   3  Normalizat    1.2847        .33667E-01    .51513E-04   -.84025    
   4  Prefactor     .93675        .39636E-01    .13893E-04   -.94868    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 7.02193e-09
Minuit parameter uncertainties:
  1  0.0948959
  2  625.007
  3  0.0336675
  4  0.0396377
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/189580': 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) = 1292.07971322
delta logL = -6.71411498843e-07

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  1.085e-04  9.490e-02  1.000e-04  1.000e+04 ( 1.000e-13)
314        Index:  2.724e+00  6.250e+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:  9.368e-01  3.964e-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:  1.285e+00  3.367e-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/189580/cmap_HighResolution_408844801_409104001_4FGL_J1304.0+3704_daily_bin654.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='2.54e-02', job_status='DONE', photon_flux_upper_limit='3.28e-07', time_completed='2021-09-06 19:57:22.146065', job_id='189580', GAL2='0.94', fit_tolerance='1e-08', EG2='1.28', EG='1.28', time_epoch_completed='1630983442.15', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.94', dlogl='-6.71e-07', ts2='-0.00', photon_index_error='0.00', photon_index='2.44' WHERE bin_id='654' AND source_name='4FGL J1304.0+3704' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 19:57:22 PDT 2021


------------------------------------------------------------
Sender: LSF System <scs@bullet0134>
Subject: Job 189580: <4FGL_J1304.0+3704_daily_bin654> in cluster <slac> Done

Job <4FGL_J1304.0+3704_daily_bin654> was submitted from host <rhel6-64j> by user <kocevski> in cluster <slac> at Mon Sep  6 19:45:40 2021
Job was executed on host(s) <bullet0134>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep  6 19:46: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:46:24 2021
Terminated at Mon Sep  6 19:57:22 2021
Results reported at Mon Sep  6 19:57:22 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1304.0+3704_daily_bin654 196.008 37.071 408844801 409104001 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 :                                   458.16 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             198.96 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   658 sec.
    Turnaround time :                            702 sec.

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

