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


Performing analysis on: 4FGL_J1304.0+3704_daily_bin257
RA = 196.008, Dec = 37.071
tmin = 305942401, tmax = 306201601
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='186721', job_status='RUN', time_executed='2021-09-06 19:37:48.140210', time_epoch_executed='1630982268.14' WHERE source_name='4FGL J1304.0+3704' and cadence='daily' and bin_id='257'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/186721

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/186721/ft1_4FGL_J1304.0+3704_daily_bin257.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/186721/ft2_4FGL_J1304.0+3704_daily_bin257.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/186721/ft1_4FGL_J1304.0+3704_daily_bin257.fits outfile=/scratch/kocevski/186721/ft1_filteredMKT_4FGL_J1304.0+3704_daily_bin257.fits ra=196.008 dec=37.071 rad=12.0 tmin=305942401.0 tmax=306201601.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.62
user 3.31
sys 0.23

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/186721/ft1_filtered_4FGL_J1304.0+3704_daily_bin257.fits" evtable="EVENTS" scfile=/scratch/kocevski/186721/ft2_4FGL_J1304.0+3704_daily_bin257.fits sctable="SC_DATA" outfile=/scratch/kocevski/186721/ltcube_305942401_306201601_4FGL_J1304.0+3704_daily_bin257.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/186721/ft2_4FGL_J1304.0+3704_daily_bin257.fits
.....................!
real 14.84
user 14.37
sys 0.29

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/186721/ft1_filtered_4FGL_J1304.0+3704_daily_bin257.fits evtable="EVENTS" scfile=/scratch/kocevski/186721/ft2_4FGL_J1304.0+3704_daily_bin257.fits sctable="SC_DATA" expcube=/scratch/kocevski/186721/ltcube_305942401_306201601_4FGL_J1304.0+3704_daily_bin257.fits outfile=/scratch/kocevski/186721/expmap_305942401_306201601_4FGL_J1304.0+3704_daily_bin257.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/186721/ltcube_305942401_306201601_4FGL_J1304.0+3704_daily_bin257.fits
.....................!
real 192.48
user 186.03
sys 4.19

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/186721/ft1_filtered_4FGL_J1304.0+3704_daily_bin257.fits scfile=/scratch/kocevski/186721/ft2_4FGL_J1304.0+3704_daily_bin257.fits outfile=/scratch/kocevski/186721/cmap_305942401_306201601_4FGL_J1304.0+3704_daily_bin257.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.59
user 0.40
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/186721/ft1_filtered_4FGL_J1304.0+3704_daily_bin257.fits scfile=/scratch/kocevski/186721/ft2_4FGL_J1304.0+3704_daily_bin257.fits outfile=/scratch/kocevski/186721/cmap_HighResolution_305942401_306201601_4FGL_J1304.0+3704_daily_bin257.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/186721/ft1_filtered_4FGL_J1304.0+3704_daily_bin257.fits evtable="EVENTS" scfile=/scratch/kocevski/186721/ft2_4FGL_J1304.0+3704_daily_bin257.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/186721/Model_4FGL_J1304.0+3704_daily_bin257.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/186721/ft1_filtered_4FGL_J1304.0+3704_daily_bin257.fits.....................!
real 51.53
user 49.92
sys 1.15

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    13.945       1.0000         .10000E-03   10000.    
     2 'Prefactor '    8.0146       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .15302E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    12.820       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    2.9491       1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    .17149       1.0000         .10000E-03   10000.    
    10 'Prefactor '    11.882       1.0000         .10000E-03   10000.    
    11 'Prefactor '    49.116       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    2.8247       1.0000         .10000E-03   10000.    
    14 'norm      '    22.893       1.0000         .10000E-03   10000.    
    15 'norm      '    .10433E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    .33793E-01   1.0000         .10000E-03   10000.    
    17 'norm      '    12.057       1.0000         .10000E-03   10000.    
    18 'Prefactor '    13.916       1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10007E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10457E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    3.1636       1.0000         .10000E-03   10000.    
    23 'Prefactor '    16.012       1.0000         .10000E-03   10000.    
    24 'Prefactor '    .41567E-03   1.0000         .10000E-03   10000.    
    25 'Prefactor '    .10008E-03   1.0000         .10000E-03   10000.    
    26 'norm      '    2.3963       1.0000         .10000E-03   10000.    
    27 'Prefactor '    19.554       1.0000         .10000E-03   10000.    
    28 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    29 'Normalizat'    .95023       1.0000         .10000E-01   10.000    
    30 'Prefactor '    .99446       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=   5885.825     FROM MIGRAD    STATUS=CONVERGED    793 CALLS     4023 TOTAL
                     EDM=   .17E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  4.6%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          13.944        4.9272       -.27301E-07    .43588E-03
   2  Prefactor     8.0169        8.3168        .83892E-06    .99170E-04
   3  Prefactor     .10002E-03    2.7117       -.21730E-05** at limit **
   4  Prefactor     12.822        9.2857       -.15178E-07    .39350E-04
   5  Prefactor     .10000E-03    25.419       -.17134E-06** at limit **
   6  Prefactor     .10000E-03    5.9505       -.11128E-07** at limit **
   7  Prefactor     2.8600        354.23       -.14696E-04   -.52955E-04
   8  Prefactor     .10000E-03    2.5646        .15868E-07** at limit **
   9  norm          .18457        60.537        .44803E-05   -.42609E-03
  10  Prefactor     11.875        63.854       -.10913E-06   -.13075E-04
  11  Prefactor     49.073        37.710        .49484E-06   -.12988E-03
  12  Prefactor     .10000E-03    7.1910       -.62462E-06** at limit **
  13  norm          2.8257        5.4476        .20301E-06    .14185E-04
  14  norm          22.893        17.025       -.41079E-07   -.16282E-04
  15  norm          .10000E-03    3.0962        .26571E-05** at limit **
  16  norm          .78411E-01    7.1542       -.79032E-06   -.30868E-03
  17  norm          12.057        5.7797        .18126E-07   -.38349E-04
  18  Prefactor     13.910        5.2814       -.38050E-07   -.40219E-03
  19  Prefactor     .10000E-03    15.012        .12737E-05** at limit **
  20  Prefactor     .10000E-03    17.709        .38711E-06** at limit **
  21  Prefactor     .10000E-03    48.296        .87502E-06** at limit **
  22  Prefactor     3.1608        11.445       -.43132E-06   -.12659E-03
  23  Prefactor     16.014        31.444        .40284E-06    .37571E-06
  24  Prefactor     .10138E-03    74.782        .17281E-05** at limit **
  25  Prefactor     .10000E-03    22.468        .71554E-06** at limit **
  26  norm          2.3965        1.5423       -.64842E-09   -.13450E-03
  27  Prefactor     19.554        7.4134        .28931E-07   -.15485E-03
  28  norm          .10000E-03    7.5317        .75918E-06** at limit **
  29  Normalizat    .95038        .18601       -.45607E-05   -.49284E-03
  30  Prefactor     .99416        .22737        .47088E-05    .20743E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 13.9441
  Prefactor  = 8.01695
  Prefactor  = 0.000100025
  Prefactor  = 12.8221
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 2.85997
  Prefactor  = 0.0001
  norm       = 0.184572
  Prefactor  = 11.8747
  Prefactor  = 49.0734
  Prefactor  = 0.0001
  norm       = 2.82572
  norm       = 22.8935
  norm       = 0.000100001
  norm       = 0.0784106
  norm       = 12.0574
  Prefactor  = 13.9099
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 3.16083
  Prefactor  = 16.0138
  Prefactor  = 0.000101381
  Prefactor  = 0.0001
  norm       = 2.39652
  Prefactor  = 19.5537
  norm       = 0.0001
  Normalizat = 0.950383
  Prefactor  = 0.994156
 **********
 **   18 **HESSE 
 **********

 FCN=   5885.825     FROM HESSE     STATUS=OK           612 CALLS     4635 TOTAL
                     EDM=   .10E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          13.944        4.8708        .97171E-04   -1.4961    
   2  Prefactor     8.0169        8.3429        .70813E-03   -1.5142    
   3  Prefactor     .10002E-03    6.5839        .16509E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     12.822        9.2835        .11187E-03   -1.4992    
   5  Prefactor     .10000E-03    25.525        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    5.9528        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     2.8600        398.80        .23649E-03   -1.5370    
   8  Prefactor     .10000E-03    2.5774        .12002E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          .18457        99.780        .25683E-02   -1.5622    
  10  Prefactor     11.875        63.874        .11622E-03   -1.5019    
  11  Prefactor     49.073        43.360        .57219E-04   -1.4306    
  12  Prefactor     .10000E-03    7.2441        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          2.8257        5.4261        .23288E-03   -1.5372    
  14  norm          22.893        17.011        .83716E-04   -1.4751    
  15  norm          .10000E-03    4.1180        .22124E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          .78411E-01    5.0516        .54317E-01   -1.5652    
  17  norm          12.057        5.7804        .11537E-03   -1.5013    
  18  Prefactor     13.910        5.2786        .97478E-04   -1.4962    
  19  Prefactor     .10000E-03    15.215        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10000E-03    17.725        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .10000E-03    48.415        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     3.1608        11.427        .22787E-03   -1.5352    
  23  Prefactor     16.014        31.431        .10009E-03   -1.4907    
  24  Prefactor     .10138E-03    24.708        .10535       -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     .10000E-03    22.491        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  norm          2.3965        1.5363        .73293E-04   -1.5398    
  27  Prefactor     19.554        7.4160        .90575E-04   -1.4823    
  28  norm          .10000E-03    7.5591        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  29  Normalizat    .95038        .21046        .24269E-03   -.94712    
  30  Prefactor     .99416        .25519        .29535E-03   -.92925    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.0044e-08
