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


Performing analysis on: 4FGL_J1304.0+3704_daily_bin247
RA = 196.008, Dec = 37.071
tmin = 303350401, tmax = 303609601
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='186705', job_status='RUN', time_executed='2021-09-06 19:37:33.844863', time_epoch_executed='1630982253.84' WHERE source_name='4FGL J1304.0+3704' and cadence='daily' and bin_id='247'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/186705

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

Retrieving the FT1 file...

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

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

Retrieving 45 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/186705/ft1_4FGL_J1304.0+3704_daily_bin247.fits


Retrieving the FT1 file...

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

Retrieving 45 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/186705/ft2_4FGL_J1304.0+3704_daily_bin247.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/186705/ft1_4FGL_J1304.0+3704_daily_bin247.fits outfile=/scratch/kocevski/186705/ft1_filteredMKT_4FGL_J1304.0+3704_daily_bin247.fits ra=196.008 dec=37.071 rad=12.0 tmin=303350401.0 tmax=303609601.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.42
user 3.17
sys 0.23

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/186705/ft1_filtered_4FGL_J1304.0+3704_daily_bin247.fits evtable="EVENTS" scfile=/scratch/kocevski/186705/ft2_4FGL_J1304.0+3704_daily_bin247.fits sctable="SC_DATA" expcube=/scratch/kocevski/186705/ltcube_303350401_303609601_4FGL_J1304.0+3704_daily_bin247.fits outfile=/scratch/kocevski/186705/expmap_303350401_303609601_4FGL_J1304.0+3704_daily_bin247.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/186705/ltcube_303350401_303609601_4FGL_J1304.0+3704_daily_bin247.fits
.....................!
real 193.45
user 187.32
sys 5.47

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/186705/ft1_filtered_4FGL_J1304.0+3704_daily_bin247.fits scfile=/scratch/kocevski/186705/ft2_4FGL_J1304.0+3704_daily_bin247.fits outfile=/scratch/kocevski/186705/cmap_303350401_303609601_4FGL_J1304.0+3704_daily_bin247.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.39
sys 0.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/186705/ft1_filtered_4FGL_J1304.0+3704_daily_bin247.fits scfile=/scratch/kocevski/186705/ft2_4FGL_J1304.0+3704_daily_bin247.fits outfile=/scratch/kocevski/186705/cmap_HighResolution_303350401_303609601_4FGL_J1304.0+3704_daily_bin247.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.57
user 0.40
sys 0.16

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .10007E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    7.6120       1.0000         .10000E-03   10000.    
     3 'Prefactor '    1.9093       1.0000         .10000E-03   10000.    
     4 'Prefactor '    4.0218       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10016E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    15.044       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10006E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    .86143       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .15727E-01   1.0000         .10000E-03   10000.    
    11 'Prefactor '    30.558       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10079E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .10058E-03   1.0000         .10000E-03   10000.    
    14 'norm      '    14.789       1.0000         .10000E-03   10000.    
    15 'norm      '    .10072E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    .10011E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    10.295       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .26824       1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    41.584       1.0000         .10000E-03   10000.    
    21 'Prefactor '    53.757       1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10024E-03   1.0000         .10000E-03   10000.    
    25 'Prefactor '    .10042E-03   1.0000         .10000E-03   10000.    
    26 'norm      '    .29382       1.0000         .10000E-03   10000.    
    27 'Prefactor '    1.3096       1.0000         .10000E-03   10000.    
    28 'norm      '    3.7099       1.0000         .10000E-03   10000.    
    29 'Normalizat'    1.1950       1.0000         .10000E-01   10.000    
    30 'Prefactor '    .97463       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=   5951.503     FROM MIGRAD    STATUS=CONVERGED    797 CALLS     4005 TOTAL
                     EDM=   .10E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .5%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .10000E-03    3.2884        .93717E-08** at limit **
   2  Prefactor     7.6117        7.7771       -.18778E-06   -.81230E-04
   3  Prefactor     1.9090        2.0111       -.69008E-08   -.29732E-04
   4  Prefactor     4.0210        13.032        .13192E-05   -.11084E-03
   5  Prefactor     .10000E-03    14.807        .81807E-06** at limit **
   6  Prefactor     15.043        18.518        .20789E-06    .95747E-07
   7  Prefactor     .10000E-03    62.023        .77729E-05** at limit **
   8  Prefactor     .10000E-03    2.3871        .29206E-07** at limit **
   9  norm          .85027        5.8987        .11700E-05   -.47785E-03
  10  Prefactor     .10000E-03    217.55       -.10569E-04** at limit **
  11  Prefactor     30.623        31.535       -.40955E-05    .44724E-04
  12  Prefactor     .10000E-03    14.271       -.62038E-06** at limit **
  13  norm          .10000E-03    2.5286        .58190E-07** at limit **
  14  norm          14.781        11.791        .21121E-05    .29929E-04
  15  norm          .10000E-03    2.7629        .13659E-06** at limit **
  16  norm          .10000E-03    3.1182        .54368E-07** at limit **
  17  norm          10.293        5.3650       -.27972E-06   -.15605E-03
  18  Prefactor     .25391        1.8355       -.18609E-05    .49223E-03
  19  Prefactor     .10000E-03    4.0661       -.28826E-07** at limit **
  20  Prefactor     41.596        39.609        .31425E-05   -.15592E-03
  21  Prefactor     53.799        50.576        .20359E-04    .14786E-03
  22  Prefactor     .10000E-03    10.039        .31398E-07** at limit **
  23  Prefactor     .10000E-03    105.69        .30017E-04** at limit **
  24  Prefactor     .10000E-03    24.646       -.39703E-06** at limit **
  25  Prefactor     .10000E-03    82.835       -.31262E-04** at limit **
  26  norm          .29360        .84387       -.44369E-06   -.16839E-02
  27  Prefactor     1.3094        2.4165       -.18039E-06   -.39277E-03
  28  norm          3.7055        21.812       -.71830E-06   -.28065E-04
  29  Normalizat    1.1951        .17940        .49721E-07    .30456E-03
  30  Prefactor     .97472        .21655       -.91224E-06    .15921E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 0.0001
  Prefactor  = 7.61169
  Prefactor  = 1.90898
  Prefactor  = 4.02102
  Prefactor  = 0.0001
  Prefactor  = 15.0432
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.850272
  Prefactor  = 0.0001
  Prefactor  = 30.6232
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 14.7814
  norm       = 0.0001
  norm       = 0.0001
  norm       = 10.2929
  Prefactor  = 0.253913
  Prefactor  = 0.0001
  Prefactor  = 41.5961
  Prefactor  = 53.7991
  Prefactor  = 0.0001
  Prefactor  = 0.000100003
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.293605
  Prefactor  = 1.30941
  norm       = 3.7055
  Normalizat = 1.19507
  Prefactor  = 0.974717
 **********
 **   18 **HESSE 
 **********

 FCN=   5951.503     FROM HESSE     STATUS=OK           590 CALLS     4595 TOTAL
                     EDM=   .24E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .10000E-03    3.3605        .27245E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     7.6117        7.7750        .14535E-03   -1.5156    
   3  Prefactor     1.9090        2.0039        .10834E-03   -1.5432    
   4  Prefactor     4.0210        12.989        .20108E-03   -1.5307    
   5  Prefactor     .10000E-03    14.865        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     15.043        18.512        .10326E-03   -1.4932    
   7  Prefactor     .10000E-03    62.082        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10000E-03    2.4094        .11637E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          .85027        9.6862        .28847E-02   -1.5524    
  10  Prefactor     .10000E-03    226.39        .36406E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     30.623        30.043        .72481E-04   -1.4601    
  12  Prefactor     .10000E-03    14.478        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .10000E-03    2.5408        .11971E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          14.781        11.787        .10415E-03   -1.4939    
  15  norm          .10000E-03    2.8230        .12490E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          .10000E-03    3.1351        .13299E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          10.293        5.3642        .12160E-03   -1.5066    
  18  Prefactor     .25391        7.9430        .18918E-02   -1.5607    
  19  Prefactor     .10000E-03    4.0703        .15190E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     41.596        39.411        .62163E-04   -1.4417    
  21  Prefactor     53.799        51.072        .27353E-03   -1.4240    
  22  Prefactor     .10000E-03    10.102        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .10000E-03    105.86        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     .10000E-03    24.826        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     .10000E-03    82.837        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  norm          .29360        .88359        .11624E-02   -1.5600    
  27  Prefactor     1.3094        2.3673        .15881E-03   -1.5479    
  28  norm          3.7055        21.882        .20966E-03   -1.5323    
  29  Normalizat    1.1951        .20996        .21847E-03   -.86755    
  30  Prefactor     .97472        .25502        .30044E-03   -.93577    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.43743e-09
