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


Performing analysis on: 4FGL_J1304.0+3704_daily_bin185
RA = 196.008, Dec = 37.071
tmin = 287280001, tmax = 287539201
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='186606', job_status='RUN', time_executed='2021-09-06 19:37:48.987821', time_epoch_executed='1630982268.99' WHERE source_name='4FGL J1304.0+3704' and cadence='daily' and bin_id='185'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/186606

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/186606/ft1_4FGL_J1304.0+3704_daily_bin185.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/186606/ft2_4FGL_J1304.0+3704_daily_bin185.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/186606/ft1_4FGL_J1304.0+3704_daily_bin185.fits outfile=/scratch/kocevski/186606/ft1_filteredMKT_4FGL_J1304.0+3704_daily_bin185.fits ra=196.008 dec=37.071 rad=12.0 tmin=287280001.0 tmax=287539201.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.58
user 3.38
sys 0.19

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/186606/ft1_filtered_4FGL_J1304.0+3704_daily_bin185.fits" evtable="EVENTS" scfile=/scratch/kocevski/186606/ft2_4FGL_J1304.0+3704_daily_bin185.fits sctable="SC_DATA" outfile=/scratch/kocevski/186606/ltcube_287280001_287539201_4FGL_J1304.0+3704_daily_bin185.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/186606/ft2_4FGL_J1304.0+3704_daily_bin185.fits
.....................!
real 14.71
user 14.33
sys 0.33

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/186606/ft1_filtered_4FGL_J1304.0+3704_daily_bin185.fits evtable="EVENTS" scfile=/scratch/kocevski/186606/ft2_4FGL_J1304.0+3704_daily_bin185.fits sctable="SC_DATA" expcube=/scratch/kocevski/186606/ltcube_287280001_287539201_4FGL_J1304.0+3704_daily_bin185.fits outfile=/scratch/kocevski/186606/expmap_287280001_287539201_4FGL_J1304.0+3704_daily_bin185.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/186606/ltcube_287280001_287539201_4FGL_J1304.0+3704_daily_bin185.fits
.....................!
real 191.29
user 186.35
sys 4.49

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/186606/ft1_filtered_4FGL_J1304.0+3704_daily_bin185.fits scfile=/scratch/kocevski/186606/ft2_4FGL_J1304.0+3704_daily_bin185.fits outfile=/scratch/kocevski/186606/cmap_287280001_287539201_4FGL_J1304.0+3704_daily_bin185.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.56
user 0.38
sys 0.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/186606/ft1_filtered_4FGL_J1304.0+3704_daily_bin185.fits scfile=/scratch/kocevski/186606/ft2_4FGL_J1304.0+3704_daily_bin185.fits outfile=/scratch/kocevski/186606/cmap_HighResolution_287280001_287539201_4FGL_J1304.0+3704_daily_bin185.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.56
user 0.41
sys 0.14

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    4.0947       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10020E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10204E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    25.232       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .11635E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10144E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10027E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    7.1349       1.0000         .10000E-03   10000.    
     9 'norm      '    .10078E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    42.646       1.0000         .10000E-03   10000.    
    11 'Prefactor '    22.444       1.0000         .10000E-03   10000.    
    12 'Prefactor '    12.833       1.0000         .10000E-03   10000.    
    13 'norm      '    .10050E-03   1.0000         .10000E-03   10000.    
    14 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    6.5206       1.0000         .10000E-03   10000.    
    16 'norm      '    .10043E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    13.645       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    4.1241       1.0000         .10000E-03   10000.    
    20 'Prefactor '    52.139       1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    12.928       1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10474E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    25 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    26 'norm      '    .78594       1.0000         .10000E-03   10000.    
    27 'Prefactor '    6.3936       1.0000         .10000E-03   10000.    
    28 'norm      '    20.244       1.0000         .10000E-03   10000.    
    29 'Normalizat'    .97970       1.0000         .10000E-01   10.000    
    30 'Prefactor '    .85253       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=   5691.294     FROM MIGRAD    STATUS=CONVERGED    764 CALLS     3954 TOTAL
                     EDM=   .74E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  3.2%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          4.0957        2.7663       -.10432E-07    .19731E-04
   2  Prefactor     .10000E-03    5.2368        .39950E-07** at limit **
   3  Prefactor     .10000E-03    1.0570        .58860E-08** at limit **
   4  Prefactor     25.233        11.735       -.21820E-07    .10068E-04
   5  Prefactor     .10000E-03    72.660       -.24437E-05** at limit **
   6  Prefactor     .10000E-03    24.489        .15607E-05** at limit **
   7  Prefactor     .10000E-03    35.155       -.46214E-05** at limit **
   8  Prefactor     7.1375        7.4228       -.31079E-06   -.20596E-03
   9  norm          .10000E-03    2.4389       -.28920E-08** at limit **
  10  Prefactor     42.640        47.454       -.23665E-05   -.12073E-03
  11  Prefactor     22.452        20.923        .16873E-06    .34657E-04
  12  Prefactor     12.832        18.051       -.24007E-06   -.56324E-04
  13  norm          .10000E-03    1.6291       -.84296E-08** at limit **
  14  norm          .10000E-03    4.1440        .19156E-07** at limit **
  15  norm          6.5212        3.9463       -.14564E-06   -.41147E-04
  16  norm          .10000E-03    4.4949       -.33464E-07** at limit **
  17  norm          13.644        6.1386        .15418E-06   -.12280E-03
  18  Prefactor     .10000E-03    .85440       -.93317E-07** at limit **
  19  Prefactor     4.1243        6.4791        .21471E-05   -.10725E-02
  20  Prefactor     52.128        42.299       -.36113E-05   -.26917E-03
  21  Prefactor     .10000E-03    17.107        .18486E-06** at limit **
  22  Prefactor     12.931        16.408        .23358E-06   -.18236E-03
  23  Prefactor     .10000E-03    16.180       -.98953E-06** at limit **
  24  Prefactor     .10000E-03    14.750        .39504E-06** at limit **
  25  Prefactor     .10001E-03    47.409        .58515E-05** at limit **
  26  norm          .78677        1.0807        .73171E-07   -.50156E-05
  27  Prefactor     6.3949        5.6013        .18228E-06    .10564E-03
  28  norm          20.245        14.669       -.28460E-07   -.61941E-05
  29  Normalizat    .97930        .16284        .52820E-06   -.30924E-04
  30  Prefactor     .85290        .19680       -.27559E-06    .24459E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 4.09573
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 25.2332
  Prefactor  = 0.000100001
  Prefactor  = 0.0001
  Prefactor  = 0.000100004
  Prefactor  = 7.13751
  norm       = 0.0001
  Prefactor  = 42.6396
  Prefactor  = 22.4516
  Prefactor  = 12.8321
  norm       = 0.0001
  norm       = 0.0001
  norm       = 6.52121
  norm       = 0.0001
  norm       = 13.6442
  Prefactor  = 0.0001
  Prefactor  = 4.12425
  Prefactor  = 52.128
  Prefactor  = 0.0001
  Prefactor  = 12.9313
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.000100006
  norm       = 0.786766
  Prefactor  = 6.39494
  norm       = 20.2453
  Normalizat = 0.979303
  Prefactor  = 0.852898
 **********
 **   18 **HESSE 
 **********

 FCN=   5691.294     FROM HESSE     STATUS=OK           586 CALLS     4540 TOTAL
                     EDM=   .35E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          4.0957        2.7480        .99805E-04   -1.5303    
   2  Prefactor     .10000E-03    5.2984        .16855E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .10000E-03    1.0743        .15046E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     25.233        11.737        .79748E-04   -1.4703    
   5  Prefactor     .10000E-03    73.751        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    24.763        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    35.941        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     7.1375        7.4195        .15017E-03   -1.5174    
   9  norm          .10000E-03    2.4633        .11492E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     42.640        47.876        .61387E-04   -1.4401    
  11  Prefactor     22.452        20.928        .84549E-04   -1.4760    
  12  Prefactor     12.832        18.043        .11182E-03   -1.4991    
  13  norm          .10000E-03    1.6337        .93989E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          .10000E-03    4.1458        .14999E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          6.5212        3.9352        .10854E-03   -1.5197    
  16  norm          .10000E-03    4.5044        .15567E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          13.644        6.1412        .10843E-03   -1.4969    
  18  Prefactor     .10000E-03    .86282        .68113E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     4.1243        8.1362        .99249E-03   -1.5302    
  20  Prefactor     52.128        43.421        .55543E-04   -1.4263    
  21  Prefactor     .10000E-03    17.121        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     12.931        16.505        .55703E-03   -1.4989    
  23  Prefactor     .10000E-03    16.178        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     .10000E-03    14.780        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     .10001E-03    48.576        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  norm          .78677        .96677        .88888E-03   -1.5531    
  27  Prefactor     6.3949        5.6090        .15873E-03   -1.5202    
  28  norm          20.245        14.674        .89020E-04   -1.4808    
  29  Normalizat    .97930        .19396        .21981E-03   -.93727    
  30  Prefactor     .85290        .23342        .29069E-03   -.97807    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.50232e-09