Minuit parameter uncertainties:
  1  4.87089
  2  8.34409
  3  0.000803846
  4  9.28458
  5  5.02587e-05
  6  6.68454e-06
  7  68.0103
  8  1.02012e-05
  9  8.59501
  10  55.1725
  11  43.3874
  12  8.82588e-05
  13  5.427
  14  17.0146
  15  0.000139577
  16  1.25803
  17  5.7807
  18  5.27876
  19  0.000156077
  20  4.47929e-05
  21  0.000200255
  22  11.4348
  23  31.4632
  24  0.0116897
  25  0.000106799
  26  1.53636
  27  7.41637
  28  6.66124e-05
  29  0.210646
  30  0.255505
Done.

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

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  1.000e-04  8.826e-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.942e-01  2.555e-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:  9.504e-01  2.106e-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: 6.19e-08 ph cm-2 s-1
Energy Flux Upper Limit: 4.79e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/186721/likelihoodResults_305942401_306201601_4FGL_J1304.0+3704_daily_bin257.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) = 5885.82587645
delta logL = -0.000657190810671

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 5885.82521926
delta logL = 4.64478944195e-09

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.4299       1.0000          .0000       10.000    
     3 'Normalizat'    .95040       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .99415       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.

 FCN=   5885.825     FROM MIGRAD    STATUS=CONVERGED     54 CALLS      206 TOTAL
                     EDM=   .36E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    541.59        .90712E-02** at limit **
   2  Index         2.4239        5.9196        .50000        .71584E-05
   3  Normalizat    .95039        .40536E-01    .45542E-01    .65809E-05
   4  Prefactor     .99415        .50557E-01    .66775E-01    .14542E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 2.42393
  Normalizat = 0.95039
  Prefactor  = 0.994148
 **********
 **   18 **HESSE 
 **********

 FCN=   5885.825     FROM HESSE     STATUS=NOT POSDEF    33 CALLS      239 TOTAL
                     EDM=   .77E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    1138.2        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.4239        5.4333        .50000       -.54126    
   3  Normalizat    .95039        .72633E-01    .24268E-03   -.94711    
   4  Prefactor     .99415        .90554E-01    .29535E-03   -.92925    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 7.73235e-09