Minuit parameter uncertainties:
  1  7.52148e-07
  2  7.77604
  3  2.00394
  4  12.9978
  5  1.20132e-06
  6  18.5194
  7  2.91007e-05
  8  4.83622e-06
  9  5.74049
  10  0.000415719
  11  30.0581
  12  3.94166e-05
  13  8.99767e-06
  14  11.7886
  15  2.29685e-05
  16  1.06591e-05
  17  5.36444
  18  2.84016
  19  5.6388e-06
  20  39.4354
  21  51.1141
  22  2.59408e-06
  23  0.00112634
  24  1.30139e-05
  25  2.96602e-05
  26  0.883628
  27  2.36749
  28  18.0189
  29  0.210108
  30  0.255339
Done.

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

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  1.000e-04  3.942e-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.747e-01  2.553e-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.195e+00  2.101e-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.13e-08 ph cm-2 s-1
Energy Flux Upper Limit: 4.75e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/186705/likelihoodResults_303350401_303609601_4FGL_J1304.0+3704_daily_bin247.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) = 5951.50377605
delta logL = -0.000329149702338

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 5951.5034466
delta logL = 3.02110493067e-07

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10808E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.3731       1.0000          .0000       10.000    
     3 'Normalizat'    1.1951       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .97474       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=   5951.503     FROM MIGRAD    STATUS=CONVERGED    107 CALLS      262 TOTAL
                     EDM=   .10E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .20581E-03    1.5170        .91197E-01** at limit **
   2  Index         1.9964        7.1093        .50000        .24038E-04
   3  Normalizat    1.1951        .14273E-02    .21847E-03    .28100E-04
   4  Prefactor     .97472        .17999E-02    .30044E-03    .37688E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000205807
  Index      = 1.9964
  Normalizat = 1.19507
  Prefactor  = 0.974718
 **********
 **   18 **HESSE 
 **********

 FCN=   5951.503     FROM HESSE     STATUS=NOT POSDEF    31 CALLS      293 TOTAL
                     EDM=   .18E-05    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .20581E-03    213.99        .54416E-02   -1.5706    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         1.9964        5.9612        .50000       -.64440    
   3  Normalizat    1.1951        .80974E-02    .87390E-05   -.86755    
   4  Prefactor     .97472        .10211E-01    .12018E-04   -.93577    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 1.77542e-06