Minuit parameter uncertainties:
  1  2.74809
  2  3.30114e-06
  3  1.08173e-07
  4  11.738
  5  0.000424333
  6  0.000215467
  7  0.000738153
  8  7.42047
  9  2.37512e-06
  10  47.9187
  11  20.9347
  12  18.0511
  13  1.99363e-07
  14  5.07614e-06
  15  3.93538
  16  1.5933e-06
  17  6.14149
  18  2.62472e-06
  19  8.13837
  20  43.4471
  21  1.70584e-05
  22  16.5105
  23  6.01349e-05
  24  3.48262e-05
  25  0.00105006
  26  0.966786
  27  5.60949
  28  14.6762
  29  0.194103
  30  0.233691
Done.

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

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  1.283e+01  1.805e+01  1.000e-04  1.000e+04 ( 1.000e-13)
314        Index:  2.436e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
315        Scale:  1.032e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
596    Prefactor:  8.529e-01  2.337e-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.793e-01  1.941e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.81
Ra Dec: 196.008 37.071
Photon Flux Upper Limit: 1.01e-07 ph cm-2 s-1
Energy Flux Upper Limit: 7.78e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/186606/likelihoodResults_287280001_287539201_4FGL_J1304.0+3704_daily_bin185.txt

Performing a free index iterative likelihood fit...