Minuit parameter uncertainties:
  1  5.22028e-05
  2  54.7859
  3  0.0726407
  4  0.0905683
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/186721': 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) = 5885.82521924
delta logL = 2.06282493309e-08

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  1.000e-04  5.220e-05  1.000e-04  1.000e+04 ( 1.000e-13)
314        Index:  2.424e+00  5.479e+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:  9.941e-01  9.057e-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:  9.504e-01  7.264e-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/186721/cmap_HighResolution_305942401_306201601_4FGL_J1304.0+3704_daily_bin257.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='4.79e-03', job_status='DONE', photon_flux_upper_limit='6.19e-08', time_completed='2021-09-06 19:52:18.305893', job_id='186721', GAL2='0.99', fit_tolerance='1e-08', EG2='0.95', EG='0.95', time_epoch_completed='1630983138.31', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.99', dlogl='2.06e-08', ts2='-0.00', photon_index_error='0.00', photon_index='2.44' WHERE bin_id='257' AND source_name='4FGL J1304.0+3704' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 19:52:18 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0259>
Subject: Job 186721: <4FGL_J1304.0+3704_daily_bin257> in cluster <slac> Done

Job <4FGL_J1304.0+3704_daily_bin257> was submitted from host <rhel6-64h> by user <kocevski> in cluster <slac> at Mon Sep  6 19:35:43 2021
Job was executed on host(s) <bullet0259>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep  6 19:35:44 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:35:44 2021
Terminated at Mon Sep  6 19:52:18 2021
Results reported at Mon Sep  6 19:52:18 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1304.0+3704_daily_bin257 196.008 37.071 305942401 306201601 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 :                                   861.06 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             306.97 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   994 sec.
    Turnaround time :                            995 sec.

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