Minuit parameter uncertainties:
  1  0.302028
  2  203.941
  3  0.00809745
  4  0.0102113
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/186705': 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) = 5951.50344519
delta logL = 1.71054762177e-06

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  2.058e-04  3.020e-01  1.000e-04  1.000e+04 ( 1.000e-13)
314        Index:  1.996e+00  2.039e+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.747e-01  1.021e-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.195e+00  8.097e-03  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/186705/cmap_HighResolution_303350401_303609601_4FGL_J1304.0+3704_daily_bin247.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='4.75e-03', job_status='DONE', photon_flux_upper_limit='6.13e-08', time_completed='2021-09-06 19:52:10.823519', job_id='186705', GAL2='0.97', fit_tolerance='1e-08', EG2='1.20', EG='1.20', time_epoch_completed='1630983130.82', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.97', dlogl='1.71e-06', ts2='-0.00', photon_index_error='0.00', photon_index='2.44' WHERE bin_id='247' AND source_name='4FGL J1304.0+3704' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 19:52:10 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0125>
Subject: Job 186705: <4FGL_J1304.0+3704_daily_bin247> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1304.0+3704_daily_bin247 196.008 37.071 303350401 303609601 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 :                                   873.38 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             298.94 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   988 sec.
    Turnaround time :                            990 sec.

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