Freezing all point sources, except source of interest...

Done.

Freeing candidate source...
Done.

Fit tolerance = 1

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5690.97103394
delta logL = 0.32273982991

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5690.9576455
delta logL = 0.336128272274

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    6.1383       1.0000         .10000E-03   10000.    
     2 'Index     '    3.2151       1.0000          .0000       10.000    
     3 'Normalizat'    .94882       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .87633       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=   5690.958     FROM MIGRAD    STATUS=CONVERGED     58 CALLS      251 TOTAL
                     EDM=   .18E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     6.1195        146.02        .40511E-02    .34929E-03
   2  Index         3.2168        3.7744        .11916        .13455E-03
   3  Normalizat    .94852        .57750E-01    .45522E-01   -.68334E-05
   4  Prefactor     .87659        .66594E-01    .64905E-01    .13272E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 6.11951
  Index      = 3.21683
  Normalizat = 0.948516
  Prefactor  = 0.876594
 **********
 **   18 **HESSE 
 **********

 FCN=   5690.958     FROM HESSE     STATUS=OK            33 CALLS      284 TOTAL
                     EDM=   .55E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     6.1195        17.559        .16178E-03   -1.5213    
   2  Index         3.2168        1.5448        .62625E-02   -.36466    
   3  Normalizat    .94852        .19406        .22287E-03   -.94776    
   4  Prefactor     .87659        .23632        .28709E-03   -.96964    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 5.4706e-11
Minuit parameter uncertainties:
  1  17.5736
  2  1.57447
  3  0.194208
  4  0.2366
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/186606': No such file or directory
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5690.95764267
delta logL = 0.336131094883

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  6.120e+00  1.757e+01  1.000e-04  1.000e+04 ( 1.000e-13)
314        Index:  3.217e+00  1.574e+00  0.000e+00  1.000e+01 (-1.000e+00)
315        Scale:  1.032e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
596    Prefactor:  8.766e-01  2.366e-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.485e-01  1.942e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 1.52
Ra Dec: 196.008 37.071
Photon Index (Free Index): 3.22 +/- 1.57
Photon Flux (Free Index): 5.04e-08 +/- 4.85e-08
Energy Flux (Free Index): 9.17e-06 +/- 9.07e-06

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/186606/cmap_HighResolution_287280001_287539201_4FGL_J1304.0+3704_daily_bin185.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='7.78e-03', comment='SUCCESS', energy_flux2='9.17e-06', dlogl='3.36e-01', photon_flux2='5.04e-08', job_status='DONE', time_completed='2021-09-06 19:51:48.948433', photon_index_error2='1.57', photon_index2='3.22', ts='0.81', fit_tolerance='1e-08', GAL='0.85', photon_index_error='0.00', photon_flux_upper_limit='1.01e-07', energy_flux_error2='9.07e-06', EG='0.98', time_epoch_completed='1630983108.95', return_code='0', job_id='186606', GAL2='0.88', EG2='0.95', return_code2='0', photon_flux_error2='4.85e-08', ts2='1.52', photon_index='2.44' WHERE bin_id='185' AND source_name='4FGL J1304.0+3704' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 19:51:48 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0149>
Subject: Job 186606: <4FGL_J1304.0+3704_daily_bin185> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1304.0+3704_daily_bin185 196.008 37.071 287280001 287539201 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 :                                   838.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             323.12 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   975 sec.
    Turnaround time :                            979 sec.

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

